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

The dependable way to turn a URL into a PDF is to render the page in a browser engine, then save the rendered page as PDF. You can either call a managed HTML-to-PDF endpoint—such as Adobe PDF Services or Cloudflare Browser Run—or run Playwright yourself and use page.pdf(). The right choice depends on how much control and infrastructure you want to operate.

Choose between a managed API and your own browser

Both approaches perform the same essential work: they load the URL, execute the page, apply rendering rules, and generate a PDF. The difference is who runs the browser.

Approach What you send What you operate Best fit
Managed PDF API A URL, or sometimes custom HTML Your request code, authentication, and response handling Applications that want a service endpoint without maintaining browsers
Playwright A URL loaded in a browser page Browser binaries, runtime capacity, navigation failures, and scaling Teams needing browser-level rendering control or an existing automation stack

Pricing, quotas, regions, request limits, and service guarantees vary by provider and change over time. Check the selected provider’s current documentation before committing to production use.

Convert a URL to PDF with Playwright

Playwright’s page.pdf() returns a PDF buffer. PDF generation uses print CSS media by default, so the output may differ from what visitors see on screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
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

1. Install Playwright

npm install playwright
npx playwright install chromium

2. Load the URL and write the PDF

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();

  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  const pdf = await page.pdf({
    path: 'page.pdf',
    format: 'A4',
    printBackground: true
  });

  await browser.close();
})();

format: 'A4' selects a documented page-size format; Playwright also documents Letter and explicit width and height values.

3. Use screen styles when print CSS is wrong

await page.emulateMedia({ media: 'screen' });
await page.pdf({ path: 'screen-styled.pdf', format: 'A4', printBackground: true });

Call emulateMedia before page.pdf() when the PDF should follow screen media rather than the default print media. Use explicit dimensions or a paper format when downstream printing or page-layout consistency matters.

Rank #2
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

4. Make navigation and output predictable

  • Set a navigation timeout appropriate for the sites you process.
  • Wait for a selector or an application-specific ready signal when network idle is not enough.
  • Use a fixed viewport and timezone if layout depends on them.
  • Handle redirects, authentication, consent dialogs, bot checks, and pages that never finish loading.
  • Close the browser in a finally block in production code so failures do not leak processes.

Call a managed URL-to-PDF API

Adobe PDF Services

Adobe PDF Services documents creating PDFs from static or dynamic HTML, ZIP input, and a URL. Its REST HTML-to-PDF example uses an API-key header and a bearer-token header. Implement the exact request and response handling from Adobe’s current reference rather than mixing it with another provider’s format.

Cloudflare Browser Run

Cloudflare Browser Run documents a PDF endpoint that accepts either url or custom html; its documentation states, “You must provide either url or html.” REST calls require a token with Browser Rendering – Edit permission. Workers Bindings can call the endpoint without an API token.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
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)

What to verify before production

  • Whether the endpoint renders a public URL, authenticated pages, custom HTML, or all three.
  • How credentials, cookies, redirects, and client-side JavaScript are handled.
  • Paper sizes, margins, orientation, background graphics, page ranges, and print-versus-screen styling.
  • Timeout behavior, retry guidance, response size limits, quotas, regions, and current pricing.
  • Whether the response is returned synchronously or as an asynchronous job.

Common rendering problems

The PDF is blank or incomplete

The page may still be loading data when capture begins. Wait for a meaningful selector or application-ready state instead of relying only on a short delay. Also check that the target URL is reachable from the runtime and does not require an interactive login.

The layout looks different from the website

Print CSS is the default for Playwright PDFs. Emulate screen media when that is the intended appearance, and enable background printing when the design depends on colored backgrounds or images.

Rank #4
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning

Images or fonts are missing

Wait until the page has loaded the relevant resources, confirm that the runtime can reach their hosts, and check for cross-origin or consent behavior that prevents them from loading.

The page keeps timing out

Some pages maintain open connections indefinitely. Use a targeted readiness condition, set a bounded timeout, and decide whether a failed capture should be retried or reported to the caller.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
ScanSnap iX1300 Wireless or USB Double-Sided Color Document Scanner, Black
  • FITS SMALL SPACES AND STAYS OUT OF THE WAY. Innovative space-saving design to free up desk space, even when it's being used
  • SCAN DOCUMENTS, PHOTOS, CARDS, AND MORE. Handles most document types, including thick items and plastic cards. Exclusive QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • GREAT IMAGES EVERY TIME, NO EXPERIENCE REQUIRED. A single touch starts fast, up to 30ppm duplex scanning with automatic de-skew, color optimization, and blank page removal for outstanding results without driver setup
  • SCAN WHERE YOU WANT, WHEN YOU WANT. Connect with USB or Wi-Fi. Send to Mac, PC, mobile devices, and cloud services. Scan to Chromebook using the mobile app. Can be used without a computer
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. ScanSnap Home all-in-one software brings together all your favorite functions. Easily manage, edit, and use scanned data from documents, receipts, business cards, photos, and more
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is the first alternative to try when you want a URL-rendering API: it produces clean captures, bills only clean shots, and its paid plan starts at the lowest listed price.

One GET request can return a PNG, JPEG, WebP, or PDF. The service accepts the consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing result in X-Page-Verdict and X-Billed headers. An MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for PDF response options and the other capture controls. The 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.

Quick Recap

Bestseller No. 1
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

Practical decision checklist

  • Choose a managed endpoint if you want to avoid deploying and scaling browser workers.
  • Choose Playwright if you need browser-level control, custom automation, or an existing Playwright environment.
  • Choose URL input when the provider should fetch and render the page; choose HTML input when your application already owns the document.
  • Test representative pages containing JavaScript, lazy images, fonts, consent dialogs, and long scrolling content before selecting a production design.

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.