An inspection dashboard has a header, two status icons, and a print stylesheet that hides the header. The sprite that defines both icons happens to live inside that header. Do the checkmark and warning triangle still make it into the PDF?
In a test with Chromium 145.0.7632.6, both icons printed. Moving the sprite out of the header produced a PDF with the same visible output.
Same report, two sprite locations
The two report rows read “Seal integrity · Approved” and “Pressure log · Needs review.” Each row has an SVG that points to a symbol in the same HTML document. The checkmark uses this reference.
<svg viewBox="0 0 24 24" aria-hidden="true"> <use href="#status-approved"></use> </svg> In the first HTML file, the zero-size sprite lives inside the header. In the second, it sits directly under <body>. Both files use the same symbols, the same IDs, and the same print rule.
@media print { header { display: none; } } The header disappeared in both PDFs. The checkmark and triangle stayed visible in both. The rendered PDF pages matched pixel for pixel.
The two <use> elements live in the report, outside the header. The print rule hides the header from the page while the report can still reference the symbol definitions. This result covers inline symbols in the Chromium version tested here. If your application supports Firefox or uses an external sprite file, run the same check in that setup.
From IconVectors to the printed report
In IconVectors 2.30 for Windows, you can build a sprite from individual SVG icons with Create SVG Sprite. Press F3 and open the SVG Sprite tab to see the full source. Before dropping it into the page, check that each <use href="#…"> matches the corresponding <symbol id="…">.
Once the sprite is in your app, generate a PDF with the real print stylesheet. Check the icon beside each status and make sure the status is also written out. In this example, a reader can still see “Approved” or “Needs review” if the report is photocopied or the symbols are hard to distinguish.