Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRender the chart at more source pixels than its final PDF placement requires, keep Chart.js render dimensions separate from CSS display dimensions, and capture only after the final resize has completed. In practice, use a dedicated responsive container, set an export-specific devicePixelRatio, resize the chart to its export dimensions, call toBase64Image(), and pass intentional placement dimensions to jsPDF.addImage(). Enlarging a small canvas with CSS or assigning a high JPEG-quality value cannot restore detail that was never rendered.
Why a Chart.js image becomes blurry in a PDF
CSS size and bitmap size are different
A canvas has a display size in CSS pixels and an internal bitmap size in device pixels. CSS can make a 600-pixel bitmap appear 1,200 pixels wide, but it does not create new chart pixels; labels and one-pixel lines are simply stretched. Chart.js documentation describes CSS-only sizing such as <canvas style='height:40vh; width:80vw'> as invalid behavior because the canvas is resized and becomes blurry.
The chart was rendered for a screen, then enlarged for print
Screen-sized charts often contain fewer pixels than a chart placed across a PDF page. Chart.js provides devicePixelRatio specifically for bitmap conversion and higher-DPI printing. A larger ratio increases the internal canvas dimensions while leaving the intended CSS layout unchanged. Chart.js does not prescribe one universal ratio; select one from the final placement size and validate the resulting PDF.
The capture happened before the final render
toBase64Image() captures the chart’s current state. If you call it before a resize, update, animation, or font load has finished, the image can contain the old dimensions or an incomplete drawing.
#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
The PDF placement is larger than the source image
addImage() receives explicit PDF coordinates and dimensions. Placing a bitmap at a physical size that demands more detail than its pixel dimensions provide exposes softness even when the canvas looked sharp in the browser.
Build the chart with a real responsive container
Put the canvas inside a relatively positioned parent and give that parent the dimensions that control the chart. Let Chart.js manage the canvas bitmap. Do not use CSS width and height on the canvas as your export-resolution mechanism.
<div id='chart-wrap' style='position:relative; width:100%; height:420px'>
<canvas id='sales-chart'></canvas>
</div>
Use responsive:true and, when the parent controls both dimensions, maintainAspectRatio:false. The parent must have a usable height; a zero-height parent gives Chart.js no meaningful render area.
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⁴
Choose an export resolution deliberately
Start with the physical size at which the chart will appear in the PDF. Estimate how many source pixels you want across that placement, then choose CSS export dimensions and a devicePixelRatio that produce at least that many bitmap pixels. There is no official one-size-fits-all DPI or multiplier.
| Decision | What to do | Why it matters |
|---|---|---|
| Final PDF width and height | Set explicit addImage() dimensions in your document units. |
These dimensions determine how far the bitmap is scaled in the PDF. |
| Chart export CSS size | Resize the chart to the intended export width and height before capture. | The layout, line wrapping, and label spacing are calculated for the real export shape. |
| Internal pixel density | Set an export-specific devicePixelRatio; a value such as 3 is an example, not a rule. |
A higher ratio supplies more source pixels for print and zoom, at the cost of memory and rendering time. |
| Aspect ratio | Keep the same width-to-height ratio in the canvas and in the PDF placement. | Independent width and height scaling distorts text and plotted geometry. |
Complete Chart.js-to-jsPDF example
The following browser-side pattern assumes Chart.js and jsPDF are available from your application bundle. It renders a chart at an export size, waits for a frame, captures a PNG, and places it in a PDF without changing its aspect ratio.
import Chart from 'chart.js/auto';
import { jsPDF } from 'jspdf';
const canvas = document.querySelector('#sales-chart');
const wrapper = document.querySelector('#chart-wrap');
const data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [{
label: 'Revenue',
data: [18, 24, 21, 31, 36, 42],
backgroundColor: '#2563eb',
borderColor: '#1d4ed8',
borderWidth: 1
}]
};
const chart = new Chart(canvas, {
type: 'bar',
data,
options: {
responsive: true,
maintainAspectRatio: false,
devicePixelRatio: 3,
animation: false,
plugins: {
legend: { display: true }
},
scales: {
y: { beginAtZero: true }
}
}
});
async function exportChart() {
// CSS pixels used for the export layout. Pick these from the target PDF shape.
const exportCssWidth = 1200;
const exportCssHeight = 675;
wrapper.style.width = `${exportCssWidth}px`;
wrapper.style.height = `${exportCssHeight}px`;
// Explicit dimensions make the export independent of the current screen size.
chart.resize(exportCssWidth, exportCssHeight);
chart.update('none');
// Allow layout and the redraw to settle before capture.
await new Promise(requestAnimationFrame);
const imageData = chart.toBase64Image('image/png');
const doc = new jsPDF({ orientation: 'landscape', unit: 'mm', format: 'a4' });
const margin = 12;
const pdfWidth = 297 - margin * 2;
const aspect = exportCssHeight / exportCssWidth;
const pdfHeight = pdfWidth * aspect;
doc.addImage(imageData, 'PNG', margin, margin, pdfWidth, pdfHeight);
doc.save('sales-chart.pdf');
}
exportChart();
What each export step controls
- Set the parent dimensions. The wrapper establishes the chart’s layout rather than stretching the canvas after rendering.
- Resize explicitly.
chart.resize(width, height)redraws at the export shape. This is important when the chart normally follows a smaller browser viewport. - Disable animation for deterministic capture. With
animation:falseandchart.update('none'), the captured state is not an intermediate animation frame. - Wait, then capture. A frame delay gives the browser time to apply layout and complete the redraw. If your application loads web fonts or data asynchronously, wait for those operations too.
- Place with matching proportions.
addImage()uses PDF units, not CSS pixels. The example converts the image aspect ratio to millimetres and leaves equal margins.
PNG, JPEG, and compression choices
Use PNG when chart text and lines are the priority
PNG is lossless and is usually the safer default for axis labels, grid lines, and flat-color bars. It may produce a larger file, especially for a full-page chart with a photographic background.
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.
Use JPEG when file size matters
toBase64Image('image/jpeg', quality) lets you request JPEG quality, and jsPDF accepts JPEG data in addImage(). Higher quality can reduce block and ringing artifacts, but it cannot add pixels or reverse an oversized PDF placement. Test the actual PDF at normal zoom and at its intended print size.
Preserve transparency intentionally
If the chart needs a transparent background, configure the chart and PDF workflow for that requirement. If a solid page background is acceptable, drawing onto a known background avoids surprises when a viewer displays transparent pixels differently.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Calculate placement instead of guessing
Decide the PDF placement first: for example, a chart that occupies most of an A4 landscape page has a very different requirement from a small chart in a report column. Choose export CSS dimensions with the same aspect ratio, then increase devicePixelRatio until the internal bitmap has comfortable detail at that placement. Inspect the generated PDF rather than relying on browser appearance.
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
If the chart is still soft, inspect the canvas dimensions in the browser:
console.log(canvas.width, canvas.height, canvas.clientWidth, canvas.clientHeight);
width and height are bitmap pixels; clientWidth and clientHeight are displayed CSS pixels. A large CSS size paired with a small bitmap confirms that the chart is being enlarged rather than rendered at higher resolution.
Why common fixes fail
- Only changing canvas CSS width and height: this stretches existing pixels. Resize the Chart.js render area and render again.
- Calling
toBase64Image()immediately after changing dimensions: the method returns the current state, so capture afterresize(),update(), layout changes, and any required asynchronous work. - Increasing JPEG quality alone: quality changes compression artifacts, not source resolution.
- Using a large, arbitrary DPR everywhere: very large canvases consume more memory and take longer to render. Choose a ratio from the final physical placement and validate it.
- Ignoring the parent container: responsive charts need a dedicated, relatively positioned parent with dimensions. Canvas-only CSS sizing can leave the render bitmap out of step with its display size.
- Changing width and height independently in the PDF: non-proportional scaling distorts the chart and can make text look uneven even when the source is sharp.
Troubleshooting blurry Chart.js PDFs
| Symptom | Likely cause | Fix |
|---|---|---|
| Sharp in the browser, blurry in the PDF | The PDF placement is larger than the bitmap supports. | Increase export dimensions or devicePixelRatio, then keep the same aspect ratio in addImage(). |
| Blurry immediately after a responsive resize | Capture occurred before Chart.js finished resizing or updating. | Call chart.resize(), update without animation, wait for a frame, and capture afterward. |
| Labels are clipped or wrapped differently | The chart was laid out at a screen width and then enlarged. | Set the wrapper to export dimensions before resizing and redraw the chart. |
| Only photographs look blocky | JPEG compression, not Chart.js resolution, is dominating the result. | Use PNG for the chart or raise JPEG quality while keeping sufficient source pixels. |
| PDF export uses unexpected dimensions | addImage() dimensions are in PDF units, not pixels. |
Convert the intended placement to the document’s unit system and pass both width and height explicitly. |
| Export consumes excessive memory or becomes slow | The canvas is extremely large or the DPR is unnecessarily high. | Reduce export dimensions or DPR to the smallest value that remains sharp at the target placement. |
| The API call works in one project but not another | jsPDF APIs can vary by installed version; its current main-branch declarations are moving. | Check the jsPDF version installed by your project and confirm that its addImage signature accepts your image input and placement arguments. |
Reliability checklist before shipping
- Render inside a dedicated relatively positioned parent with an explicit height.
- Use Chart.js responsive sizing rather than CSS-only canvas enlargement.
- Set an intentional export
devicePixelRatio; treat any sample value as a starting point, not a standard. - Resize to the export dimensions before calling
toBase64Image(). - Wait for redraw, data, and fonts that affect the chart.
- Prefer PNG when small text and lines must remain lossless.
- Pass explicit PDF placement width and height and preserve aspect ratio.
- Open the resulting PDF at normal zoom and at the physical size at which it will be printed.
Or skip the browser setup
If your chart is already published on a URL and you need an automated page capture rather than an in-memory jsPDF export, ScreenshotNeo can return a screenshot or PDF from one GET request. It accepts the page like a visitor, removes cookie-consent banners, newsletter popups, and chat widgets before capture, and lets you control options such as viewport, device preset, retina scale, full-page loading, waiting, custom CSS or JavaScript, and PDF settings. The API reports whether a response was a clean shot and whether it was billed: bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing.
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 minuteUse the API documentation at screenshotneo.com/docs/ for the complete parameter list. A minimal call is:
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)
r.raise_for_status()
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(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Every feature is included on every plan: 1,000 screenshots per month are free with no card, and paid plans start at $5 for 3,000 shots. If that workflow fits your page, sign up for the free plan.
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.

