How to Fix Grey Stripes in jsPDF Images
Grey stripes in jsPDF have several possible causes. Use this diagnostic workflow to isolate image, alias, PNG, viewer, and rendering problems.

Grey stripes in a jsPDF image do not identify one universal bug. The reliable fix is to isolate the input representation, image format, jsPDF version, browser or worker environment, and PDF viewer. Start with a minimal reproduction, compare the PDF in a second viewer, then test direct canvas input, distinct image aliases, and a canvas-converted image.
The current jsPDF addImage reference documents data URLs, HTML image elements, canvas elements, typed arrays, and RGBA image data. The sections below turn those options into a repeatable diagnosis.
Quick diagnosis checklist
- Record the exact jsPDF version, browser or worker runtime, source image type, image format, and PDF viewer.
- Save the original image and a minimal PDF reproduction.
- Open the same PDF in a second viewer. A difference between viewers points to a rendering-path difference, not a confirmed jsPDF cause.
- If the source is a canvas, compare direct canvas input with a PNG data URL.
- If you add multiple images, make every explicit alias unique.
- If the console reports a PNG filter or offset error, compare a canvas-produced copy and, only as a diagnostic, a JPEG copy.
- Check transparency requirements before accepting JPEG as a workaround.
Minimal reproduction
Keep the reproduction small enough that you can change one variable at a time. This example creates a canvas, adds it to a PDF, and downloads the result.

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>jsPDF image reproduction</title>
<script src="https://cdn.jsdelivr.net/npm/jspdf@latest/dist/jspdf.umd.min.js"></script>
<button id="make-pdf">Create PDF</button>
<script>
document.querySelector('#make-pdf').addEventListener('click', () => {
const canvas = document.createElement('canvas');
canvas.width = 800;
canvas.height = 500;
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#ffffff';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#1f2937';
ctx.fillRect(40, 40, 720, 420);
ctx.fillStyle = '#60a5fa';
ctx.fillRect(80, 80, 300, 120);
const { jsPDF } = window.jspdf;
const doc = new jsPDF({ unit: 'pt', format: 'letter' });
doc.addImage(canvas, 'PNG', 40, 40, 532, 332);
doc.save('reproduction.png-input.pdf');
});
</script>