October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk8 min

Best Open-Source Tools to Convert a URL to PDF

Compare four open-source ways to convert a URL to PDF, from Gotenberg’s self-hosted Chromium endpoint to Playwright, WeasyPrint, and wkhtmltopdf.

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 self-hosted HTTP service that turns live, JavaScript-heavy web pages into PDFs, start with Gotenberg. Choose Playwright when PDF generation belongs inside browser-automation code, WeasyPrint for an HTML/CSS-oriented workflow that can fetch public URLs, and wkhtmltopdf when a simple headless CLI suits the page you need to convert. They use different rendering approaches, so none is a universal substitute for the others.

The right choice depends on whether the page needs JavaScript, login state, remote assets, or print-specific styles—and on whether you want an HTTP service, a browser API, or a command-line program. Test representative pages before committing to a tool.

As an Amazon Associate I earn from qualifying purchases.

Choose by integration and page behavior

Tool Best starting point Documented capabilities Check before choosing
Gotenberg A self-hosted HTTP service for URL-to-PDF conversion Docker-based API; Chromium-backed URL conversion; JavaScript and dynamic-content support; waits for a JavaScript expression or DOM selector. Dynamic content may not be ready when conversion begins. Configure a suitable wait and verify the page’s assets and session requirements.
Playwright PDF output integrated into browser automation and application code page.pdf() creates a PDF with print CSS media by default; supports PDF sizing and screen-media emulation. This is a browser automation API, not the documented drop-in Docker HTTP service offered by Gotenberg. Confirm whether print or screen styling is wanted.
WeasyPrint HTML/CSS rendering when fetching a public URL is useful Can read HTTP URLs and follow redirects; SVG images can remain vector in PDF output. Cookies and authentication are not supported by default. A custom URL fetcher may help for some workflows.
wkhtmltopdf A headless command-line conversion workflow Open-source LGPLv3 CLI using the Qt WebKit rendering engine to render HTML into PDF. The project page does not establish compatibility with modern dynamic sites. Validate the exact pages you need.

This is a fit comparison, not a speed ranking: there are no comparable benchmark results here. For Gotenberg details, see its URL conversion documentation and wait-for-expression guidance. Playwright documents PDF generation; WeasyPrint documents its API and URL fetching.

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

Convert a URL with Gotenberg

For a self-hosted endpoint backed by headless Chromium, Gotenberg is the most direct starting point in this comparison. Its URL route is POST /forms/chromium/convert/url. In a typical Docker setup, start the service using the current instructions in the installation guide, then send the URL as multipart form data:

#1 Best Overall
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
  • 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
curl --request POST 
  --url http://localhost:3000/forms/chromium/convert/url 
  --form 'url=https://example.com' 
  --output page.pdf

Replace https://example.com with the page to capture and adjust the host or port if your deployment differs. A successful request writes the returned PDF to page.pdf. The URL route does not accept file:// addresses; for local HTML, use Gotenberg’s HTML or Markdown conversion route instead. Consult its current endpoint documentation for available form fields and deployment-specific details.

Wait for dynamic content

A browser can load the initial document before scripts finish filling in charts, listings, or other content. Gotenberg warns that this can produce blank or incomplete dynamic sections. When possible, wait for a known JavaScript expression or DOM selector that indicates the content is ready. Its documentation describes expression- and selector-based waits and recommends explicit waits over a blind fixed delay. A delay is a fallback when the page offers no reliable readiness signal, not a guarantee that every asset has finished loading.

Use Playwright when PDF generation belongs in your code

Playwright is a good fit when your application already controls a browser session—for example, when it must navigate, authenticate, or interact with a page before saving a PDF. The following Node.js example uses Playwright’s Chromium browser API; install Playwright and its browser binaries according to the official setup guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  await page.pdf({ path: 'page.pdf', format: 'A4' });
  await browser.close();
})();

page.pdf() uses print CSS media by default. If the target should look like its on-screen version instead, emulate screen media before generating the PDF:

Rank #2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
  • 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.
await page.emulateMedia({ media: 'screen' });
await page.pdf({ path: 'page.pdf', format: 'A4' });

Use the API’s page-size, margin, and related PDF options to fit the document you need. If you use a fixed navigation or readiness condition, make it specific to the page: a generic network-idle wait is not proof that every application has finished its own asynchronous work. See the Playwright PDF API reference for options and behavior.

Use WeasyPrint for URL-based HTML and CSS rendering

WeasyPrint can load an HTTP URL, follow redirects, and render HTML and CSS into PDF. Its Python API can be used directly:

from weasyprint import HTML

HTML(url='https://example.com').write_pdf('page.pdf')

Install WeasyPrint using the platform-specific instructions in its installation guide. The result depends on the source page’s HTML, CSS, fonts, and assets; check whether its rendering model matches the page you are converting. The documentation notes that SVG images can remain vector in PDF output.

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

