Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fastest answer: paste your HTML into an editor that renders it, open the result in Chrome, press Ctrl+P (Windows/Linux) or Command+P (Mac), choose Save as PDF, set the paper and layout options, and save. If you need to submit raw HTML to a service or automate repeatable conversions, use an authenticated HTML-to-PDF API instead.

Choose the right conversion method

“Convert pasted HTML” can mean two different workflows:

  • Render, then print: you paste or save the markup, view the finished page, and let the browser print the rendered result. This is the simplest no-install approach.
  • Submit raw markup: an online service receives the HTML string and creates a PDF on its server. This is better for scripts, scheduled jobs, and HTML that is not hosted at a public URL.

Use browser printing for a one-off document. Use an API when you need consistent settings, server-side rendering, callbacks, or many conversions. For confidential HTML, check retention and processing terms before uploading it.

Method 1: paste HTML, render it, and save from Chrome

  1. Create a rendered page. Put the code in a file ending in .html, open it locally, or use an online HTML editor with a live preview. Pasting into a plain text box and printing that box will produce text, not the designed page.
  2. Open the preview in Chrome. Confirm that images, fonts, charts, tables, and JavaScript-generated sections have finished loading.
  3. Open print preview. Select File > Print, or press Ctrl+P on Windows/Linux or Command+P on Mac. Google’s desktop instructions describe this flow in its Chrome print help.
  4. Choose the PDF destination. Select Save as PDF (the exact label can vary by operating system), then choose paper size, orientation, margins, scale, and whether background graphics should print.
  5. Save and inspect. Open the PDF and check page breaks, clipped tables, missing fonts, image quality, headers, and footers before sending it.

Android Chrome

Open the rendered page, tap More > Share > Print, choose Save as PDF, select a location, and tap Print. The Android-specific path is documented in Google’s Chrome help.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

A small local example

