Thank you for contributing to @missing-elements/pdfjs-viewer.
- Node.js 22 or later
- pnpm 10 or later
- Firefox for browser tests
git clone https://github.com/missing-elements/pdfjs-viewer.git
cd pdfjs-viewer
pnpm install --frozen-lockfile
pnpm exec playwright install firefoxThe dev, build, and test scripts run pnpm sync:pdfjs first. On the first run it downloads the official PDF.js release matching the pdfjs-dist version in package.json into the gitignored public/ folder, so an internet connection is required once per PDF.js version.
Start the development server:
pnpm devRun the test suite:
pnpm test -- --runBuild the package:
pnpm buildThe test and build scripts synchronize the PDF.js runtime assets before
running. The PDF.js release archive is required because the viewer assets are
not published in this repository. Do not commit generated dist or public
output.
Before opening a pull request:
- Keep the change focused and include tests for behavior changes.
- Run the relevant test suite and build locally.
- Update README.md, ACCESSIBILITY.md, or other documentation when the public API, behavior, or user guidance changes.
- Preserve keyboard accessibility and visible focus indicators when changing viewer markup or styles.
- Do not disclose security vulnerabilities in public issues or pull requests; follow SECURITY.md instead.
Describe the problem, the solution, and how you verified the change in the pull request. For user-visible changes, include screenshots or a minimal reproduction when they clarify the result.