WeasyPrint’s default URL fetching does not support cookies or authentication. If a page requires a logged-in session, its documentation points to a custom URL fetcher as a possible route; verify that this can safely and correctly provide the required resources before relying on it. See the API reference for URL fetching behavior.

Rank #3
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
  • 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.

Use wkhtmltopdf for a headless CLI workflow

wkhtmltopdf is an open-source, LGPLv3 command-line tool that renders HTML to PDF using Qt WebKit without a display. After installing it for your platform, a basic conversion is:

wkhtmltopdf https://example.com page.pdf

That simple interface can suit straightforward conversions, but the project page alone does not establish how well it handles modern JavaScript or CSS on a particular site. Try a representative page—including its fonts, images, and dynamic sections—before using it for a production workflow. Project information and installation details are on the official site.

Test the page, not just the converter

Before settling on a tool, run the same representative pages through your intended workflow and inspect the resulting PDFs. Include the features that tend to change the result:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • JavaScript-rendered content: Check that charts, menus, or data loaded after the initial document appear. For Gotenberg, configure an explicit readiness wait where possible.
  • Authentication and cookies: Confirm the converter receives the same session or credentials the page requires. WeasyPrint’s defaults do not support cookies or authentication.
  • Remote resources: Inspect images, web fonts, and stylesheets; a page may look incomplete if these are unavailable when rendering occurs.
  • Print styling and page layout: Decide whether the PDF should use print CSS or screen styling. Playwright defaults to print media; it can emulate screen media before PDF generation.
  • Output suitability: Check page breaks, paper size, margins, and whether vector assets such as SVGs render as needed.

Troubleshoot common failures

The PDF is blank or missing page sections

Likely cause: Conversion started before the page’s scripts finished producing content, or required resources did not load. Try: wait for a page-specific selector or expression with Gotenberg; in Playwright, use an appropriate navigation and readiness condition. Then check remote fonts, images, and stylesheets in the output.

Rank #4
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
  • 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.

A local file URL is rejected by Gotenberg

Cause: Its URL conversion route rejects file://. Fix: use the HTML or Markdown route for local content, or make the intended page available through an HTTP URL accessible to the service.

A protected page redirects or renders as logged out

Likely cause: the converter does not have the browser’s login state or required credentials. Try: choose an integration that can provide the session the page needs, and validate access without exposing credentials. Do not assume WeasyPrint’s default URL fetcher will send cookies or authenticate.

The PDF looks different from the browser window

Likely cause: print styles are active, or the page’s print CSS changes layout. Playwright’s PDF generation uses print media by default. Fix: if screen styling is the goal, call page.emulateMedia({ media: 'screen' }) before page.pdf(); otherwise inspect and adjust the page’s print styles.

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

Images or fonts are missing

Likely cause: a remote resource was inaccessible, still loading, or dependent on a session. Try: verify the resource URL and access requirements, then repeat the conversion with an appropriate readiness condition. Check the generated PDF rather than assuming the HTML response alone confirms every asset rendered.

Best Value
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability, and cost considerations

The available project documentation does not provide a directly comparable speed test, so choose on integration and output requirements rather than an assumed performance ranking. A browser-backed workflow has to load the target page and its dependencies; if it starts before asynchronous content is ready, the result can be incomplete. Explicit readiness conditions help make that timing deliberate, but should match the site’s own behavior.

Operationally, a Docker-based HTTP service such as Gotenberg gives an application a conversion endpoint to call; Playwright places browser control in application code; WeasyPrint and wkhtmltopdf offer rendering libraries or a CLI-oriented workflow. Plan for the target page’s access requirements and validate the resulting PDF as part of your own process. The sources cited here do not establish comparative hosting costs, throughput, or service-level reliability.

Or skip the browser setup

If you want a one-call screenshot or PDF endpoint instead of maintaining a browser conversion workflow, ScreenshotNeo accepts a URL and returns an image or PDF. Its API supports PDF options such as paper size, margins, landscape, and page ranges. The request below follows the documented cURL format; replace the example target URL with yours. See the API documentation for parameters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with the page verdict and billing status reported in response headers. Its MCP server provides screenshot and PDF tools for AI agents, and 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’s free plan to try 1,000 screenshots a month with no card.

Frequently Asked Questions

Can Gotenberg convert a local file with its URL endpoint?

No. The URL route rejects file://; use its HTML or Markdown conversion route for local content.

Does Playwright make PDFs with screen styles by default?

No. page.pdf() uses print CSS media by default; emulate screen media before generating the PDF if that is the intended appearance.

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.

Can WeasyPrint fetch a page that requires login?

Not with its default cookie and authentication behavior. A custom URL fetcher may help, but the session handling must be configured and validated.

Quick Recap

Bestseller No. 1
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
Convert your PDF files into Word, Excel & Co. the easy way; Convert scanned documents thanks to our new 2022 OCR technology
Bestseller No. 2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Convert over 50 document file formats.; Preview your files from Doxillion before converting them.
Bestseller No. 3
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$99.99
Bestseller No. 4
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
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.
$99.99
Bestseller No. 5
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
$29.99

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.