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 desk4 min

How to Capture JavaScript-Rendered Pages with wkhtmltoimage

Leave JavaScript enabled, wait for client-side rendering with --javascript-delay, or test a window.status readiness signal when you control the page.

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.

To capture a JavaScript-rendered page with wkhtmltoimage, leave JavaScript enabled and give the page time to render before the screenshot is taken. Start with --javascript-delay; if you control the page, you can also test --window-status as a readiness signal. Neither option guarantees that every page will finish rendering, so verify the output using the exact installed build and target page.

Capture a page after JavaScript renders

Check which executable you are running, then use a delay long enough for the page’s client-side content to appear:

wkhtmltoimage --version
wkhtmltoimage --javascript-delay 2000 https://example.com/page capture.png

Replace the URL with the page you want and capture.png with your desired output filename. The command-line documentation says JavaScript is enabled by default, so do not pass --disable-javascript for this workflow. The documented default JavaScript delay is 200 ms; that is not a guarantee that an application with asynchronous rendering will be ready in that time. See the wkhtmltoimage command-line documentation.

Choose a delay or a page readiness signal

Use a fixed delay when you cannot change the page

--javascript-delay waits the specified number of milliseconds before capture. Increase it if the page’s content appears late, then inspect the image. A longer delay may reduce premature captures but adds time to every capture; too short a delay can still produce an incomplete image. It cannot fix JavaScript errors, inaccessible resources, authentication failures, or browser-feature incompatibilities.

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

Use window.status when you control the page

If you can modify the page, set window.status to a known string only after the content you need is ready. Then ask wkhtmltoimage to wait for that exact value:

wkhtmltoimage --window-status ready https://example.com/page capture.png

The documented behavior is to wait until window.status equals the supplied string. The signal must actually be set, and the value must match exactly. If the page never sets it, capture may wait indefinitely in some environments. Historical issue reports also describe variable behavior, so test this with your own executable rather than treating it as a portable guarantee. See issue #2217.

Do not assume the options race or impose a timeout

Reports differ on how --javascript-delay and --window-status interact when combined. An archived issue records an observed case in which the combination appeared to wait longer, while other reports describe unexpected waiting or ignored signals. The documentation does not establish a universal “whichever comes first” rule or a dependable timeout for the combination. Validate the behavior on the installed build; consult issue #2616 for the reported interaction.

Diagnose an incomplete capture

  1. Confirm the executable and version. Run wkhtmltoimage --version. Different distributions may package different builds, so record the version and package provenance when comparing results.
  2. Check that JavaScript is enabled. It is enabled by default according to the command-line documentation; remove any --disable-javascript option.
  3. Adjust the delay. Try a longer --javascript-delay, then compare the resulting image. Do not treat the documented 200 ms default as sufficient for every page.
  4. Check the page signal if using one. Confirm the page sets window.status to the exact string passed to --window-status, after the target content is ready.
  5. Look for script or loading failures. Use --debug-javascript to help diagnose script errors. A delay will not repair failed scripts or blocked resources.
  6. Reduce the case. Try a minimal page and the same installed binary. This helps distinguish a page-specific problem from a behavior of the packaged build.
  7. Switch renderers if needed. If the page relies on browser behavior your installed build cannot reproduce, use a current browser-automation renderer and verify that it supports the features the page needs.

The upstream wkhtmltopdf repository was archived in January 2023. Its documentation and issue tracker remain useful for understanding the options, but they do not promise ongoing upstream fixes. Historical reports include a wait-option regression with a fix associated with milestone 0.12.2.1; they are evidence of version-dependent behavior, not proof that the switches always fail. See the archived project repository and issue #2142.

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

Or skip the browser setup

If you need a screenshot without managing a local rendering binary, ScreenshotNeo returns a screenshot or PDF from one GET request. For example, this cURL command saves a WebP image:

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

See the ScreenshotNeo API documentation for authentication and request options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up for 1,000 free screenshots a month, with no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Is JavaScript enabled by default in wkhtmltoimage?

Yes. The command-line documentation says it is enabled by default; avoid passing --disable-javascript when capturing client-rendered content.

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

What does –window-status wait for?

It waits for window.status to equal the supplied string. The page must set that exact value, and behavior should be checked with the installed build.

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. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.