Save this as invoice.html, open it in Chrome, and print the page:

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Invoice</title>
  <style>
    @page { size: A4; margin: 16mm; }
    @media print {
      .screen-only { display: none; }
      .avoid-break { break-inside: avoid; }
    }
    body { font: 14px/1.5 Arial, sans-serif; color: #222; }
    table { width: 100%; border-collapse: collapse; }
    th, td { border: 1px solid #bbb; padding: 6px; text-align: left; }
  </style>
</head>
<body>
  <h1>Invoice 1042</h1>
  <p>Prepared for Example Co.</p>
  <table class="avoid-break">
    <tr><th>Item</th><th>Amount</th></tr>
    <tr><td>Consulting</td><td>$500</td></tr>
  </table>
  <p class="screen-only">This note is hidden when printing.</p>
</body>
</html>

Make CSS, images, and dynamic content survive PDF conversion

Use print-specific CSS

Browsers may apply print media rules rather than your screen design. Put print overrides in @media print and define page geometry with @page. Hide navigation and controls, set readable colors, and avoid placing important content only in a background image. For cards, code blocks, and table rows that should stay together, try break-inside: avoid; no rule can prevent every break when an element is taller than a page.

Set page size, margins, and scale deliberately

Choose A4 or Letter to match the recipient’s region, then set portrait or landscape. Excessive browser scaling can make text tiny or clip wide tables. If a table is wider than the printable area, reduce its width, switch to landscape, or use a smaller print scale and test the result.

Make external assets reachable

Remote converters must be able to fetch every stylesheet, image, font, and script. A local file:// path, an expiring URL, authentication wall, mixed-content restriction, or cross-origin policy can leave blank boxes or fallback fonts. Use stable HTTPS asset URLs and wait until fonts and images have loaded before printing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

Wait for JavaScript and lazy loading

Charts, totals, and lazy images may not exist when conversion starts. In a browser, wait for the page to finish rendering and scroll through lazy sections if necessary. In an API, use the provider’s delay, selector-wait, or network-idle option where available. Capture a representative long page, not only the first screen.

Method 2: send raw pasted HTML to an online API

Some hosted converters accept an html field containing markup, rather than requiring a public URL. For example, HTML2PDF.app’s documentation describes authenticated POST requests with raw HTML or a URL and a binary PDF response. HTML2PDF.co.uk’s API documentation describes URL-encoded HTML plus page size, orientation, margins, print or screen CSS media, and waiting for lazy-loaded content.

A generic JSON payload looks like this:

{
  "html": "<article><h1>Invoice</h1><p>Hello</p></article>"
}

The endpoint, authentication header, request encoding, file limits, retention, and pricing differ by provider. Read the provider’s current documentation and write the successful binary response to a .pdf file. Never put an API key in browser JavaScript, a public repository, or a client-side template; HTML2PDF.app explicitly warns against exposing credentials in those locations.

What to compare before choosing a hosted converter

Question Why it matters
Can it accept raw HTML? Determines whether you can paste markup directly or must publish a URL.
CSS and JavaScript fidelity Controls whether modern layouts, charts, and scripts resemble the browser.
Print-media support Lets your @media print rules control the output.
Page geometry Look for paper size, margins, orientation, headers, footers, and page ranges.
Assets and fonts Check HTTPS fetching, authentication, external font support, and lazy images.
Privacy and retention Important when markup contains personal data, credentials, or proprietary content.
Limits and authentication Confirm maximum HTML size, pages, rate limits, API-key handling, and binary responses.

Or skip the browser setup

ScreenshotNeo can capture a rendered page as a PDF through one request. It accepts cookies and consent banners like a visitor, removes more than 60 known consent platforms plus newsletter popups and chat widgets before capture, and reports whether a response was a clean page, cache hit, or failure. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a public or authenticated page containing your rendered HTML, use the PDF endpoint documented at ScreenshotNeo’s documentation:

Rank #3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
  • STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
  • CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
  • HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
  • FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
  • BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The call above follows the supplied request shape; configure the service’s PDF output options for your workflow. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Its Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.

Automation alternatives inside your own application

Browser-side JavaScript

html2pdf.js documents a browser-only pipeline that accepts an HTML string or element and runs .from(...).to(...).save(). It avoids uploading the document to a hosted service, but output remains subject to the browser’s rendering, asset-loading, and page-break limits.

Python

xhtml2pdf’s quickstart documents pisa.CreatePDF(html_source, dest=...) for writing an HTML string to a file or in-memory buffer, plus a command-line interface. Test your CSS carefully because a library’s supported HTML and CSS subset may differ from Chromium.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ScreenshotNeo from Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

ScreenshotNeo from Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Keep the key in a server-side environment variable and check the HTTP status and response headers before treating the body as a valid document.

Rank #4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
  • IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
  • IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
  • IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
  • Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common PDF problems

The PDF contains raw tags or plain text

You printed the editor’s source box rather than its rendered preview. Open the HTML as a page, or submit the markup through an API’s raw-HTML field.

CSS disappeared

Confirm that stylesheets loaded, enable background graphics when the design requires them, and check whether print media rules intentionally override screen styles. Inline critical print CSS if a remote stylesheet is unreliable.

Images or fonts are missing

Verify HTTPS URLs, permissions, certificate validity, and that the resources finish loading. Replace expiring or private links with authorized server-side fetching where the converter supports it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Charts or totals are blank

The conversion started before JavaScript completed. Wait for a known selector, network idle, or a fixed delay, and make sure scripts are allowed to run.

Best Value
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Pages break in awkward places

Use print CSS, break-before, break-after, and break-inside; repeat table headers with print-friendly table markup; reduce oversized blocks; and inspect both portrait and landscape output.

The API returns an error instead of a PDF

Check authentication, URL encoding, required fields, content size, rate limits, and response status. Log headers and a short error body, but never log secrets or confidential HTML. A successful binary response should be saved as PDF rather than decoded as JSON.

Security, privacy, and reliability checklist

  • Remove API keys, passwords, tokens, and embedded secrets from pasted source.
  • Use a server-side job for proprietary or personal HTML and review retention terms.
  • Pin or validate external asset domains if your workflow handles untrusted markup.
  • Test a long page, a slow page, missing assets, a JavaScript-heavy page, and a wide table.
  • Keep the original HTML and record the conversion settings so a result can be reproduced.
  • For recurring jobs, add timeouts, retries with backoff, status logging, and validation that the response is actually a PDF.

Which method should you use?

Need Best fit
One document, no setup Render in Chrome and use Save as PDF.
Raw HTML must stay off a public URL An authenticated hosted converter that accepts an html field.
Client-only workflow html2pdf.js, accepting browser rendering limits.
Python application xhtml2pdf when its supported CSS is sufficient, or a server-side browser/API for higher fidelity.
Repeatable page capture, PDF options, or AI-agent control ScreenshotNeo, with cookie and popup cleanup, no billing for failed or blank captures, and MCP tools.

Frequently Asked Questions

Can I convert HTML that is only pasted into a text box?

Only if the tool renders that text as HTML or offers a raw-HTML conversion field. Printing a source-code text box produces the markup itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should I choose print CSS or screen CSS?

Use print CSS for documents intended for paper or PDF; screen CSS is useful when you deliberately want the on-screen layout.

Is a hosted converter safe for private HTML?

It depends on the provider’s security and retention terms. Remove secrets, keep credentials server-side, and choose a provider whose handling matches the document’s sensitivity.

Why does a browser PDF differ from an API PDF?

They may use different rendering engines, fonts, media modes, viewport sizes, script-wait rules, and asset permissions. Match those settings and test the actual output.

Quick Recap

Bestseller No. 3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer; This product is not intended for scanning photographs on photo paper / photographic media
$184.00
Bestseller No. 4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
Find our Software here : irislink.com/start; IRIScan Express is only compatible Windows platform and not macintosh
$129.00
Bestseller No. 5
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Scanner type: Document; Connectivity technology: USB; With Auto Scan Mode, the scanner automatically detects what you're scanning
$75.00

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.