October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
html2canvas

How to Speed Up jsPDF and html2canvas PDF Downloads on Mobile Browsers

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

To speed up a jsPDF and html2canvas export on a phone, first reduce the area you capture, set html2canvas scale deliberately, and avoid rendering a long document as one oversized canvas. Then measure canvas rendering, PDF assembly, and the download handoff separately on real iOS and Android devices. These are optimization levers—not guaranteed speedups: the official documentation publishes no comparative mobile benchmarks.

Why mobile PDF exports can be slow

html2canvas does not take a native screenshot. It walks the DOM and reconstructs a canvas from the browser-visible page and supported CSS. More content and complex layouts can mean more rendering work, and unsupported styles or browser restrictions can make the result differ from the page as displayed. Its documented browser scope includes modern evergreen Chrome/Chromium, Firefox, and Safari; behavior and resource limits still vary across devices and versions. See the html2canvas FAQ and documentation.

After rendering, an application typically inserts the resulting image into a PDF and hands that file to the browser for download or sharing. A delay may come from any of those phases. Tuning PDF compression will not fix a slow canvas render, and a fast render will not necessarily make a large PDF transfer or download instantly.

Measure the work before changing settings

Record elapsed time around capture, PDF assembly, and the save/download handoff separately. This is implementation guidance; the library documentation does not publish timings or a universal fastest setting. Test the same content on the actual iOS Safari and Android browsers your users run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Canon PIXMA TR160 Color Wireless Portable Printer
  • LIGHTWEIGHT AND PORTABLE - Connect and print on the go with the PIXMA TR160. This lightweight portable printer can fit into a bag or backpack with room to spare.
  • HIGH-QUALITY PRINTING ON THE GO - Print documents and photos up to 8.5” x 11” that showcase sharp black text and vibrant details with rich color thanks to a 5-Color Hybrid Ink System, including square and borderless prints.
  • SIMPLE & EASY CONNECTIVITY - Printing is only an app away when using the Canon PRINT app, Apple AirPrint4, or Mopria Print Service5 with your compatible device(s) or the cloud.
  • WIRELESS DIRECT MODE - Connect your compatible device to the printer even without a wireless router.
  • 1.44” OLED DISPLAY - Easily check ink levels, printer status, and other settings with the 1.44” Monochrome OLED.
const started = performance.now();
const canvas = await html2canvas(document.querySelector("#receipt"), {
  scale: 1,
  useCORS: true
});
const captured = performance.now();

const pdf = new jsPDF({ orientation: "portrait", unit: "pt", format: "a4" });
pdf.addImage(canvas, "JPEG", 0, 0, 595.28, 841.89, undefined, "FAST");
const assembled = performance.now();

pdf.save("receipt.pdf");
const saveCalled = performance.now();

console.table({
  captureMs: captured - started,
  assemblyMs: assembled - captured,
  saveCallMs: saveCalled - assembled
});

The final measurement records how long the save call itself takes to return, not when a mobile browser has finished writing, opening, or sharing the file. Browser download handoff is not reliably observable as a single completion event across platforms. For repeatable comparisons, log the same phases and assess the actual user-visible result as well.

Reduce captured content and canvas dimensions

Capture the part the PDF needs

Render a receipt, report section, or other required element instead of the entire page where possible. For a viewport-sized export from a long page, html2canvas offers cullOffscreen: true, which skips painting fully offscreen nodes and is documented as a way to speed up large-page viewport captures. It is not a general switch for producing a complete full-page PDF: use it only when offscreen content is intentionally excluded. Transformed, fixed, and sticky elements need particular checking because the culling behavior is conservative around them.

Set the capture window intentionally

windowWidth and windowHeight control the window dimensions used for the cloned page. Set them when the capture layout should match a deliberate viewport rather than an incidental device size. Check responsive breakpoints, fixed headers, and sticky elements at the selected dimensions. Configuration details are in the html2canvas configuration reference.

Tune scale for a phone-sized canvas

html2canvas defaults scale to window.devicePixelRatio. A high device pixel ratio can therefore produce a canvas with many more pixels than the CSS dimensions suggest. Lowering scale reduces output pixel dimensions and is a plausible way to reduce rendering and encoding work, but the docs do not promise a speed gain. The trade-off is sharpness: small text may become hard to read in the PDF.

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

Compare candidate values such as 1 and 2 using your actual content, then inspect text readability, file size, page completeness, and elapsed time on target phones. Do not choose solely by whichever run finishes first. The configuration reference documents the scale option; the scale example shows the relationship between scale and output sharpness.

const canvas = await html2canvas(document.querySelector("#report"), {
  scale: 1,
  windowWidth: 390,
  windowHeight: 844,
  cullOffscreen: true
});

That example is appropriate only if the desired export is limited to the configured viewport. Remove cullOffscreen and choose a capture strategy that covers all required content for a complete long-page export.

Avoid blank or clipped output on iPhone

Canvas maximum dimensions and total area vary by browser, platform, and hardware. The html2canvas FAQ warns that iOS Safari limits are lower and device-dependent; exceeding a limit can result in a blank or partial canvas without a helpful error. There is no dependable, universal iPhone pixel threshold to put in code.

For long documents, consider rendering page-sized sections separately, adding each result to the PDF, and releasing each canvas after use. This is an implementation strategy, not a guaranteed fix: verify that all pages render correctly and observe memory behavior on the devices you support. Smaller captures also make it easier to identify which page or component triggers a failure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art

Fix missing remote images with CORS-aware handling

Setting useCORS: true asks html2canvas to load images through CORS; it cannot override browser origin policy. The remote image server must send appropriate CORS headers. If it does not, use an authorized same-origin proxy or omit or replace the image. See the html2canvas proxy guidance.

