# Note PDF exporter dependencies

These files are loaded from this website only when a reader downloads a note.
They are unmodified upstream browser distributions / static font binaries. No
CDN, service, account or server renderer is used while exporting.

| Component | Version | Source | Licence |
| --- | --- | --- | --- |
| jsPDF | 4.2.1 | https://github.com/parallax/jsPDF/releases/tag/v4.2.1 | MIT; LICENSE-jsPDF.txt |
| html2canvas | 1.4.1 | https://github.com/niklasvh/html2canvas/releases/tag/v1.4.1; npm package dist/html2canvas.min.js | MIT; LICENSE-html2canvas.txt |
| DOMPurify | 3.4.17 | https://github.com/cure53/DOMPurify/releases/tag/3.4.17 | Apache 2.0 or MPL 2.0; LICENSE-DOMPurify.txt |
| Noto Serif (regular, bold, italic, bold italic) | 2.007 | https://github.com/notofonts/noto-fonts/tree/main/hinted/ttf/NotoSerif | SIL OFL 1.1; LICENSE-NotoSerif.txt |

`checksums.json` records SHA-256 of the vendored distributions and licences.

html2canvas's configuration is documented at
https://html2canvas.hertzen.com/configuration. The exporter renders each A4
content area at approximately 300 dpi and adds an invisible, embedded Unicode
text layer at the browser's measured line positions for selection and search.
The drawing canvas is opaque RGB because paper has no transparency. This avoids
an unused alpha channel in native PNG encoding and gives the PNG/JPEG size
comparison a fair basis. Pages use the smaller encoding; PNG uses jsPDF's FAST
lossless compression. Representative note-page benchmarks found MEDIUM/SLOW
larger and slower, so increasing compression effort would not improve exports.
MathJax glyph references and authored diagrams are resolved to self-contained,
high-resolution PNGs first. The exporter paginates at semantic block boundaries,
repeats table headers, expands solutions and excludes website controls. Links
remain clickable. Rasterising the visual page preserves inline maths alignment
and exact typography across devices; it avoids jsPDF's HTML canvas context's
different text and image positioning / glyph metrics.

If updating a component, verify its official release and licence, replace its
distribution without local edits, refresh the checksums and run the note PDF
audit including visual inspection of maths, diagrams and page boundaries.
