# PDF reader assets in this directory

These files are copied, unmodified, from the `pdfjs-dist` npm package that the site already uses to read PDFs. `scripts/security/sync-pdfjs-assets.mjs` makes the copy; the package version and the SHA-256 of every file are recorded in `manifest.security.json` and checked by `npm run security:wasm`, which also fails if a copy differs from the installed package's file.

| Files | What | Licence | Source |
|---|---|---|---|
| `<version>/cmaps/*.bcmap` | Adobe character maps, in pdf.js's packed format. Needed to read text in fonts that are not embedded, as in most Japanese, Chinese and Korean PDFs | BSD-3-Clause, see `<version>/cmaps/LICENSE` | https://github.com/adobe-type-tools/cmap-resources |
| `<version>/wasm/openjpeg.wasm`, `openjpeg_nowasm_fallback.js` | OpenJPEG, the JPEG 2000 picture decoder, as built by the pdf.js project | BSD-2-Clause, see `LICENSE_OPENJPEG` and `LICENSE_PDFJS_OPENJPEG` | https://github.com/mozilla/pdf.js.openjpeg |
| `<version>/wasm/jbig2.wasm`, `jbig2_nowasm_fallback.js` | The JBIG2 and CCITT fax picture decoder (black-and-white scans) from PDFium, as built by the pdf.js project | BSD-3-Clause and Apache-2.0 for PDFium (`LICENSE_JBIG2`, which holds both notices); Apache-2.0 for the pdf.js build (`LICENSE_PDFJS_JBIG2`) | https://pdfium.googlesource.com/pdfium |
| `<version>/wasm/quickjs-eval.wasm`, `quickjs-eval.js` | QuickJS, the sandbox pdf.js uses to run scripts inside PDF forms, as built by the pdf.js project. Copied with the rest of the package's `wasm` directory; the site never turns on PDF scripting, so the reader does not load it | MIT (`LICENSE_QUICKJS`, `LICENSE_PDFJS_QUICKJS`) | https://bellard.org/quickjs/ |
| `<version>/wasm/qcms_bg.wasm` | qcms, colour profile conversion, as built by the pdf.js project. Copied with the rest of the package's `wasm` directory; the reader does not load it with this site's settings | MIT for qcms (`LICENSE_QCMS`); MIT for the pdf.js build (`LICENSE_PDFJS_QCMS`) | https://github.com/mozilla/pdf.js.qcms |

pdf.js itself is licensed under the Apache License, Version 2.0: https://github.com/mozilla/pdf.js

The reader fetches these files from this site only, under `/pdfjs/<version>/`.
