Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →If a PDF produced with jsPDF looks stretched, squashed, or broken across pages, first identify the rendering path and version. addHTML is a legacy plug-in API (commonly found in jsPDF 1.3.3-era builds); current jsPDF uses the html() module. html2pdf.js is a separate wrapper with its own page-break settings. Their options are not interchangeable.
The reliable fix is to trace dimensions through the whole pipeline: CSS layout, html2canvas output, and PDF page placement. Then configure scaling and page breaks for the API your project actually runs.
1. Identify the API and installed version
Open the browser bundle or package lock and record the exact jsPDF version. Also search the export code for the method being called:
doc.addHTML(element, options, callback)indicates the legacy plug-in.doc.html(element, options)is the current jsPDF HTML module.html2pdf().from(element).save()is html2pdf.js, which combines jsPDF and html2canvas.
Do not copy a pagebreak option from html2pdf.js into addHTML, or copy legacy pagesplit behavior into doc.html. Check the package version and the bundled source before changing options.
#1 Best Overall
- INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
- COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
- ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
- HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
Why the distinction matters
The old plug-in renders a canvas and, when pagesplit is enabled, cuts a canvas taller than the page into successive page-height slices. That is raster slicing, not semantic HTML reflow. A split can therefore cut a line, image, or card at an arbitrary pixel.
The current HTML module also relies on browser rendering (including html2canvas in the documented path), but its container and html2canvas.windowWidth settings have different jobs. html2pdf.js adds CSS-aware page-break modes on top. Treat each path as a separate configuration problem.
2. Trace every dimension before changing scale
Stretching usually appears when one coordinate system is mistaken for another. Capture these values while the export runs:
- Inspect the source element with
getBoundingClientRect(). Record its CSS width and height in pixels. - Record the computed styles, especially
width,max-width, transforms, and active media queries. - Inspect the rendered canvas width and height after html2canvas completes.
- Record the jsPDF page size and orientation. A4 portrait and Letter portrait have different physical dimensions.
- Record the width and height passed to
addImage(or the equivalent placement option).
const box = document.querySelector('#invoice');
const rect = box.getBoundingClientRect();
const style = getComputedStyle(box);
console.table({
cssWidth: rect.width,
cssHeight: rect.height,
computedWidth: style.width,
computedHeight: style.height,
devicePixelRatio: window.devicePixelRatio,
viewportWidth: window.innerWidth
});
If the canvas aspect ratio differs from the source element, the renderer or CSS changed the layout. If the aspect ratio is correct but the PDF is distorted, the placement width and height are being forced independently. Preserve the ratio: calculate one dimension from the other instead of supplying unrelated multipliers.
Recommended Free Tools
Container width versus windowWidth
The element’s export width controls the layout box. html2canvas.windowWidth emulates a browser viewport for media queries. Increasing it can switch the page from a mobile breakpoint to a desktop breakpoint without making the PDF physically wider. Set it deliberately, and verify which CSS rules are active at export time.
Rank #2
- CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
- INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
- PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
- ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
3. Fixing legacy addHTML with pagesplit
In a legacy project, start with a deterministic page size and a known output width. Render the element, then place the resulting canvas at a proportional height. A minimal pattern is:
const doc = new jsPDF('p', 'pt', 'a4');
const element = document.getElementById('invoice');
doc.addHTML(element, {
pagesplit: true,
image: { type: 'jpeg', quality: 0.95 },
html2canvas: {
scale: 1,
background: '#ffffff'
}
}, () => {
doc.save('invoice.pdf');
});
Use the options supported by the particular plug-in build; old distributions vary. If the output is stretched, do not raise scale first. Compare the canvas dimensions and the page dimensions. A higher scale increases pixel density; it does not correct an incorrect aspect ratio or a wrong page width.
When legacy slicing is the wrong tool
If a table row, heading, or image must stay together, canvas slicing cannot understand that requirement. Reduce the source content, insert deliberate breaks in the HTML, or migrate to a maintained HTML workflow. Expect raster output characteristics: text may not remain selectable, and large canvases can produce large files.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →4. Current jsPDF html() workflow
For current jsPDF, pass the element and keep sizing responsibilities explicit. This example uses the element’s width and lets the renderer determine height proportionally:
import { jsPDF } from 'jspdf';
const element = document.querySelector('#report');
const rect = element.getBoundingClientRect();
const doc = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' });
const pageWidth = doc.internal.pageSize.getWidth();
const margin = 36;
const targetWidth = pageWidth - margin * 2;
await doc.html(element, {
margin,
autoPaging: 'text',
width: targetWidth,
windowWidth: Math.ceil(rect.width),
html2canvas: {
scale: 1,
useCORS: true,
windowWidth: Math.ceil(rect.width)
}
});
doc.save('report.pdf');
Option names differ between jsPDF releases, so verify them against the installed version. The important rules are consistent: use a single target width, preserve the source aspect ratio, and set viewport emulation intentionally. Avoid CSS transforms such as transform: scale() on the export root unless you have measured their effect.
Rank #3
- SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
- INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
- KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
- PREMIUM SUPPORT - Strong technical expertise to solve issues faster
- THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
5. Page breaks with html2pdf.js
If your code uses html2pdf.js, configure page breaks there rather than in addHTML. It documents CSS page-break rules, the legacy html2pdf__page-break class, and modes including before, after, and avoid.
html2pdf()
.set({
margin: 36,
filename: 'report.pdf',
image: { type: 'jpeg', quality: 0.95 },
html2canvas: { scale: 1, useCORS: true },
jsPDF: { unit: 'pt', format: 'a4', orientation: 'portrait' },
pagebreak: {
mode: ['css', 'legacy'],
before: '.page-start',
after: '.page-end',
avoid: ['.keep-together', 'tr']
}
})
.from(document.querySelector('#report'))
.save();
Add page-break-before: always, break-before: page, or break-inside: avoid in print CSS where appropriate. Use avoid-all selectively: it can move large blocks and create unexpectedly sparse pages. An element taller than one page cannot be kept intact; design a split-friendly version for such content.
6. Images, CORS, and missing content
html2canvas follows browser canvas security rules. Cross-origin images may be skipped when they would taint the canvas. Enable CORS on the image host, serve images from the same origin, or use a suitable proxy as described by html2canvas. A missing image can change layout height and make a page appear to split incorrectly, so check the browser console and the network panel before tuning pagination.
Wait for fonts and images before exporting:
await document.fonts.ready;
await Promise.all([...document.images].map(img => {
if (img.complete) return Promise.resolve();
return new Promise(resolve => {
img.addEventListener('load', resolve, { once: true });
img.addEventListener('error', resolve, { once: true });
});
}));
7. A practical diagnostic checklist
- Wrong breakpoint: the export uses mobile CSS. Set and log
windowWidth; remove accidental viewport emulation. - Everything is uniformly wider or narrower: compare canvas and PDF aspect ratios. Correct the target width, not the density scale.
- Only page boundaries look wrong: use html2pdf.js page-break configuration or explicit CSS breaks; legacy slicing cannot reason about elements.
- Text or images vanish: inspect CORS, failed requests, lazy loading, and font readiness.
- Blank or enormous PDF: reduce canvas scale, split very tall documents, and check for CSS transforms or runaway dimensions.
- Different results across browsers: compare computed styles, fonts, device pixel ratio, and image availability in each browser.
8. Performance, reliability, and cost considerations
Canvas-based conversion is memory-intensive for long pages. Render sections separately when a single canvas becomes too tall, release temporary canvases, and avoid exporting hidden elements with zero or unstable dimensions. Use a lower scale only after confirming that the layout is correct; it trades detail for memory and file size.
There is no universal best path. Legacy addHTML may be the least disruptive fix for an old application, html2pdf.js offers explicit break controls, and current jsPDF HTML support is preferable when you can update and test the dependency. None guarantees semantic pagination for every CSS layout.
Rank #4
- 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
Or skip the browser setup
ScreenshotNeo can capture a URL or produce a PDF through one request, so you do not have to maintain browser launch, viewport, cookie, and page-break plumbing. Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.
Free tools Windows power users keep installed
One-click scans. No signup required.
See the parameter reference in the ScreenshotNeo documentation. 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}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
Every feature is on every plan: full-page lazy-image loading, CSS-selector element capture, device and viewport controls, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, waits, request blocking, headers and cookies, geolocation, resizing, caching, signed links, asynchronous webhooks, bulk capture, and a usage API. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account to try it.
Frequently Asked Questions
Can I make a multi-page PDF fit on one page?
Only by shrinking the entire document, which can make text unreadable. For usable output, keep a physical page size and control breaks instead.
Does increasing html2canvas scale fix stretched content?
No. Scale changes pixel density. Correct the layout width, viewport emulation, and proportional PDF placement first.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWhy is one table row split between pages?
Legacy canvas slicing is pixel-based. Use html2pdf.js CSS or pagebreak controls, or restructure the row so it fits within a page.
Will canvas-based PDFs keep selectable text?
Not necessarily. The html2pdf.js documentation describes a rendered-image approach, which can make text non-selectable/searchable and increase file size.
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.

