Document conversion guide
How to Convert HTML to PDF
The safest simple method is the browser print dialog. Automated server conversion is useful for repeatable documents, but it must treat remote pages and scripts as untrusted input.
The direct answer
Open the page or local HTML file in Chrome, press Ctrl+P on Windows/Linux or Command+P on Mac, choose Save as PDF, and review margins, background graphics, headers, and page breaks before saving.
Choose the route that matches your goal
| Your goal | Recommended route | Expected result |
|---|---|---|
| Save the page you can see | Use the browser print dialog and Save as PDF | PDF using the page print styles |
| Convert a local HTML file | Open the file in a browser, then print to PDF | Local conversion without upload |
| Generate PDFs repeatedly | Use headless Chromium in a controlled backend | Automated output with security work required |
Get a clean browser PDF
Web pages can define special print styles, so the PDF may differ from the screen view by design.
- 1
Load the page completely and expand any sections that should appear in the PDF.
- 2
Open Print, choose Save as PDF, then set paper size, orientation, scale, and margins.
- 3
Enable background graphics only when they carry useful content or branding.
- 4
Review every preview page for clipped tables, blank pages, missing fonts, and broken page breaks.
Important checks and limitations
Login state matters: A URL-only converter may not see content behind your login and should never ask for session cookies.
Remote HTML is untrusted: Server renderers need network isolation, timeouts, script controls, and protection against internal-address access.
Print CSS controls layout: Developers should test @media print rules instead of assuming the screen layout will paginate cleanly.
Frequently asked questions
Can Chrome save a web page as PDF for free?
Yes. On desktop, use the print dialog and select Save as PDF as the destination.
Why are backgrounds missing?
Browsers often omit background graphics in print mode. Enable the background graphics option when the design requires them.
