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

To capture an element that is taller than 30,000 CSS pixels, render it with a viewport sized to its scroll dimensions, then verify the resulting bitmap against the target browser’s canvas limits. The essential configuration is:

const canvas = await html2canvas(element, {
  windowWidth: element.scrollWidth,
  windowHeight: element.scrollHeight
});

This changes the cloned rendering window; it does not increase the maximum width, height, or total pixel area that the browser permits for a canvas. If the requested bitmap exceeds those limits, lower the effective scale or capture bounded sections and assemble them outside one giant canvas.

Why a very tall html2canvas render becomes blank or truncated

html2canvas does not ask the browser for a native, full-document screenshot. It reconstructs an image by reading the DOM, styles, and resources that it can access. That makes output dependent on supported CSS, same-origin rules, image CORS headers, iframe security, layout, and the destination canvas limits. See the project’s documentation for the rendering model.

The html2canvas FAQ identifies canvas size limits as a common reason a produced canvas is empty or cuts off part way through. A browser may fail during canvas creation without throwing a useful exception. A page can therefore look correct in the DOM while the returned canvas is blank, partially painted, or impossible to export.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
VIISAN VF3240 A3 Scanner - Fastest 4-Second Scan (200dpi, A3 Color), 2400 DPI High Resolution, Frameless Auto-Scan for CAD & Business
  • 🎯 2400 DPI High-Resolution Output with 48-bit Color – Capture every detail with stunning clarity. The scanner delivers maximum 2400 x 2400 DPI optical resolution, producing up to 196 million effective pixels per image. Important Note: For full A3 size at 2400 DPI, use MacOS with native ICA driver support. Windows users achieve 1200 DPI for A3 via ViiScan software.
  • 🚀 Fastest 4-Second A3 Scanning at 200 DPI – Achieves maximum scanning speed of 4 seconds for A3 color documents at 200 DPI resolution. Important: This is the fastest speed under specific conditions (200 DPI, A3 size, color mode). Actual scanning time varies based on resolution, document size, and scan settings. Perfect for high-volume office environments where efficiency matters.
  • 🔧 Frameless Design & Intelligent Auto-Scan – The frameless scanner glass allows edge-to-edge scanning of large materials. Auto-Scan function automatically starts when the lid closes, boosting productivity in continuous scanning workflows. Four-button control panel (Scan/Email/Print/PDF) simplifies operation.
  • 💻 Windows & MacOS Compatibility with Global Power – Works seamlessly with Windows 7/8.1/10/11 (TWAIN/WIA drivers) and MacOS 10.15+ (ICA driver). Universal power adapter (AC 100-240V) ensures worldwide compatibility—no extra converters needed. Compliance Note: WIA driver on Windows is limited to 600 DPI due to Microsoft restrictions.
  • 📐 Perfect for CAD Drawings, Blueprints & Large Documents – Handle oversized materials that standard scanners can't accommodate. Ideal for engineering drawings, architectural blueprints, legal documents (up to 12" x 17"), newspapers, magazines, and painting albums.

The FAQ gives approximate, undated reference values of about 32,767 pixels for the maximum canvas dimension in Chrome/Chromium, Firefox, and desktop Safari. It also lists rough maximum areas of about 268 million pixels for Chrome/Chromium and 472 million pixels for Firefox. These are guidance values, not guarantees across browser versions, operating systems, devices, or hardware. MDN notes that some iOS environments may limit a canvas to 4096 × 4096 pixels. Check the current target environments rather than treating any figure as a contract.

Area can fail before height does. For example, a 20,000 × 20,000 bitmap is 400 million pixels even though neither dimension reaches 32,767. Conversely, a narrow 32,000-pixel-tall image may fit where a wider one does not. The effective bitmap dimensions also include html2canvas’s scale option, whose default is window.devicePixelRatio.

Measure the document and configure the render window

  1. Identify the element. Use the element that actually owns the document content, not an outer page shell with unrelated fixed navigation.
  2. Read its scroll dimensions. scrollWidth and scrollHeight describe the full scrollable content in CSS pixels.
  3. Set the cloned window. Pass those values as windowWidth and windowHeight when you want the complete element rendered.
  4. Calculate the output size. Multiply the intended CSS width and height by the effective scale, then check both dimensions and total pixels against every target browser.
