Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →An empty html2canvas result usually has a specific cause rather than one universal bug. Check the canvas dimensions first, then investigate cross-origin images and unsupported CSS. A canvas that is larger than the browser allows can be blank or cut off without throwing an error; remote images can be skipped when CORS is not permitted; and html2canvas can omit visual effects it does not implement. The sequence below isolates each cause and gives a working fix.
Start with the canvas dimensions
Let the promise resolve, then inspect the bitmap dimensions before changing options:
const source = document.querySelector('#report');
html2canvas(source).then(canvas => {
console.log({
canvasWidth: canvas.width,
canvasHeight: canvas.height,
cssWidth: canvas.style.width,
cssHeight: canvas.style.height
});
document.body.appendChild(canvas);
});
The width and height properties are physical pixels. They include the configured scale, which defaults to window.devicePixelRatio. A long page at a high device-pixel ratio can therefore exceed a browser’s bitmap budget even when its CSS dimensions look reasonable.
Match the rendering window to a full-scroll capture
For an element whose complete scrollable area must be rendered, pass its scroll dimensions as the rendering window and capture dimensions:
#1 Best Overall
- Wacom Intuos Small Graphics Drawing Tablet: Enjoy industry leading tablet performance in superior control and precision with Wacom's EMR, battery free technology that feels like pen on paper
- Works With All Software: Wacom Intuos tablet can be used in any software program to explore new facets of digital creativity; draw, paint, edit photos/videos, create designs, and mark up documents
- What the Professionals Use: Wacom's industry leading pen technology and pen to paper feeling makes it the preferred drawing tablet of professional graphic designers
- Software and Training Included: Only Wacom gives you software with every purchase. Register your Intuos tablet and gain access to some of the best creative software and Wacom's online training
- Wacom is the Global Leader in Drawing Tablet and Displays: For over 40 years in pen display and tablet market, you can trust that Wacom to help you bring your vision, ideas and creativity to life
const element = document.querySelector('#report');
const width = element.scrollWidth;
const height = element.scrollHeight;
html2canvas(element, {
windowWidth: width,
windowHeight: height,
width,
height,
x: 0,
y: 0
}).then(canvas => {
document.querySelector('#output').replaceChildren(canvas);
});
windowWidth and windowHeight affect the viewport used during rendering, including media-query decisions. width and height set the resulting canvas dimensions. Setting all four deliberately avoids capturing only the currently visible portion when the target is scrollable.
How large is too large?
The html2canvas FAQ describes rough, current guidance rather than guaranteed thresholds. Chrome and Chromium are listed at about 32,767 pixels for one dimension and about 268 million pixels in total area. Firefox is listed at about 32,767 pixels and about 472 million pixels. Desktop Safari is listed at about 32,767 pixels with an area similar to Chrome. iOS limits are lower and depend on device RAM. Browser versions, operating systems and available memory can change the practical result; treat these figures as indications, not contracts.
Compare your measured dimensions with those guides. If the product of width and height is very large, test a smaller region first. Lowering the scale also reduces physical pixels:
Rank #2
- Word-first 16K Pressure Levels: The upgraded stylus features 16,384 levels of pressure sensitivity and supports up to 60 degrees of tilt, delivering smoother lines and shading for a natural drawing experience. With no battery or charging needed, it operates like a real pen, making it easy for beginners to create effortlessly. This functionality helps novice artists develop their skills and explore their creativity without the intimidation of complex tools
- Designed for Beginners: This drawing pad desinged with 8 customizable shortcuts for both right and left-hand users, express keys create a highly ergonomic and convenient work platform
- Perfectly Adapted for Android: The XPPen Deco 01 V3 art tablet supports connections with Android devices running version 10.0 and above. It is recommended to download the XPPen Tools Android application, which adapts to your smartphone's screen aspect ratio, ensuring accurate mapping. It also supports mapping on Android screens with different aspect ratios in portrait mode
- Large Drawing Space, Bigger Bold Inspiration: This expansive drawing pad has10 x 6.25-inch helps you break through the limit between shortcut keys and drawing area
- Easy Connectivity for Beginners: The Deco 01 V3 offers USB-C to USB-C connectivity, plus adapters for USB C. This ensures easy connection to various devices, allowing beginner artists to set up quickly and focus on their creativity without compatibility concerns. Whether using a laptop, tablet, or desktop, the Deco 01 V3 provides a seamless experience, making it an ideal choice for those just starting their digital art journey
html2canvas(element, {
scale: 1,
windowWidth: element.scrollWidth,
windowHeight: element.scrollHeight
});
Splitting a long document into separate sections and composing the images later is another practical diagnostic. A successful small capture confirms that the original failure is related to size or memory, although neither lower scale nor splitting is a guarantee for every device.
Check cross-origin images
With allowTaint: false (the default), html2canvas skips an image when drawing it would taint the canvas. useCORS: true asks the browser to load the image with CORS, but it works only when the image server returns a suitable Access-Control-Allow-Origin header. The option cannot override a server’s policy.
Test with CORS enabled
html2canvas(document.querySelector('#report'), {
useCORS: true,
onclone: clonedDocument => {
// Optional: adjust only the cloned DOM used for rendering.
},
onError: error => {
console.error('html2canvas resource error', error);
}
}).then(canvas => {
const link = document.createElement('a');
link.download = 'report.png';
link.href = canvas.toDataURL('image/png');
link.click();
});
Inspect the image request in browser developer tools and verify its response headers. To isolate the problem, temporarily remove remote images or replace them with same-origin files. If the canvas becomes correct, configure the image host to allow the requesting origin, or use a proxy that fetches the image and serves it from an origin your page can access.
Rank #3
- Customize Your Workflow: The 6 customizable press keys on Huion H640P drawing tablet for pc let you assign your most-used commands—like undo, zoom, brush switch, or save—so you can keep your hands on the tablet and your mind on the art. Whether you're a digital painter switching brushes, or a comic artist zooming in and out, these keys keep your workflow smooth and uninterrupted. Plus, the Huion driver lets you save different shortcut profiles for different apps, so you never have to reconfigure when switching software.
- Professional Pen Performance: Huion H640P drawing pad for computer comes with the battery-free PW100 stylus that's always ready when inspiration strikes. With 8192 levels of pressure sensitivity, every light sketch, or bold stroke responds naturally to your hand—just like a real pen. The 5080 LPI resolution and 233 PPS report rate deliver lag-free, precise strokes, so you can draw confidently without second-guessing your cursor. The pen side buttons help you switch between pen and eraser instantly.
- Compact and Portable: Huion H640P computer graphics tablet features a compact, ultra-portable design at just 0.3 inches thin and 0.61 lbs light, so it slides easily into your backpack—perfect for sketching in coffee shops, taking notes in class, or editing on the go between home and studio. The 6x4 inch active area offers enough room for natural pen movements while fitting comfortably on crowded desks, or lecture hall seats.
- Stable Compatibility: Huion H640P graphic drawing tablet works seamlessly with Mac, Windows, Linux PCs, and Android smartphones/tablets (OS version 6.0 or later). Left-handed friendly, and you just need to flip the tablet and adjust the settings in the driver. Please note: H640P does NOT support iPhone/iPad.
- Move Beyond the Mouse: Huion Inspiroy H640P is a pen tablet that replaces your mouse for more natural, precise control. Freehand draw, take notes, or even play OSU—everything you do with a mouse, you can do better with a pen. The precise tip makes it ideal for detailed photo editing, graphic design, or signing PDF. Meanwhile, the ergonomic pen grip helps you avoid the strain that comes from hours of using a mouse.
Why allowTaint: true is not an export fix
Allowing a tainted image may let the image be drawn, but a tainted canvas cannot safely be read with toDataURL(), toBlob() or pixel APIs. Do not use that setting as a way to produce downloadable output. CORS headers or a properly configured proxy are the relevant remedies.
Separate rendering limitations from capture failures
html2canvas is a DOM renderer, not a browser screenshot command. It walks the document and recreates a representation from properties it knows how to render. A feature that is visible in the browser can therefore be missing or look different in the result. The project documentation states: “Every CSS property must be manually implemented to render correctly, so html2canvas will never have full CSS support.”
Reduce the reproduction
- Capture the smallest subtree that still shows the defect.
- Temporarily remove filters, complex gradients, masks, unusual blend modes and other advanced effects.
- Replace web fonts and remote backgrounds with simple, same-origin assets.
- Compare the output with the library’s supported-feature documentation rather than expecting pixel equivalence.
If a simplified subtree renders but the full design does not, the issue is feature coverage or a resource dependency, not an empty-canvas API error. For a browser-faithful image, use a headless browser screenshot workflow instead of treating html2canvas as a pixel capture API.
Rank #4
- 4 Pack for More Fun: Apply the newest flexible liquid crystal technology, brighter and clearer than most LCD writing tablet. Take pressure-sensitive technology, you can draw lines of different thicknesses through different pressure levels. Package includes 4 pack lcd writing tablet (Blue, Light blue, Green and Pink), free children's imagination and creativity.
- 8.5 Inch Colorful Lcd writing Tablet: TQU kids LCD doodle board is a creative education and learning toy, perfect support for drawing, writing, spelling, math, remark, and notes which can let your kids freely release their natural instincts. With erase button on the front and lock switch. You can draw and erase easily by pressing the button on the front of the board. The pen fits snug on top of tablet and it will not come loose.
- Easy to use and Durable: The LCD writing tablet for kids is easy to use, just use the stylus to write, draw, scribble, doodle anything you want. Press the erase button to clear the screen in one second. Or press the lock key to save the screen contents. Our magic reusable drawing tablet is built in a button battery.
- Safe & Portable Toddler Travel Toys: Great for quiet, take-along entertainment. It’s an easy way to color on the go without lugging a bunch of stuff in the car or to a restaurant or church.
- Perfect Gift Idea: The multi-functional LCD writing tablet is a great gift choice for kids. It can be an educational toy for preschoolers. A perfect parent-pick gift for 3 4 5 6 7 8 year old girls and boys on back to school, homeschool, birthday, Easter, Children's Day, Thanksgiving Day, Christmas and any occasion.
A cause-based diagnostic procedure
- Confirm the promise and inspect dimensions. Log
canvas.widthandcanvas.heightimmediately after resolution. A zero or unexpectedly small value points to your size settings or element geometry. - Measure the source. Record
scrollWidth,scrollHeight,getBoundingClientRect()and the active device-pixel ratio. Multiply the intended CSS size by the scale to estimate physical pixels. - Try a small region at scale 1. If it works, restore dimensions gradually. This identifies a browser or memory limit without assuming a single fixed maximum.
- Set the scroll viewport explicitly. For a full element, pass
windowWidthandwindowHeightfrom its scroll dimensions. Usewidthandheightwhen you also need deterministic output dimensions. - Remove external images. If output changes, inspect CORS response headers, then use
useCORS: trueor a proxy that you control. - Watch resource errors. Supply the documented
onErrorcallback and inspect the browser console and network panel. - Simplify CSS and DOM. Test one component at a time and check whether the missing visual relies on an unsupported property.
- Choose the correct architecture. html2canvas requires
window,documentand computed styles, so it runs in a browser page, not directly in Node.js. For server-side work, drive a headless browser such as Puppeteer or Playwright.
Common symptoms and targeted fixes
| Symptom | Likely cause | What to try | Limitation |
|---|---|---|---|
| Entire canvas is blank with no exception | Bitmap exceeds a browser or platform limit | Inspect dimensions, match scroll window settings, lower scale, or capture smaller regions | Limits vary by browser, platform and memory |
| Only the top or part of a long element appears | Viewport or canvas dimensions do not include the scroll area | Set windowWidth/windowHeight to scrollWidth/scrollHeight and set output dimensions explicitly |
A huge resulting bitmap can still fail |
| Text and layout appear but photos are missing | Cross-origin images were skipped | Use useCORS: true after enabling CORS on the image server, or use a proxy |
The remote server must send an appropriate header |
| Export throws a security error | The canvas is tainted by an image | Remove the image, fix CORS, or proxy it; do not rely on allowTaint: true |
Tainted canvases cannot be read or exported |
| A visible effect is absent or different | Unsupported or incomplete CSS rendering | Simplify the style or use a real browser screenshot | html2canvas does not promise full CSS fidelity |
| Code fails during server rendering | No browser globals | Run it in a browser, or use Puppeteer/Playwright for server-side capture | html2canvas itself is client-side |
Options that matter when debugging
scale: Defaults towindow.devicePixelRatio. Lower it to reduce physical dimensions while diagnosing size failures.widthandheight: Control the output canvas size; use them intentionally for a known crop or full capture.windowWidthandwindowHeight: Control the virtual rendering window and media queries. They are especially important for scrollable content.useCORS: Enables CORS-mode image requests but does not create permission on the image server.allowTaint: Permits drawing potentially tainting resources, which prevents safe export; it is not a general solution.onError: Surfaces resource-loading failures so they do not remain invisible in a successful promise.
When a browser screenshot service is a better fit
If you need server-side captures, full CSS behavior, or repeatable results without shipping a browser-rendering page to every client, use a browser-driven screenshot architecture. ScreenshotNeo is a website screenshot API and MCP server for developers. It accepts a URL and returns PNG, JPEG, WebP or PDF; before capture it accepts consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets. It bills only clean shots: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing result.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
Make one GET request instead of maintaining html2canvas code in a page. The examples use https://stripe.com; replace it with your target URL. See the ScreenshotNeo documentation for request options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
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)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also supports full-page captures with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets and custom viewports, retina scale, PDF paper and page controls, custom CSS and JavaScript, pre-capture clicks, hidden selectors, selector/delay/network-idle waits, blocking ads or resource types, custom headers, cookies, user agents and Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors| Plan | Included shots | Price |
|---|---|---|
| Free | 1,000 per month | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free, and every feature is included on every plan. Cookie banners, popups and chat widgets are removed before the shot; bot checks, blank pages and failed loads are never billed; and the MCP server lets AI agents such as Claude or Cursor take screenshots. Start with 1,000 free screenshots a month—no card required.
Performance and reliability considerations
- Measure before tuning: physical canvas pixels, not CSS pixels, determine memory pressure.
- Capture only the region you need, and use a lower scale when publication resolution permits.
- Keep remote assets same-origin or configure CORS deliberately; a single blocked image can change the result.
- Use explicit waits for content that appears after JavaScript, and verify that lazy-loaded images are present before capture.
- For recurring server jobs, record HTTP status, response headers and the resulting dimensions so failures can be distinguished from valid blank pages.
Frequently Asked Questions
Can html2canvas capture a page from Node.js?
No. It depends on browser APIs such as window, document and computed styles. Run it in a browser, or use a headless browser solution such as Puppeteer or Playwright for server-side screenshots.
Best Value
- PLEASE NOTE:XPPen Artist13.3 Pro drawing tablet Need to connect with computer,you need to use it with your computer or laptop, the 3 in 1 cable is included
- Drawing Tablet with Screen: Tilt Function- XPPen Artist 13.3 Pro supports up to 60 degrees of tilt function, so now you don't need to adjust the brush direction in the software again and again. Simply tilt to add shading to your creation and enjoy smoother and more natural transitions between lines and strokes
- Graphics Tablets: High Color Gamut- The 13.3 inch fully-laminated FHD Display pairs a superb color accuracy of 88% NTSC (Adobe RGB≧91%,sRGB≧123%) with a 178-degree viewing angle and delivers rich colors, vivid images, and dazzling details in a wider view. Your creative world is now as powerful as it is colorful
- Drawing Pad: One is enough- The sleek Red Dial on the display is expertly designed with creators in mind, its strategic placement allows for natural drawing postures. With just one wheel, you can effortlessly zoom in and out, adjust brush sizes, and flip the canvas—all tailored to suit the habits of everyday artists. The 8 customizable shortcut keys allow you to personalize your setup, streamlining your workflow and enhancing creative efficiency
- Universal Compatibility & Software Support:supports Windows 7 (or later), Mac OS X 10.10 (or later), Chrome OS 88 (or later), and Linux systems. Fully compatible with major creative software including Photoshop, Illustrator, SAI, and Blender 3D. Register your device to access additional programs like ArtRage 5 and openCanvas for expanded creative possibilities.
Will useCORS:true allow any external image?
No. The image server must return a suitable Access-Control-Allow-Origin header. If it does not, use a proxy or remove the image.
Why does lowering scale sometimes help?
Scale multiplies CSS dimensions into physical bitmap pixels. A lower value can keep the canvas under a browser’s dimension or area limit, but it is a diagnostic and quality trade-off rather than a universal fix.
Recommended Free Tools
Does html2canvas reproduce every CSS effect?
No. It reconstructs the DOM using implemented properties, so unsupported or incomplete CSS can be absent or visually different.
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.

