Mozilla PDF.js
mozilla.github.io
What it is
Mozilla PDF.js is a free, web standards-based platform for parsing and rendering PDF files. Developers can use its display API to render documents and retrieve information, or adapt the viewer layer for a custom interface. That viewer is used in Firefox and project browser extensions. PDF.js renders annotations and supports adding a subset of annotation types, and it supports form filling; OCR is not provided. The project targets HTML5-compliant browsers and includes a legacy build for older browsers, although PDF feature support varies by browser and version. Prebuilt builds are available, with hosted copies listed through jsDelivr, cdnjs, and unpkg. Developers can clone and build it locally, but some browsers require a local web server instead of opening PDFs through file URLs. Cross-origin requests are blocked by default, so CORS or a server proxy may be needed. For large documents, rendering only visible pages can reduce memory use. PDF.js is licensed under Apache 2.0.
Spec sheet
- Purpose
- PDF.js is a web standards-based platform for parsing and rendering PDF files.Read 7 Oct 2026 · mozilla.github.io
- Intended users
- The project describes itself as community-driven and invites contributors, while its library and viewer documentation gives developers ways to embed or build on PDF.js.Read 7 Oct 2026 · github.com
- Free plan
- YesRead 24 Sep 2026 · mozilla.github.io
- API
- The display layer exposes an API for rendering PDFs and retrieving document information.Read 7 Oct 2026 · mozilla.github.io
- Integrations
- PDF.js is built into Firefox 19 and later, and the project provides a Chromium browser extension.Read 7 Oct 2026 · github.com
- Support
- The project points users to GitHub issues for technical problems and its Matrix room for questions or guidance.Read 7 Oct 2026 · github.com
- License
- PDF.js is licensed under Apache 2.0, and its documentation is licensed under CC BY-SA 2.5.Read 7 Oct 2026 · mozilla.github.io
- Annotation tools
- YesRead 24 Sep 2026 · mozilla.github.io
- Annotations
- PDF.js renders annotations for viewing and supports adding a subset of annotation types.Read 7 Oct 2026 · github.com
- Browser support
- The project aims to support HTML5-compliant browsers and provides a legacy build for older browsers; PDF feature support varies by browser and version.Read 7 Oct 2026 · github.com
- Cross-origin constraint
- PDF.js cannot make cross-origin requests by default; the FAQ describes CORS or a server proxy as possible approaches.Read 7 Oct 2026 · github.com
- Distribution
- Prebuilt builds are available, and the project lists jsDelivr, cdnjs, and unpkg as CDNs hosting PDF.js.Read 7 Oct 2026 · mozilla.github.io
- Form filling
- YesRead 24 Sep 2026 · mozilla.github.io
- Large documents
- The FAQ recommends rendering only visible pages to reduce memory use when working with many high-resolution pages.Read 7 Oct 2026 · github.com
- OCR support
- noneRead 24 Sep 2026 · mozilla.github.io
- Platform support
- webRead 24 Sep 2026 · mozilla.github.io
- Security reporting
- The project directs reports about the library or Firefox PDF Viewer to Bugzilla and reports about the Chrome extension to GitHub’s private vulnerability reporting form.Read 7 Oct 2026 · github.com
- Self hosting
- The project documents cloning and building PDF.js locally, and says a local web server is needed because some browsers disallow opening PDFs through file URLs.Read 7 Oct 2026 · mozilla.github.io
- Viewer
- Its viewer layer provides the user interface used in Firefox and project browser extensions, and can be adapted to build a custom viewer.Read 7 Oct 2026 · mozilla.github.io
Plans and prices
Strong points and limits
Strong points
- Free PDF parsing and rendering platform
- Display API exposes rendering and document information
- Viewer layer can be adapted for custom interfaces
- Supports annotations and form filling
- Prebuilt builds and CDN hosting are available
Limits
- No OCR support
- Cross-origin requests are blocked by default
- Browser PDF support varies by version
- Large documents may require visible-page rendering
Who it suits
It suits developers embedding PDF rendering in web applications, browser extensions, or self-hosted viewers. Community contributors can also work with the project through its documented channels.
Verdict
PDF.js provides the core pieces for browser-based PDF viewing and integration, with APIs, a reusable viewer, and annotation support. Developers should account for browser differences, cross-origin configuration, and the lack of OCR.
Where Specifiction places it
- File Reader Software#8 of 248.2
- PDF Readers#8 of 248.3