const canvas = await html2canvas(document.querySelector("#report"), {
  useCORS: true,
  scale: 1
});

If an image is absent, check its request and response headers in the browser’s network tools rather than assuming that changing PDF compression will help. Do not use a proxy to retrieve content you are not authorized to access.

Compare image encoding and PDF output paths

jsPDF accepts canvas elements with addImage and documents JPEG compression choices NONE, FAST, MEDIUM, and SLOW. These are choices to benchmark, not a published mobile speed ranking. Test the same pages and device while comparing generation time, PDF byte size, image quality, and text legibility. A more compressed image can reduce file size but may take different time to encode and can look worse.

Pass the canvas directly when your workflow supports it; converting to a base64 data URL first is unnecessary unless the chosen path requires that representation. jsPDF also exposes output('blob') and output('arraybuffer'), alongside save and data URL forms. Measure your app’s actual download or sharing handoff rather than assuming one output representation is fastest. See the jsPDF project documentation for the HTML, image, and output APIs.

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

Keep repeated exports from accumulating work

In a long-lived app that captures repeatedly, html2canvas exposes clearImageCache to clear its shared image cache after rendering. Do not clear it while concurrent captures are using the cache; that can interfere with those operations. Coordinate exports or clear only when no other capture depends on the shared cache. The option is documented in the configuration reference.

Compare changes fairly on mobile

There is no verified universal best scale, compression mode, or mobile speed multiplier in the official references. Run repeatable comparisons using identical content, device, browser version, network conditions, and output requirements. Record:

Rank #3
Sale
Gloryang Inkless Portable Printer for Travel, Wireless Thermal Printer Supports 8.5 x 11 Inch Thermal Paper, Bluetooth Machine Includes Carry Case and 3 Rolls of Paper Kit, Black
  • Inkless Printing – Gloryang portable printer uses advanced thermal technology, requiring no ink, toner, or ribbons. The package includes the printer, 3 thermal paper rolls (1 pre-installed + 2 extras), a carrying case, charging cable, manual, and guide card. Cost-effective and easy to use. Note: Only compatible with Gloryang thermal paper; not for regular, inkjet, or plain paper.
  • Seamless Bluetooth Connectivity – The Gloryang mobile sticker printer connects easily to iOS and Android via Bluetooth through the “Jadens Printer” app. It also works as a compact printer for laptops and computers—simply turn on the printer first, then install the driver to set up. Print anytime, anywhere.
  • Ultra-Portable Design - Weighing just 1.75lb and measuring 1.7in thick, the Gloryang portable printer is incredibly lightweight and compact. Perfect for on-the-go printing during travels, work, or university, it easily fits into backpacks or briefcases. Ideal for emergency scenarios, contracts, office documents, and more.
  • Space-Saving Design - Say goodbye to clutter with the built-in paper bin of the Gloryang printer. It saves space and keeps your workspace tidy, whether you're on the go or in a car. With two ways to load thermal paper and the ability to print documents ranging from 2 to 8.5 inches, it caters to various printing needs.
  • Perfect Gift for Holiday-Gloryang thermal printer can print clear photos, image, design drawings and text. It's perfect for busy professionals and students. Come with a nice case, making it as a perfect Christmas and new year gift for your families and friends.
  • Capture, PDF assembly, and download-handoff time separately.
  • PDF byte size and whether images and every page are present.
  • Text readability and visual sharpness at the size users will view or print.
  • Whether repeated exports remain stable without memory-related failures.

Test on representative iOS Safari and Android browsers rather than extrapolating from a desktop run. A setting that produces a small PDF may still fail the readability or completeness requirement.

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

Troubleshoot common mobile export failures

Symptom Likely cause What to check or change
Export is slow before a file appears Large capture area, high default device-pixel-ratio scale, or costly DOM reconstruction Time capture separately; capture only needed content and compare explicit scale values on a phone.
PDF is blank or only partly rendered on iPhone Canvas dimensions or area exceeded a device-dependent platform limit Reduce capture dimensions or render long content as separate pages; test on the affected iOS Safari device.
Remote images are missing Image server does not permit CORS, or the request otherwise fails Check response headers; use a permitted same-origin proxy or omit/replace the image. useCORS cannot bypass origin policy.
Export looks different from the page html2canvas reconstructs from supported DOM/CSS rather than taking a native screenshot Check unsupported styling, responsive layout dimensions, and browser-specific rendering against the documentation.
Offscreen text or sections disappear cullOffscreen was enabled for content that the PDF was expected to include Disable culling for complete-document output or capture the content in page-sized sections.
Later exports behave inconsistently Captures may share the image cache or compete for device memory Avoid clearing the shared cache during concurrent captures; serialize work and inspect memory behavior on target phones.
Canvas generation is quick but download still feels slow PDF assembly or browser download/share handoff dominates Measure those phases independently and compare Blob, ArrayBuffer, or save-based workflows in the actual app.

Or skip the browser setup

If you need a screenshot or PDF of a webpage rather than a PDF rendered from your app’s own DOM, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. For example, this cURL request saves a WebP screenshot of Stripe:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 and response details. Cookie banners, newsletter popups, and chat widgets are removed before capture; those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and responses include headers indicating the page verdict and billing status. AI agents can use its MCP server tools to take screenshots, get page information, and capture PDFs.

The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Does html2canvas take a real screenshot of the mobile browser?

No. It reconstructs a canvas from the DOM and supported browser-visible styles, so the result can differ from a native screenshot.

Is there one scale value that is fastest on every phone?

No. The appropriate value depends on content, device, browser, and required readability; compare explicit values on the devices you support.

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

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.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

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.