Recommended Free Tools
A blank PDF from a JavaScript-driven site usually means wkhtmltopdf printed before the page was ready, could not load or run something the page needs, or encountered a browser feature its Qt WebKit engine does not support. Start by checking the exact command, JavaScript errors, and resource access; then use a readiness signal rather than relying on an arbitrarily long delay. If the page still fails after those checks, render it with a modern browser engine such as Playwright.
Why JavaScript pages can come out blank
wkhtmltopdf converts HTML to PDF using Qt WebKit. JavaScript is enabled by default, but the documented --javascript-delay is only 200 milliseconds by default. That is a timer, not a guarantee that a single-page application has fetched data, mounted its content, or finished drawing.
As an Amazon Associate I earn from qualifying purchases.
A blank output does not identify its own cause. The HTML may be empty, a script may have failed, an API or asset may be unreachable from the machine running wkhtmltopdf, a redirect or cookie requirement may block the page, or the installed WebKit build may not support a browser feature the site requires. Diagnose the actual failure before changing flags.
Diagnose the failure in order
1. Capture the exact environment and command
Record the complete command, the output of wkhtmltopdf --version, the operating system and version, and a small reproducible HTML/JavaScript example if possible. These details help distinguish a site-specific issue from a build or environment issue; the project asks for version, OS, and a detailed test case when reporting problems.
#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
2. Check that JavaScript is enabled and inspect errors
JavaScript is on by default, but confirm your command or wrapper has not disabled it. Add --debug-javascript and inspect standard error for script errors or other clues. A script error can prevent the application from inserting the content that the PDF is expected to contain.
3. Verify the page and its dependencies from the rendering machine
Check that the page’s main content exists in the HTML or DOM and that the renderer can access everything needed to display it. This includes scripts, stylesheets, fonts, images, API endpoints, cookies, and redirects. A URL that works in your desktop browser may behave differently in the server environment where wkhtmltopdf runs.
4. Wait for meaningful readiness, not just elapsed time
If content appears after a known delay, test a modestly longer delay in milliseconds:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #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.
wkhtmltopdf --javascript-delay 1000 https://example.com output.pdf
Replace the example URL and output filename with yours. The manual documents --javascript-delay as waiting for JavaScript to finish, with a default of 200 milliseconds, but it remains a time-based wait. A longer timer can help when content is merely late; it cannot fix an incompatible script, blocked request, or page that never reaches its intended state.
When you control the page, a more reliable option is to set window.status to a known value only after the content needed in the PDF is ready, then wait for that value:
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
- 1 Year License for 1 Windows & 2 Mobile (Android and/or iOS) devices.
wkhtmltopdf --window-status pdf-ready https://example.com output.pdf
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The application must actually set window.status = 'pdf-ready' when its content is ready. This flag is a documented wait mechanism, not a guarantee that every resource or layout is correct.
5. Do not treat ignored load errors as a repair
--load-error-handling ignore changes how load failures are handled; it does not make a failed page render successfully. Suppressing an error can still leave you with an empty document. Find the failed request or script instead.
Rank #4
- Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
- EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
- READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
- CREATE, COMBINE, SCAN and COMPRESS PDFs.
- FILL forms & Digitally Sign PDFs. Work with Digital certificates
When to switch to a modern browser renderer
The wkhtmltopdf project status account discusses the age of its WebKit1 foundation as historical context; it is not, by itself, a formal current end-of-life notice. If the page depends on browser APIs or JavaScript behavior unsupported by the Qt WebKit build you have, repeatedly increasing the delay is unlikely to solve the compatibility problem.
Move to a Chromium-based renderer when the page needs features absent from the installed engine, or when the same reproducible page remains blank after you have confirmed that resources load and the readiness condition is reached. Playwright’s page.pdf() can wait for a page-specific selector or condition before generating a PDF. Its documentation cautions against using networkidle as a general readiness test; assert the actual state your page needs instead. Playwright uses print CSS by default for PDF output, so verify print styles, headers and footers, fonts, and page breaks against the intended result. The available source documentation establishes these capabilities but provides no comparative benchmark results.
Or skip the browser setup
If your need is a screenshot rather than a scripted local PDF workflow, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. Its capture can accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before taking the shot; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.
For a PDF response, make a GET request to the API endpoint and use the documented PDF options as needed. The API parameter names used by other screenshot APIs also work, which can make switching easier. See the ScreenshotNeo documentation for setup and options.
Best Value
- 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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The plans include 1,000 screenshots per month free with no card, then paid options starting at $5 for 3,000; every feature is on every plan. Sign up for free and get 1,000 screenshots a month with no card.
Common failure symptoms and fixes
- Blank output despite a longer delay: Check JavaScript errors and failed dependencies, then verify the page’s actual ready state. A historical issue reports a blank white page even after increasing the delay, so a longer wait is not a universal fix.
- It works locally but not on the server: Check server-side access to the page’s assets and APIs, along with cookies, redirects, and authentication requirements.
- Output appears without expected content: Confirm that the content is in the DOM before printing and wait for an application-specific selector or status where possible.
- Ignoring load errors changes nothing: Restore useful error reporting and identify the failed resource; suppressing a load error does not supply missing content.
- The page relies on newer browser features: Confirm compatibility with the installed Qt WebKit build. If the feature is unsupported, use a modern browser renderer rather than tuning a timer.
What to include in a reproducible bug report
- The exact
wkhtmltopdf --versionoutput and operating system/version. - The full command and whether it runs locally, in a container, or on a server.
- A minimal page or test case that reproduces the blank output.
- Relevant standard-error output from
--debug-javascriptand details of resources that fail to load. - The readiness mechanism and delay used, if any.
Frequently Asked Questions
Does wkhtmltopdf enable JavaScript by default?
Yes. Its documented command-line options enable JavaScript by default; check that your command or wrapper has not disabled it.
Does a blank PDF prove that a JavaScript delay is too short?
No. It can also result from script errors, inaccessible dependencies, redirects or cookies, or unsupported browser features.
Should I use networkidle as the PDF readiness condition in Playwright?
Playwright’s documentation discourages treating network idle as a general readiness signal. Wait for or assert the page state that matters to your output.
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.