const element = document.querySelector('#document');
if (!element) throw new Error('Document element was not found');

const cssWidth = element.scrollWidth;
const cssHeight = element.scrollHeight;
const scale = 1; // choose deliberately; the default is devicePixelRatio
const outputWidth = Math.ceil(cssWidth * scale);
const outputHeight = Math.ceil(cssHeight * scale);
const outputPixels = outputWidth * outputHeight;

console.log({ cssWidth, cssHeight, scale, outputWidth, outputHeight, outputPixels });

const canvas = await html2canvas(element, {
  windowWidth: cssWidth,
  windowHeight: cssHeight,
  scale
});

document.body.appendChild(canvas);

Use explicit width and height only when you intentionally want a crop or a controlled output size. The windowWidth and windowHeight settings control the cloned/rendered window; they are not a canvas-limit bypass. The official option definitions are in the configuration reference.

Rank #2
VIISAN Large Format Book & Document Scanner, Capture Size A2/A3, 26MP USB Document Camera with Auto-Flatten, Fingerprint Removal Technologies, Multi-Language OCR, Compatible with Windows & macOS
  • COMPATIBILITY NOTICE: The bundled scanning software OfficeCam supports only x64 and x86 architectures on Windows PCs and macOS. Not compatible with ARM-based devices, such as the Surface Pro X.
  • [A2 Large Format Scanner] The S21 scanner is a perfect A2 large format overhead document camera. Large A2 Size scanning at 594x420 mm, ideal for scanning large format journals, manuscripts, newspapers, and maps. Overhead scanner height adjustable (A2/A3) design with a 90-degree foldable hinge. And the S21 allows for taking snapshots, books, documents, business cards, 3D objects, Remote Collaboration, and recording videos
  • [Excellent Scanning Quality] When paired with VIISAN’s scanning software, the document scanner can deliver up to 26MP (5888 × 4522 pixels) resolution, and supports Software-Enhanced up to 600 DPI for capturing stunning detail. It features an adjustable height (A2/A3) with a 90-degree foldable hinge, making it easy to adapt to different scanning needs. Ideal for scanning snapshots, books, documents, business cards, 3D objects, and supporting remote collaboration and video recording.
  • [Intelligent Scanning Software] You can use the bundled VIISAN scanning software with the smart device to get great results while scanning books. For example, it can automatically digitally flattens curved pages, erases fingers from the scanned photos, repairs the damaged edges of documents, and automatically splits double-page into separate images. and the embedded OCR feature you can convert all the scanned files into PDF or editable Word/Excel/Epub/Txt files
  • [Built-in 3-Level LED Light Control] Portable document scanner built-in high brightness LED lamp that allows you to take clear photos even in the dark. (Note: It is not recommended to use the built-in LEDs of the book scanner in bright light. And very glary papers are NOT recommended.)

Watch responsive layout changes

Changing the cloned window can activate different media queries, reflow text, reveal or hide navigation, and alter sticky or fixed elements. Compare the clone’s layout with the on-screen document. If the full scroll width causes an unintended desktop breakpoint, deliberately set a width that matches the layout you need and capture the resulting height, rather than assuming the largest possible window is visually correct.

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

Control scale before the bitmap gets too large

By default, html2canvas uses window.devicePixelRatio. A device-pixel ratio of 2 doubles both dimensions and quadruples pixel area relative to CSS dimensions. A document measuring 16,000 × 20,000 CSS pixels therefore becomes roughly 32,000 × 40,000 pixels at scale 2 and is likely to hit a height or area limit.

Set a lower scale when a single output must fit:

const canvas = await html2canvas(element, {
  windowWidth: element.scrollWidth,
  windowHeight: element.scrollHeight,
  scale: 1
});
  • Lowering scale reduces memory use and output resolution.
  • It cannot rescue a render that already exceeds a hard dimension limit during canvas creation.
  • Validate text readability, image sharpness, and export size at the chosen scale.
  • Do not infer a safe value from one machine; test each browser/device combination you support.

