Troubleshooting
Troubleshooting
Selectable text is not pixel-identical to the browser
Use render-mode="canvas" for maximum CSS fidelity.
Selectable-text mode intentionally prioritizes real PDF text and vector output.
Link looks like text but is not clickable
Make sure links are enabled:
const htmlToPdfOptions = {
enableLinks: true,
}
Also verify the source element is a real anchor with a valid href.
Link text looks stretched
Reduce large letter-spacing, transforms, and tight fixed widths in selectable-text mode.
Logo looks stretched
Header/footer logo dimensions are maximum bounds and preserve the source aspect ratio.
For normal content images:
img {
width: auto;
height: auto;
max-width: 100%;
object-fit: contain;
}
Header/footer overlaps content
Increase headerHeight / footerHeight, or reduce content size.
For selectively targeted headers, only target pages receive the extra header space. If excluded pages still have top spacing, check explicit htmlToPdfOptions.margin.
Header or footer image is missing
Check:
- URL accessibility
- CORS
- data URL validity
headerLogoEnabledfooterLogoEnabled
HTML header/footer is not visible
Check that:
- related header/footer is enabled
- HTML string is non-empty
- footer uses
footer-mode="html" - content fits inside configured height
Blank page around a manual break
Use only:
.html2pdf__page-break {
display: block;
height: 0;
clear: both;
}
Do not add break-before or page-break-before to the same helper.
Background watermark is hidden
Opaque PDF content can cover a DOM background watermark.
Use a foreground watermark or transparent export content where appropriate.
PDF is blurry
In canvas mode, increase pdfQuality or htmlToPdfOptions.html2canvas.scale carefully.
Selectable-text body text remains vector text and does not depend on html2canvas resolution.
Large document generation is slow
Reduce:
- canvas scale where relevant
- image dimensions
- document complexity
- simultaneous PDF generation
Large encrypted Canvas PDFs can show substantially higher memory retention than unencrypted Canvas PDFs in Chromium. Raw jsPDF-only isolation reproduced the same encrypted-raster retention pattern outside the Vue lifecycle, so this is tracked as an upstream/dependency concern rather than described as a confirmed permanent Vue memory leak. Selectable-text mode did not show the same severe raster-memory pattern in the package benchmarks.
