Print Stylesheet Generator
Generate a print stylesheet that hides interface chrome, expands link URLs, controls page breaks, sets margins and stops content being cut in half at the page boundary.
Last reviewed by the Radiatus Cloud team
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
Printing is still how documents leave the web
Invoices, tickets, recipes, reports and legal documents all get printed or saved as PDF, and a page designed only for screens produces a poor result: navigation bars occupying the first page, a dark background consuming an entire cartridge, links whose destinations are invisible on paper, and headings stranded alone at the foot of a page. None of it is difficult to fix, and almost nobody does, which makes a print stylesheet one of the cheapest quality improvements available.
The page break properties do the real work
break-inside avoid keeps a table row, a figure or a card from being split across two sheets. break-after avoid on a heading stops it being printed at the bottom of a page with its content overleaf. orphans and widows control how many lines of a paragraph may be left alone at a page boundary, and two or three is the usual setting. These four properties account for most of the difference between a printout that looks considered and one that looks broken.
Link destinations have to be printed
A link on paper is just underlined text, and its destination is lost. Printing the URL after the link text in a content block restores it. This should apply only to links whose destination is useful: printing the address after every navigation item produces unreadable clutter, which is why the rule is normally scoped to article content and skips internal anchors and links whose text already contains the address.
Related tools
- Color Converter — Convert colours between HEX, RGB, HSL, HWB and OKLCH, with alpha support. Runs in your browser and shows the live swatch for each format.
- Accessibility Color Contrast Checker — Check foreground and background colour contrast against WCAG thresholds, with the rules for text size, UI components and states.
- Typography Scale Generator — Generate a modular type scale from a base size and ratio, with fluid clamp() values for responsive layouts.
- Design Token Generator — Generate design tokens as CSS variables, JSON or platform formats, structured in the layers that make them maintainable.
Frequently Asked Questions
Why does my page print with a dark background?
Because browsers do not print background colours by default, to save ink. That usually helps and it means light text on a dark background prints as light text on white, which is invisible. Set explicit print colours rather than relying on the screen ones.
How do I stop a table splitting across pages?
break-inside: avoid on the row keeps each row whole. Repeating the header on each page needs the header inside a thead element, which browsers then repeat automatically.
What are orphans and widows?
Orphans are lines left alone at the bottom of a page and widows are lines carried alone to the top of the next. Setting both to two or three stops a paragraph being broken in a way that looks like a mistake.
Should I print link URLs?
For links in content, yes, since the destination is otherwise lost on paper. Not for navigation, and not for internal anchors, where the address is clutter. Scope the rule to your article container.
How do I test a print stylesheet?
The print preview dialogue, and the print media emulation in browser developer tools, which lets you inspect while the print styles apply. Testing by actually printing is slow enough that it usually does not happen.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Choose what to hide and how to handle links to generate a print stylesheet.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
Color Converter
DesignConvert colours between HEX, RGB, HSL, HWB and OKLCH, with alpha support. Runs in your browser and shows the live swatch for each format.
Accessibility Color Contrast Checker
DesignCheck foreground and background colour contrast against WCAG thresholds, with the rules for text size, UI components and states.
Typography Scale Generator
DesignGenerate a modular type scale from a base size and ratio, with fluid clamp() values for responsive layouts.