ScreenshotNeo

BlogHow-to

How to Convert a Firefox HTML Document to PDF Online for Free

Save any Firefox HTML document as a PDF for free using print preview, then learn when an online capture API is a better fit.

By the ScreenshotNeo team1 October 20267 min read

How to Convert a Firefox HTML Document to PDF Online for Free

Fastest answer: open the HTML file or web page in Firefox, choose Menu → Print…, select Save to PDF as the destination, adjust the page settings, and click Print. Firefox performs this conversion locally, so you do not need to upload the document to an online converter.

Mozilla documents this workflow in its Firefox printing guide. The steps below cover local conversion, cleaner layouts, difficult pages, privacy, and an online API option when you need automation or batch processing.

Convert a Firefox HTML document to PDF

  1. Open the .html file or web page in Firefox.
  2. Open the application menu and choose Print…. Firefox opens print preview.
  3. In Destination, select Save to PDF.
  4. Choose the required pages, orientation, color mode, paper size, scale, margins, headers, footers, and background graphics.
  5. Click Print, then choose the PDF filename and folder.

Preview every page before saving. Web layouts can reflow during printing, so a page that looks correct on screen may break differently on paper. Mozilla describes this behavior and the available print controls in its print documentation.

Firefox’s local print preview turns an HTML document into a PDF without uploading the file.
Firefox’s local print preview turns an HTML document into a PDF without uploading the file.
Goal Settings to try
Readable article Original format, A4 or Letter, scale near 100%, moderate margins, headers and footers off
Fewer pages Reduce scale slightly and check page breaks in the preview
Landscape table Landscape orientation, wider paper if available, and smaller margins
Selected section Enter a page range instead of printing every page
Color design Enable background graphics when the design depends on them
Ink-saving copy Disable background graphics and use a simplified layout where available

Use Firefox Simplified format for a cleaner PDF

Firefox may offer Original and Simplified formats in print preview. Mozilla describes Simplified as a clutter-reduction mode for article-like pages. It can remove navigation, advertisements, buttons, and background imagery. Choose it when the document is mainly text and you want a reading copy.

Choose Original when the HTML’s visual design, tables, diagrams, or background graphics are important. Simplified mode can remove elements that are part of the meaning of a page.

Checklist before saving

  • Confirm the title and main content appear in the preview.
  • Check that tables do not run beyond the page edge.
  • Look for headings stranded at the bottom of a page.
  • Verify images and background colors are present when required.
  • Check the page count and selected page range.
  • Choose a filename that identifies the source and date.

Convert a local HTML file without uploading it

The Firefox print-to-PDF workflow is local. The HTML file can remain on your computer, which is useful for private documents, internal reports, or files containing personal information. An online converter requires sending the file or its contents to an external service, so use one only when that trade-off is acceptable.

If Firefox cannot open the file, drag it into a new tab or use Ctrl+O on Windows/Linux or Cmd+O on macOS. Confirm that the file ends in .html and that linked CSS, fonts, and images use paths that still work from the file’s location.

Fix messy pages before printing

Try Simplified format first. If the page still contains an overlay, close it before opening print preview. Mozilla also points to Firefox Add-ons such as Print Edit WE when a page needs editing before printing.

Missing styles or images

  • Wait for the page to finish loading before opening print preview.
  • Reload the page and check the browser console for blocked resources.
  • For a local file, keep its CSS, image, and font paths valid relative to the HTML file.
  • Enable background graphics if the design relies on CSS backgrounds.

Long pages and unexpected page breaks

Set the destination paper size first, then adjust scale and margins. For very long documents, inspect page breaks throughout the preview rather than checking only the first page. Saving a smaller page range can help when you need one section.

When an online converter is worth considering

Firefox is usually the simplest free option for one document. An online or API-based converter becomes useful when you need repeatable automation, server-side processing, batch jobs, custom JavaScript, a fixed viewport, or a PDF generated from a URL rather than a file on your desktop.

Consideration Firefox print preview Online/API workflow
Privacy Local processing; no upload required The document or URL is sent to an external service
Layout control Print settings, scale, margins, and format choices May offer viewport, CSS, JavaScript, paper, and margin controls
Batch support Generally one document at a time Automation and batch requests are possible
Editing Firefox can annotate saved PDFs Usually focused on conversion and delivery
Cost Included with Firefox Depends on the provider and usage

Or skip the browser setup

