What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
For a quick conversion, open the HTML in a browser and choose Print → Save as PDF. That usually keeps the work on your device and needs no extra software. If you have raw HTML text rather than a page already open in a browser, save it as an .html file first, then open and print it. For repeatable output, use a browser renderer such as Puppeteer; for a hosted service, check its privacy and retention terms before sending it your content.
Choose the right way to convert HTML to PDF
“HTML text” can mean either a webpage you want to save or a block of HTML source you want rendered as a document. The simplest route for both is a browser: open the page or save the source as an HTML file, then print to PDF. Other methods make sense when you need batch processing, a controlled layout, or an automated workflow.
| Method | Best for | Main trade-off |
|---|---|---|
| Browser print dialog | One-off pages and private content | Output depends on browser settings, loaded assets and the page’s print styles |
| Puppeteer | Automated generation in a JavaScript workflow | Requires a browser runtime and some care with loading, page breaks and assets |
| wkhtmltopdf | Local command-line or batch conversion where its renderer suits the HTML | Uses Qt WebKit; verify its compatibility with modern CSS and JavaScript |
| Hosted HTML-to-PDF service | Teams that want an online interface or API rather than operating a browser | HTML or page data goes to a third party; assess privacy, retention and service terms |
Convert HTML to PDF in a browser
Print a webpage
- Open the webpage in your browser and wait for its text, fonts and images to load.
- Open the browser’s Print command. In the print dialog, choose Save as PDF or the equivalent PDF destination.
- Review paper size, orientation, margins, scale and background graphics. These settings can change page breaks and whether colored backgrounds appear.
- Preview every page, then save the PDF.
If a page has a print-specific layout, the browser can use it automatically. For developers, MDN documents that window.print() opens the print dialog and waits for the document to finish loading if needed. It does not silently save a PDF: the user still chooses the destination and confirms the print operation.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Render a block of HTML text
Save the source as a file with an .html extension, preserving its tags and any required styles. Open that file in a browser, then use the same print steps. A minimal valid document looks like this:
#1 Best Overall
- Convert your PDF files into Word, Excel & Co. the easy way
- Convert scanned documents thanks to our new 2022 OCR technology
- Adjustable conversion settings
- No subscription! Lifetime license!
- Compatible with Windows 11, 10, 8.1, 7 - Internet connection required
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Document</title>
</head>
<body>
<h1>A printable document</h1>
<p>This text will be rendered as HTML before printing.</p>
</body>
</html>
Keep related images, stylesheets and fonts available at the paths the HTML references. A file that depends on remote resources may need an internet connection, and some remote content may be blocked or unavailable. For sensitive material, using a local file and the browser print dialog avoids uploading the HTML to an online converter, although externally hosted assets can still be requested by the browser.
Control page layout with print CSS
Screen layouts often include navigation, buttons, advertisements or interactive controls that do not belong in a document. Add a print stylesheet to hide them and define page dimensions. MDN documents @media print for styles applied when printing to paper or PDF and @page for page size, orientation and margins.
<style>
@media print {
nav, button, .screen-only { display: none !important; }
}
@page {
size: A4;
margin: 18mm;
}
</style>
Place the rules in the document’s stylesheet or a <style> element in its head. Adjust the selectors to match the source HTML: hiding a broad selector such as button may also hide a control that conveys important information. Check the browser’s print preview after changing the CSS. Browser-level print settings may still affect the final result.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems- Use
@media printfor print-only visibility, typography and layout changes. - Use
@pagefor paper size, orientation and margins. - Check the preview for clipped content, unexpected blank pages and awkward page breaks.
- Verify that images and fonts have loaded; missing assets can make the PDF differ from the page on screen.
Automate PDF generation with Puppeteer
Puppeteer’s Page.pdf() generates a PDF with the print CSS media type by default. If you need the screen layout instead, set page.emulateMediaType('screen') before creating the PDF. Its PDF options cover paper format, dimensions, margins, headers and footers, page ranges, background graphics, CSS page-size preference and tagged PDF output.
Install Puppeteer in a JavaScript project with npm install puppeteer. This complete example opens a page, waits for network activity and fonts, then writes an A4 PDF:
Rank #2
- Convert over 50 document file formats.
- Preview your files from Doxillion before converting them.
- Use batch conversion to convert thousands of files at once.
- Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
- Burn your converted or original files directly to disc.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.goto('https://example.com', {
waitUntil: 'networkidle2',
timeout: 60000
});
await page.evaluate(() => document.fonts.ready);
await page.pdf({
path: 'output.pdf',
format: 'A4',
printBackground: true,
preferCSSPageSize: true
});
} finally {
await browser.close();
}
})();
Save it as make-pdf.js and run node make-pdf.js. Replace the example URL with a page you are authorized to access. For a local HTML file, navigate to its file URL instead. networkidle2 waits for network activity to settle, but pages with persistent connections or ongoing requests may not reach that condition reliably. If needed, wait for a specific selector that indicates the page is ready, or use an explicit delay appropriate to the page. Inspect the generated PDF: successful rendering does not guarantee sensible page breaks or that every external asset loaded.
To match screen styling rather than print styling, add await page.emulateMediaType('screen'); before page.pdf(). Usually, print styling is preferable for a document; screen styling can preserve layouts that were not designed for paper.
Recommended Free Tools
Use wkhtmltopdf for local command-line conversion
wkhtmltopdf is an open-source, LGPLv3 command-line tool that renders HTML into PDF using the Qt WebKit engine. The project describes it as headless, so it can run without a display service. Once it is installed, a basic conversion is:
wkhtmltopdf input.html output.pdf
For a URL, use the URL as the input instead of input.html. This is convenient for scripts and batch jobs, but the renderer is based on Qt WebKit. Test representative pages before adopting it: modern CSS or JavaScript may behave differently from a current Chromium-based browser. Compare the output on pages that use the features your documents depend on.
Consider an online converter or hosted API
An online converter can avoid installing a renderer. HTMLPDF.dev documents a playground for pasting HTML, choosing paper size and margins, previewing and downloading a PDF. It also documents an API that accepts raw HTML or a public URL and uses Chromium rendering, with controls for headers, footers, page numbers, backgrounds, scale and print or screen media.
Rank #3
- EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
- READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
- CREATE, COMBINE, SCAN and COMPRESS PDFs
- FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
- LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.
Before uploading real content, check the provider’s current terms for data handling, retention, processing location, limits and pricing. Public product claims are not independent performance benchmarks; do not assume a particular conversion speed or availability without verifying it for your own use case. A hosted tool is a poor fit for confidential HTML unless its data practices meet your requirements.
How to choose and get reliable results
- For an occasional page: use the browser’s print dialog. It is the shortest path and can keep the conversion local.
- For recurring generation in JavaScript: use Puppeteer when a modern browser renderer and configurable PDF options matter.
- For an existing local CLI workflow: try wkhtmltopdf only after checking its rendering against your pages.
- For a hosted workflow: compare the provider’s supported inputs and controls, then review data handling before sending content.
For dependable output, use stable source HTML, wait for fonts and images, choose paper dimensions deliberately, and inspect page breaks. Repeatable conversion also means controlling inputs: a URL can change after you automate it, and remote assets can fail independently of the renderer. If the PDF is part of a business process, test with representative long pages, tables, images and unusual characters—not just a short sample.
Troubleshooting common conversion problems
The PDF is blank or missing part of the page
Check whether the HTML actually loaded and whether the content is inserted later by JavaScript. In a browser, wait for the page to finish rendering before printing. In Puppeteer, wait for a selector that appears only after the content is ready, and check for navigation or asset-loading errors. For file-based HTML, confirm that the file opens correctly in the browser before printing.
Images or fonts are missing
Verify each asset URL or relative file path and whether it can be reached from the rendering environment. A local file may refer to assets in the wrong folder; a hosted renderer may not be able to reach private or locally stored assets. Wait for fonts to load before capture, and check the PDF preview for substitutions.
Content is clipped or page breaks look wrong
Set the intended paper size and margins with @page or the renderer’s PDF options. Check both the page preview and the generated file. Wide tables and fixed-width elements are common causes of overflow; add print-specific CSS to reflow or resize them. A renderer change can also alter layout, so compare before switching engines.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
- Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
- Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
- Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
- Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
Colors, backgrounds or headers are absent
Browser print settings may omit background graphics. In Puppeteer, enable printBackground: true when backgrounds are needed. Headers and footers are separate PDF options in Puppeteer; confirm that the chosen renderer supports the header/footer treatment you need.
The automated job hangs or times out
Some pages keep network requests open, making a network-idle wait unsuitable. Prefer a page-specific readiness selector when possible, use a bounded timeout, and diagnose slow or unreachable remote assets. If a page requires authentication or has access restrictions, ensure the automation is authorized and configured for that environment.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It is useful when your HTML has been published at a URL and you need a rendered capture; it is not a drop-in converter for an arbitrary pasted HTML string. This cURL example captures a webpage as a WebP image, not a PDF:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for API details. ScreenshotNeo also supports PDF output and provides an MCP server with a capture_pdf tool; the sample above is specifically an image capture, so use the documentation or MCP option for a PDF workflow.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Cookie banners are accepted and more than 60 known consent platforms, newsletter popups and chat widgets are removed before capture; each step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing; responses identify the page verdict and whether the request was billed.
- An MCP server lets AI agents use screenshot and PDF capture tools.
- The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo free to get 1,000 screenshots a month with no card.
Best Value
- ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
- MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
- EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
- GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well
What to check before sharing the PDF
Open the saved file rather than relying only on the print preview. Confirm that all expected text is present, images are legible, page order is correct and nothing important was hidden by print CSS. If the document contains sensitive data, check that the output does not expose content that was meant to remain private, such as hidden UI elements or information included only in the source markup.
Frequently Asked Questions
Can I convert HTML text without installing a converter?
Yes. Save the HTML source as an .html file, open it in a browser, and use the browser’s print dialog to save a PDF.
Will an HTML-to-PDF conversion preserve selectable text?
Browser and browser-engine PDF output generally renders HTML text as document text, but verify the resulting file if searchability or accessibility is a requirement.
Can I use the screenshot API example above to make a PDF?
No. That specific cURL example saves a WebP screenshot. ScreenshotNeo also supports PDF output, and its MCP server includes capture_pdf; consult its documentation for those workflows.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

