Render your template into complete HTML with its data first, then give that HTML or its URL to wkhtmltopdf. For JavaScript-generated content, choose how the renderer will know the page is ready: wait a fixed number of milliseconds, or have your page set a specific window.status value when its required content is available. A readiness signal is usually easier to reason about than guessing a delay.
The instructions below follow the wkhtmltopdf 0.12.6 usage manual. They do not guarantee that its older rendering engine can run every modern JavaScript application. The project maintainer recommends considering Puppeteer or a wrapper for sites that rely on dynamic JavaScript. wkhtmltopdf project status and recommendations
Prepare the template before converting it
wkhtmltopdf converts HTML to PDF; it does not populate your application template or fetch data for it. First have your application render a complete HTML document containing the data for the PDF. Check that output in a browser or inspect the generated file before troubleshooting the PDF. That separates template and data problems from rendering problems. The project’s basic workflow is to create the HTML document and pass it to the converter. wkhtmltopdf project overview
For example, your application might write invoice.html after filling in the customer, line items, totals and any server-rendered content. Convert that file with:
#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
wkhtmltopdf invoice.html invoice.pdf
The general form is wkhtmltopdf [options] input.html output.pdf. For a URL input, use the URL as the input argument. Confirm options against the installed binary’s own help: available features can differ between builds, including patched Qt and distribution builds. wkhtmltopdf 0.12.6 usage manual
Choose how to wait for JavaScript
The 0.12.6 manual says JavaScript is enabled by default and documents three useful controls: a fixed delay, a page-status signal and an injected script. Choose one based on how the page becomes ready rather than adding increasingly long waits without checking the cause of incomplete output.
Wait a fixed duration
Use --javascript-delay when the work has a predictable completion time. For example:
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.
wkhtmltopdf --javascript-delay 800 invoice.html invoice.pdf
Here, 800 is an example delay in milliseconds, not a recommended value for every page. The manual’s documented default is 200 ms. A delay that is too short can capture the page before content appears; an unnecessarily long delay increases render time for every document. Set and test a duration using the actual template and deployment environment. wkhtmltopdf 0.12.6 usage manual
Free tools Windows power users keep installed
One-click scans. No signup required.
Signal readiness with window.status
If you control the page, set window.status to a deliberate value once the content needed in the PDF is ready. Then ask the converter to wait for that exact value:
wkhtmltopdf --window-status pdf-ready invoice.html invoice.pdf
For example, page code can set window.status = 'pdf-ready' after it has received the required data and updated the document. Set the marker only after the content and any required assets are ready; setting it too early merely makes the converter stop waiting before the page is complete. This strategy ties capture to the page’s own readiness condition rather than a guessed elapsed time. The option is documented in the 0.12.6 manual. wkhtmltopdf 0.12.6 usage manual
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.
Run an additional script after page load
--run-script runs supplied JavaScript after page loading. It can help when you control the page and need an additional script, but it is not proof that a single-page application has finished its asynchronous work. In particular, page load and application readiness are not necessarily the same event. If the application can set its own readiness marker, prefer that explicit condition.
Do not treat slow-script handling as a general fix
The manual documents behavior for stopping slow scripts and an option to disable that behavior. Disabling it may allow a render to hang; it does not make an incompatible or endlessly running script complete correctly. Investigate the script and readiness condition before changing this safeguard. wkhtmltopdf 0.12.6 usage manual
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Make stylesheets, images and fonts available
Resources must resolve from the renderer’s process environment. If an HTML file uses relative paths, verify what those paths resolve to when the converter reads the file; a path that works in a browser opened from your development directory may not resolve in a service or container. Check the resulting PDF for missing styles, images and fonts as well as checking the source HTML.
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.
The manual documents local-file access controls. These include --disable-local-file-access, --allow for permitted paths, and --enable-local-file-access. When the document needs local assets, allow only the necessary directories where possible. Enabling broad access for convenience increases what a document can attempt to read, so it is not a safe default for untrusted input.
Set page size and print layout deliberately
A PDF that was successfully created can still paginate badly. The manual documents A4 as the default paper size, along with custom width and height, portrait or landscape orientation, margins, viewport size, print-media selection and image-quality options. Use these settings in combination with the template’s CSS and inspect page breaks, clipping and image scaling in the output.
- Paper size and dimensions: choose a standard paper size or set custom width and height when the document requires them.
- Orientation and margins: set portrait or landscape and adjust margins for the document’s content area.
- Viewport and print media: consider how viewport-dependent styles and print-specific CSS affect layout.
- Images: review image quality and scale in the PDF, especially when the page contains large or detailed graphics.
Use the installed binary’s help and the 0.12.6 manual to confirm exact option names and supported behavior for your build. wkhtmltopdf 0.12.6 usage manual
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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
Diagnose incomplete output before changing the template
When a PDF is blank or incomplete, identify whether the failure is in template data, page readiness, resource loading or layout. The manual documents JavaScript debug output and load-error handling; use those diagnostics and the converter’s output to narrow the cause instead of treating every symptom as a CSS problem.
- Dynamic text or charts are missing: inspect the generated HTML to ensure data was inserted. If the HTML is correct, check whether the content is added asynchronously and use a suitable delay or readiness marker.
- Some content appears, but late content does not: the capture may be happening before asynchronous work completes. Increase a fixed delay only if completion time is predictable; otherwise make the page signal readiness after the required update.
- Styles, images or fonts are absent: verify paths and accessibility from the renderer’s environment, then review local-file access settings and load errors.
- Elements are clipped or pages break awkwardly: check paper size, margins, orientation, viewport and print-media behavior alongside the template’s CSS.
- Rendering stalls on a script: inspect script behavior and the selected wait condition. Avoid disabling slow-script stopping as a blanket remedy, since that can leave the conversion hanging.
- An option is rejected or behaves differently in deployment: compare the deployment binary’s help and build with the one used locally. Patched Qt and distribution builds can differ.
Account for maintenance and input security
The wkhtmltopdf downloads page lists 0.12.6 as the stable series and dates that release June 11, 2020. Its status page says Qt 4 has been unsupported since 2015 and its WebKit had not been updated since 2012. These are lifecycle statements published by the project, not a guarantee about every downstream package; check the binary and environment you intend to deploy. wkhtmltopdf downloads and FAQ · wkhtmltopdf project status
Security is especially important when documents contain user-supplied HTML or JavaScript. The project warns not to use wkhtmltopdf with untrusted HTML unless user-supplied HTML and JavaScript are sanitized, and says the risk can include complete server takeover. Treat arbitrary content as hostile input. Sanitization and process isolation belong in the design, not as an afterthought; the status page suggests considering AppArmor or SELinux. wkhtmltopdf downloads and FAQ · wkhtmltopdf project status
When to choose another renderer
For sites that depend on dynamic JavaScript, the wkhtmltopdf maintainer says to consider Puppeteer or one of its wrappers. For reports generated from HTML the team controls, the status page also names WeasyPrint and commercial Prince as options to consider. These are the maintainer’s recommendations, not a feature-by-feature comparison or assurance of equivalent output. Evaluate alternatives against your actual JavaScript readiness needs, print-layout fidelity, security and isolation, maintenance, deployment dependencies and licensing. wkhtmltopdf project status and recommendations
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC 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 & 11Or skip the browser setup
If the goal is to capture a webpage as an image or PDF rather than generate a data-filled document from your own HTML template, ScreenshotNeo offers a website screenshot API. It is not a replacement for template rendering with wkhtmltopdf. A single GET request can capture a URL:
Quick Recap
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 API documentation for request options. Cookie banners are accepted and removed, along with known newsletter popups and chat widgets, before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits cost nothing, with verdict and billing information in response headers. An MCP server lets AI agents use take_screenshot, get_page_info and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. Learn about ScreenshotNeo, or sign up for 1,000 free screenshots a month with no card.
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.