When one canvas is beyond practical limits: capture sections

If the measured dimensions or area are too large, render separate vertical sections with controlled offsets and dimensions. Keep each canvas comfortably below the smallest limit among your supported environments. Then export the pieces individually or assemble them in a downstream image/PDF pipeline that can handle the desired document format.

Section-capture pattern

async function captureSections(element, sectionCssHeight = 8000) {
  const width = element.scrollWidth;
  const height = element.scrollHeight;
  const sections = [];

  for (let y = 0; y < height; y += sectionCssHeight) {
    const currentHeight = Math.min(sectionCssHeight, height - y);
    const canvas = await html2canvas(element, {
      x: 0,
      y,
      width,
      height: currentHeight,
      windowWidth: width,
      windowHeight: height,
      scrollX: 0,
      scrollY: y,
      scale: 1
    });
    sections.push({ y, canvas });
  }
  return sections;
}

The exact chunk height is an engineering choice. Leave margin below the suspected browser limit, account for scale, and test with your longest real document. When joining sections, inspect seams at every boundary. A fixed header, sticky toolbar, lazy image, animation, or font that loads between captures can produce repeated or shifted content.

Make chunking deterministic

  • Wait for web fonts and images before starting.
  • Disable transitions and animations in the clone with custom CSS where necessary.
  • Keep the same viewport width for every section so line wrapping does not change.
  • Decide whether fixed or sticky elements belong on every section or only the first.
  • Record each section’s offset and height so a downstream assembler can place it exactly.
  • Test page breaks, tables, positioned elements, and lazy-loaded content at boundaries.

Resources, CORS, and iframe limitations

For images hosted on another origin, useCORS: true only succeeds when that server sends appropriate CORS headers. It does not grant permission by itself. If headers are unavailable, use a same-origin proxy that you control and that is appropriate for the content’s security and licensing.

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.
Rank #3
Colortrac SmartLF 36-inch wide color scanner
  • Colortrac SmartLF 36" Wide Format Scanner
const canvas = await html2canvas(element, {
  windowWidth: element.scrollWidth,
  windowHeight: element.scrollHeight,
  useCORS: true,
  scale: 1
});

A cross-origin iframe cannot be rendered by reading its document because browser security prevents access. Capture content you control inside the frame, obtain a server-side representation, or treat the iframe as an external object rather than expecting html2canvas to reproduce it. The allowTaint option does not make a tainted canvas safely readable; it is not a substitute for CORS.

Extension screenshots versus html2canvas

If you are building a browser extension, the html2canvas FAQ points to native extension screenshot APIs as more reliable and not subject to canvas size limits. Chrome exposes chrome.tabs.captureVisibleTab(); Firefox-compatible extensions use browser.tabs.captureVisibleTab(). These APIs capture the visible tab according to extension permissions and API semantics. They are not a one-call full-document export. You still need scrolling, stitching, or another document strategy for content taller than one viewport.

Performance and reliability checklist

  • Memory: canvas memory grows with total pixels and can spike during rendering and encoding. Release section canvases after they are uploaded or merged.
  • Encoding: toDataURL() creates a large string; prefer toBlob() for uploads when supported.
  • Timing: wait for fonts, images, and application data. A successful promise does not prove that every resource was ready.
  • Layout: freeze animations and verify responsive breakpoints at the configured window size.
  • Testing: run representative long documents on every browser, operating system, and device class you support.
  • Validation: check canvas width/height, file byte size, visible seams, missing images, and text fidelity before declaring success.

Troubleshooting common failures

Symptom Likely cause Fix
Canvas is completely blank Dimension or area limit; resource or DOM failure Log requested dimensions and scale, lower scale, capture sections, then inspect browser console and resource access.
Output stops halfway down Height or total-area limit Reduce scale if resolution permits; otherwise split by vertical offsets and validate seams.
Width is unexpectedly narrow or text wraps differently Cloned window width triggered a responsive breakpoint Set an intentional windowWidth, compare layout, and use matching section widths.
Images are missing or export throws a security error Cross-origin image without permitted CORS Serve the image with CORS headers or use a suitable same-origin proxy; allowTaint is not a fix.
An embedded application is absent Cross-origin iframe security restriction Capture the iframe separately with authorization or obtain a server-rendered representation.
Repeated headers or visible jumps between chunks Fixed/sticky positioning, animation, or changing content Freeze the page, define header policy, and inspect every boundary at the final assembly stage.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One request returns a PNG, JPEG, WebP, or PDF, with full-page capture and lazy images loaded. Before capture it accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.

