DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Firefox Print to PDF and Print Settings: The Features Most Users Miss

Firefox's print functionality is one of the most improved areas in recent versions. The new print UI (Firefox 87+) has features many users don't know about.

The Print Preview UI

Press Ctrl+P. Firefox opens a print preview sidebar with live preview.

The preview updates in real-time as you change settings — you can see exactly how the page will print before committing.

Key controls:

  • Destination: Choose printer or "Save to PDF"
  • Pages: All, current, or specify page range (e.g., "1,3-5")
  • Orientation: Portrait or Landscape
  • Scale: Custom percentage, Fit to page width, Actual size
  • Pages per sheet: 1, 2, 4, 6, 9, or 16 pages per printed sheet
  • Margins: Default, None, Minimum, Custom (in mm or inches)
  • Print headers and footers: Date, page title, URL — toggle per-element
  • Print backgrounds: Whether to include CSS background colors and images

Print to PDF

Built-in PDF export: In the print dialog, change "Destination" to "Save to PDF." Firefox renders the page to PDF without requiring any external PDF printer.

The Firefox-generated PDF:

  • Includes clickable hyperlinks
  • Preserves text (searchable/copyable in the PDF)
  • Handles pagination (breaks at proper boundaries if you've set up CSS print styles)

From command line (headless):

firefox --headless --print-to-pdf output.pdf https://example.com
Enter fullscreen mode Exit fullscreen mode

Print CSS

Sites that care about printing implement CSS print styles (@media print). Firefox respects these:

  • Hiding navigation, sidebars, and footer ads for print
  • Adjusting font sizes and layout
  • Showing or hiding specific elements
  • Adding URL text after links

For developers: test your print styles with Firefox's Reader Mode toggled — many articles have excellent print styles when Reader Mode is active.

Forcing print styles: In DevTools → three-dot menu → More Tools → Rendering → Emulate media type = print. This applies print CSS styles to the live page view for development.

Reading Mode + Print

Firefox Reader View (Reader Mode) can dramatically improve print output for article pages:

  1. Click the Reader Mode icon (or F9)
  2. The page strips to content only
  3. Press Ctrl+P

The result: clean printed article without nav, ads, sidebars. Much better than printing the raw page.

Page Setup Options

Ctrl+P → "More settings" (expand) → shows:

Paper size: Letter, A4, A3, Legal, Tabloid, and custom sizes.

Print quality: Depends on your printer driver, but Firefox passes through the OS print dialog for printer-specific options.

Two-sided printing (duplex): Controlled by the OS print dialog after clicking "Print" in Firefox's preview. Firefox itself doesn't expose a duplex toggle — that's in the system print dialog.

About:config Settings for Print

print.print_bgcolor — Whether to print background colors by default. Set to true if you want backgrounds printed without having to toggle per-print.

print.print_bgimages — Whether to print background images by default.

print.print_headerfooter_* — Controls what shows in print headers and footers. Can be set via the UI or about:config:

  • print.print_headerleft: Left header (e.g., &T = page title)
  • print.print_headerright: Right header (e.g., &D = date)
  • print.print_footerleft: Left footer
  • print.print_footerright: Right footer

Format codes: &T = title, &U = URL, &D = date, &P = page number, &PT = page number / total pages.

Printing Selections

Select text on a page → right-click → "Print" (or Ctrl+P) → in the Pages section, choose "Selection." Firefox prints only the selected portion.

Custom Page Size for PDF

When saving to PDF, you can set a custom page size. Go to "More settings" → Paper Size → Custom → enter dimensions.

Useful for creating PDFs with non-standard dimensions (presentation slides, business card size, etc.).

Accessibility in Print

Firefox honors accessibility settings during print — text zoom, custom fonts, and high contrast settings affect the print output.

For users who need larger text in print: Set a custom scale in the print dialog, or apply a larger zoom level before printing.


Print-to-PDF from Firefox is genuinely good for creating clean, shareable versions of web pages. Combined with Reader Mode for articles, you get consistently clean output. The @media print CSS support means well-designed sites already print beautifully.

Top comments (0)