html2canvas is not taking a pixel screenshot of your browser. It walks a DOM subtree, reads the CSS properties it knows, and paints a new canvas. Unsupported or partially implemented properties can therefore vanish even when the live page looks perfect. The fix is to verify the computed styles and timing, isolate the failing property, work around unsupported CSS in the cloned document, and address origin or canvas-size limits.
This guide shows a repeatable diagnostic process, capture-only overrides, cross-origin fixes, full-page sizing, and when a real-browser screenshot is the better tool.
What html2canvas actually renders
The project documentation describes its output as DOM-based and says it may not be 100% accurate to the real representation. Every CSS property has to be implemented manually, so html2canvas cannot provide full CSS support. In practice, ordinary layout, dimensions and colors often survive while newer or complex effects do not.
That distinction explains the common symptom: the page is correct in Chrome or Firefox, but the canvas is missing a filter, transform, custom font, pseudo-element detail or other visual treatment. The library is reconstructing the appearance from DOM and computed styles; it is not asking the browser compositor for the already-rasterized pixels.
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 match#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Diagnose the mismatch before changing CSS
-
Confirm the element and its computed values
Run the capture in the same browser state as the user-visible page. Check that your selector points to the intended node, then inspect
getComputedStyle(element). A stylesheet that has not loaded, a media query evaluated at a different viewport, or a class added after your call can make the value different before html2canvas starts.const node = document.querySelector('.capture-target'); if (!node) throw new Error('capture target not found'); const style = getComputedStyle(node); console.log({ display: style.display, color: style.color, transform: style.transform, fontFamily: style.fontFamily }); -
Wait for the page to reach its intended state
html2canvas returns a Promise and runs in the browser. Call it only after stylesheets, web fonts, images and application data are ready. If a framework toggles a class or inserts content asynchronously, wait for that state rather than adding an arbitrary short delay.
await document.fonts.ready; await Promise.all([...document.images].map(img => img.complete ? Promise.resolve() : new Promise(resolve => { img.addEventListener('load', resolve, { once: true }); img.addEventListener('error', resolve, { once: true }); }))); const canvas = await html2canvas(node); -
Reduce the failure to one property
Copy the markup into a minimal test element with one declaration. If that declaration still fails in isolation, treat it as unsupported or incomplete and choose a supported equivalent or a capture-only fallback. A focused reproduction also gives you a precise issue to report instead of debugging an entire application at once.
-
Check origin boundaries
Remote images may be skipped or may taint the canvas.
useCORS: trueworks only when the image response includes an appropriateAccess-Control-Allow-Originheader. If the server cannot grant access, serve the image through a same-origin proxy.The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
-
Inspect iframes
Same-origin frames can be traversed. Cross-origin frames cannot be read, and a sandboxed frame without
allow-same-originis also inaccessible. You must capture content you control in the parent page, configure the frame’s origin policy, or capture the frame separately. -
Verify dimensions when output is blank or clipped
Large or scrollable elements need deliberate viewport dimensions. Browser canvas limits vary by platform, so a very tall page can exceed the maximum even when the DOM is valid.
Apply styles only during capture
Do not distort the live UI just to obtain an image. The configuration reference provides onclone, which receives a cloned document, and onCopyProperty, which lets you filter or replace individual properties while styles are copied.
const canvas = await html2canvas(node, {
onclone: (clonedDocument) => {
const target = clonedDocument.querySelector('.capture-target');
if (target) {
target.style.setProperty('filter', 'none');
target.style.setProperty('transform', 'none');
}
},
onCopyProperty: (property, style, target) => {
if (property === 'font-family') {
target.style.setProperty('font-family', 'Arial, sans-serif');
return true;
}
}
});
// Use the resulting canvas as usual.
document.body.appendChild(canvas);
Keep each override narrow. If removing a filter fixes the image, document that specific fallback; do not blanket-reset every style. For a custom font that is unavailable at capture time, substitute a known local stack. For a complex transform, render an equivalent layout without the transform in the clone. For effects that have no practical fallback, use a browser compositor screenshot instead.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Handle images, fonts and other remote assets
Images with CORS permission
When an image host sends Access-Control-Allow-Origin for your page, enable CORS and wait for the image before capture.
const canvas = await html2canvas(node, {
useCORS: true
});
Images without CORS permission
If the host does not grant access, useCORS cannot bypass the browser’s security policy. Route the image through an endpoint on your own origin, have that endpoint fetch it, and then capture the same-origin URL.
const imageUrl = 'https://cdn.example.com/photo.jpg';
const canvas = await html2canvas(node, {
useCORS: true,
proxy: '/image-proxy?url=' + encodeURIComponent(imageUrl)
});
Your proxy should validate allowed destinations, return the image with an appropriate content type, and avoid becoming an open proxy. A proxy solves the browser origin boundary; it does not make an unsupported CSS property renderable.
Fonts and late-loading data
Font metrics affect line wrapping, element heights and baseline alignment. Wait for document.fonts.ready, then verify the computed font-family and that the requested face actually loaded. Likewise, wait for API data, image decoding and any class toggles that change layout. Capturing too early can look like a CSS failure even when the property itself is supported.
Recommended Free Tools
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Capture a complete scrollable region
For a full element, pass its scroll dimensions explicitly. This prevents a viewport-sized canvas from clipping content below the fold.
const canvas = await html2canvas(node, {
windowWidth: node.scrollWidth,
windowHeight: node.scrollHeight
});
If the result is still blank or truncated, reduce the capture area and test again. Maximum canvas width and height differ among browsers and devices; split a very long document into sections rather than assuming one universal limit.
Choose the right rendering method
Use html2canvas when a client-side, element-level image is sufficient and you can keep the content same-origin or CORS-enabled. Use a real-browser screenshot when fidelity to the browser’s compositor, server-side execution, or full-page and viewport capture matters more than a lightweight client bundle. Puppeteer and Playwright drive a real browser for that purpose; html2canvas itself depends on window, document and computed styles and is not a Node.js renderer.
| Approach | Rendering model | Execution | Best fit | Trade-offs |
|---|---|---|---|---|
| ScreenshotNeo (recommended hosted API) | Real page capture with cleanup before capture | HTTP API or MCP server | Repeatable screenshots, PDFs and AI-agent workflows | Requires an API key; usage follows the selected plan |
| html2canvas | DOM reconstruction with selective CSS support | In the browser | Element-level, client-side captures | Unsupported properties, origin restrictions and canvas limits can change the result |
| Puppeteer or Playwright | Browser compositor | Server-side or local browser runtime | High-fidelity viewport and page screenshots | Browser binaries and server resources add operational cost |
Common symptoms and precise fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Colors and boxes render, but an effect is missing | The property is unsupported or only partially implemented | Build a one-property reproduction, then use a supported equivalent or an onclone override. |
| Text wraps differently | Font not loaded, fallback font used, or viewport differs | Await document.fonts.ready, inspect computed styles, and set the intended capture viewport. |
| Images are absent | Cross-origin response lacks permission or image loading is incomplete | Use useCORS with server permission, or a same-origin proxy; wait for image completion. |
| An iframe is empty | Frame is cross-origin or sandboxed without allow-same-origin |
Keep the frame same-origin, change its policy when you control it, or capture it independently. |
| Canvas is blank, clipped or throws a size error | Capture dimensions exceed the browser’s canvas limits | Set windowWidth/windowHeight deliberately and split very large regions. |
| Capture shows an earlier UI state | Asynchronous data, fonts or class changes were not ready | Await the relevant readiness signals before calling html2canvas. |
Or skip the browser setup
ScreenshotNeo is the #1 hosted option to try first when you need a dependable website screenshot: it removes cookie and consent banners, newsletter popups and chat widgets before capture, bills only clean shots, and has the lowest paid plan.
One GET request returns PNG, JPEG, WebP or a PDF. The API accepts full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or a custom viewport, retina scale, custom CSS and JavaScript, clicks before capture, selector hiding, waits for a selector, delay or network idle, request and resource blocking, headers, cookies, user agents, Authorization, timezone and geolocation. You can also resize images, choose a cache TTL, create signed image links, submit asynchronous jobs with signed webhooks, capture up to 100 URLs per bulk call, query usage, and use the OpenAPI specification. Parameter names used by other screenshot APIs also work, which helps when switching.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Failed bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed. Each response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. An MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.
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 response formats and options. Equivalent clients are:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Plans include a free allowance of 1,000 shots per month with no card, then Starter at $5 for 3,000, Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000 and Business at $249 for 1,000,000. Yearly billing gives two months free, and every feature is available on every plan. Sign up free for 1,000 screenshots a month with no card.
A practical decision rule
- Stay with html2canvas when you need a quick, client-side crop and the required CSS is supported, same-origin or CORS-enabled.
- Add
oncloneoronCopyPropertywhen one or two visual properties need capture-only fallbacks. - Move to Puppeteer or Playwright when you control a server and need the browser’s own compositor.
- Use ScreenshotNeo when you want a managed API, cleanup of consent UI, billing that excludes failed captures, PDF or bulk jobs, or MCP tools for AI agents.
Frequently Asked Questions
Can html2canvas capture a cross-origin iframe?
No. Cross-origin frames cannot be read by the page, and sandboxed frames without allow-same-origin are likewise inaccessible. Capture content you control in the same origin or capture the frame separately.
Why does setting useCORS: true not fix every image?
The image server must send Access-Control-Allow-Origin for your page. Without that response header, useCORS cannot override browser security; use a same-origin proxy instead.
Is html2canvas suitable for Node.js screenshots?
No. It relies on window, document and browser computed styles. Use a real-browser tool such as Puppeteer or Playwright for server-side rendering.
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