ScreenshotNeo can capture a URL as a PDF through one GET request. See the ScreenshotNeo API documentation for the current option names. Replace the URL with your public HTML page.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://example.com/document.html \
  -d format=pdf \
  -o document.pdf

Python

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://example.com/document.html",
        "format": "pdf",
    },
    timeout=90,
)
r.raise_for_status()
open("document.pdf", "wb").write(r.content)

Node.js

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://example.com/document.html',
  format: 'pdf'
});

const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const file = Buffer.from(await res.arrayBuffer());
require('node:fs').writeFileSync('document.pdf', file);

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server lets Claude, Cursor, and other MCP clients use take_screenshot, get_page_info, and capture_pdf.

One thousand screenshots per month are free with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.

PDF options for automated captures

For automated PDF work, ScreenshotNeo supports paper size, margins, landscape orientation, and page ranges. It also supports custom CSS and JavaScript, waiting for a selector, a delay, or network idle, custom headers and cookies, user-agent and Authorization values, timezone and geolocation, request blocking, caching with a chosen TTL, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, and usage reporting. Use only the options your document needs so the capture remains predictable.

A capture service can remove common overlays before generating a clean document.
A capture service can remove common overlays before generating a clean document.

Private or authenticated pages

A local Firefox file can use local assets without leaving your device. A remote API must be able to reach the URL. For protected pages, configure the request with the supported authentication headers or cookies, and avoid placing secrets in a public URL. Confirm that the resulting PDF does not expose private data through images, links, or metadata.

Lazy-loaded content

Long pages may load images only as they approach the viewport. ScreenshotNeo supports full-page capture with lazy images loaded; for a page that still renders late, wait for a selector, add a delay, or wait for network idle before creating the PDF.

Troubleshooting

Problem Likely cause Fix
Save to PDF is not visible The print destination list is collapsed or a system printer is selected Open the Destination menu in Firefox print preview and select Save to PDF
Popup covers the preview Cookie consent, newsletter, or chat overlay Close it, use Simplified format, or edit the page before printing
Images are missing Images have not loaded, are blocked, or use broken local paths Wait and reload; check paths and resource permissions; enable backgrounds when needed
Text is cut off Content exceeds the printable width Use landscape orientation, reduce scale, or increase paper size
Only part of a page prints A page range is selected Choose all pages or enter the intended range explicitly
API returns an error Missing access key, invalid URL, or unsupported option Check the key, URL encoding, response status, and the current API documentation
Automated PDF is blank The page needs more time, requires authentication, or triggered a bot check Wait for a selector or network idle, provide required headers/cookies, and inspect verdict headers
PDF differs from the browser view Print pagination and responsive CSS changed the layout Set paper, orientation, margins, viewport, and print-specific CSS deliberately

Performance, reliability, and cost notes

  • Local Firefox: conversion speed depends on page size, fonts, images, and the computer running Firefox. Keeping the workflow local avoids upload time.
  • Remote conversion: network latency and page-load time affect completion. Set a client timeout long enough for heavy pages and handle non-success HTTP responses.
  • Repeat jobs: caching with a chosen TTL can avoid repeated captures when the source has not changed.
  • Dynamic pages: wait for a stable selector, a delay, or network idle before capture.
  • Billing: ScreenshotNeo bills clean shots only. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing; inspect X-Page-Verdict and X-Billed.
  • Batch work: use bulk capture for up to 100 URLs per call and asynchronous jobs with signed webhooks when a request should not remain open.

Editing the saved PDF in Firefox

Firefox’s PDF Editor can open the saved file and add text, drawings, images with alt text, signatures, highlights, and comments. Mozilla’s documentation explains that you can open the PDF, choose the Text or Draw tools, and download the file with the changes. See the Firefox PDF Editor guide.

FAQ

Is Firefox’s HTML-to-PDF conversion really free?

Yes. Save to PDF is part of Firefox’s print workflow and does not require an online converter account.

Does converting locally send my HTML to Mozilla?

The print-to-PDF operation runs in Firefox on your device. The file does not need to be uploaded to complete the conversion.

Should I choose Original or Simplified?

Use Simplified for a clean article-style reading copy. Use Original when the page’s design, tables, or graphics must remain intact.

Can I convert an HTML file that is not hosted online?

Yes. Open the local .html file in Firefox and print it to PDF. A remote API requires a URL it can reach.

When is an API better than Firefox?

Use an API for scheduled captures, server-side workflows, batch URLs, repeatable rendering settings, or agent-driven automation. Use Firefox when privacy and a one-off local conversion matter most.