It also supports custom CSS and JavaScript, selector-based element capture, dark mode, 12 device presets or any viewport, retina scale, PDF paper sizes/margins/orientation/page ranges, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs, which can simplify migration. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Plustek Large Format Document Scanner S30 - Wide Format Tabloid, Ledger, A3
  • [Office-friendly] - The S30 can scan documents up to 12 inches wide, meeting a wide range of business needs. A fast, powerful, large-format desktop scanner ideal for high-volume office use.
  • [Cost Savings] - The S30 can scan A4/Letter size and 12" wide documents at the same time, so you won’t have to spend extra on a separate scanner just for a few wide-format documents.
  • [Flexible Paper Handling] - The S30 handles a wide range of documents, from standard office paper in various sizes to blueprints, architectural plans, and engineering drawings, as well as thin papers like purchase orders and delivery notes.
  • [Broad Compatibility] - Horizontal mode suit for matrix printer paper, thin or fragile documents can use carrier sheet protect during scanning. larger than Tabloid but smaller than Cut Sheet size, fold in carrier sheet and scan to save as a single image
  • [Job Button] - The included software lets you register frequently used scanning tasks to the job button on the scanner. Once set up, you can simply press the job button to perform one-touch scanning.

Use the ScreenshotNeo documentation for authentication and options. The same target can be captured with:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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}`);

The Free plan includes 1,000 shots each month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account to begin.

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

Choosing the right approach

Requirement Best fit
You control a moderate-size DOM and need a client-side image html2canvas with scroll dimensions and an explicitly tested scale
The document exceeds one canvas’s safe area Section capture with deterministic offsets and downstream assembly
You need a visible-tab image in an extension Native extension screenshot APIs, with scrolling or stitching for full documents
You need server-side full-page images or PDFs without browser setup ScreenshotNeo, especially when consent UI, failed loads, and automated capture billing matter

There is no universal safe “30,000-pixel” switch. Measure the intended output, include scale in the calculation, test the actual browser/device matrix, and change the capture strategy when one canvas is no longer reliable.

Best Value
Plustek OS1180 - Flat Scanner for Graphics and Documents in A3 Format, Design Suitable for Libraries, Schools or Small Offices - Scanning A3 Documents in Approximately 9 Seconds
  • Maximum Scan size - 11.7"x 17" (297 x 431.8 mm) Large Format Scanning, easy digital Tabloid or A3 size paper.
  • No more waiting - by LED Light Source, Save Energy, No Warm Up
  • Hassle fre operation - Pre Set Function One-Touch Button for Your Quick Use.
  • Powerful software bundle - Enhanced OCR Accuracy with ABBYY, and DocAction for File Sharing
  • Scan mode - 48 bit Color /16 bit Gray-Scale for Scan Art, Documents and Other Items

Frequently Asked Questions

Does setting windowHeight to 100000 make html2canvas support a 100,000-pixel canvas?

No. It enlarges the cloned rendering window only. The browser still enforces its own maximum dimension and total-area limits, so a sectioned capture or another capture method is required when those limits are exceeded.

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

Should I always set scale to 1?

No. Scale 1 reduces bitmap size, memory use, and limit pressure, but it also reduces output resolution on high-density displays. Choose it from your required readability and tested browser limits.

Can html2canvas capture a cross-origin iframe if allowTaint is enabled?

No. Browser same-origin security prevents html2canvas from reading a cross-origin iframe document. allowTaint does not bypass that restriction.

Are the FAQ’s 32,767-pixel figures guaranteed for every current browser?

No. They are approximate, undated guidance. Limits vary with browser version, operating system, device, hardware, scale, and available memory; test the environments you support.

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.

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