# PDF.js

> PDF Reader in JavaScript

Source: https://talira.ai/catalog/pdf-js-ce376y3j
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Web app
- Categories: [documents / pdf / viewing](https://talira.ai/categories/documents/pdf/viewing), [documents / pdf / rendering](https://talira.ai/categories/documents/pdf/rendering), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Platforms: web[^3]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^2][^3]
- Free tier: yes[^2][^3]
- Self-hostable: yes[^3]
- Backed by: [Mozilla](https://talira.ai/orgs/mozilla.md)

PDF.js is Mozilla's PDF viewer built with HTML5: a library that parses and renders PDFs in the browser, plus a complete viewer application. It's the PDF viewer built into Firefox, and Mozilla describes it as a general-purpose, web standards-based platform for parsing and rendering PDFs. Apps embed it through the pdfjs-dist package to draw pages on a canvas, extract text, or show the full viewer. An online debugger shows a PDF's internal structure.

## Links

- Website: https://mozilla.github.io/pdf.js/
- GitHub: https://github.com/mozilla/pdf.js
- Docs: https://mozilla.github.io/pdf.js/getting_started/

## Ways to install

### Package managers

- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/source/stable/pdf.js>[^1]

## Problems it solves

- show a PDF inside my web app without relying on the browser's built-in viewer
- render each page of a PDF to a canvas so I can draw boxes on top
- extract the text and its positions from a PDF in JavaScript
- an open source PDF viewer I can embed and style
- take screenshots of PDF pages in a headless browser for visual tests
- render PDF thumbnails in the browser
- inspect the internal structure of a broken PDF

## Features

- PDF parsing and rendering
- full viewer application
- built into Firefox
- official Chrome extension
- PDF debugger for a file's internal structure
- a legacy build for older browsers

## Trust

Overall: 0.76 out of 1.
Signals: maintenance 1.00, adoption 0.95, momentum 0.74, community 1.00, backing 0.30, extensibility 0.00.

- last commit 8 days ago
- 1047 commits in the last 90 days
- latest release v6.5.438 22 days ago
- 54.1k GitHub stars
- 543 contributors
- backed by Mozilla

## Alternatives

- [Apryse SDK (WebViewer)](https://talira.ai/catalog/apryse-sdk-webviewer-69z3ztef.md): Document SDKs for viewing, editing and extracting data across 100+ formats
- [Nutrient (formerly PSPDFKit)](https://talira.ai/catalog/nutrient-formerly-pspdfkit-hx12xdjg.md): The document layer for agents
- [pypdfium2](https://talira.ai/catalog/pypdfium2-2qb89jmf.md): Python bindings to PDFium, reasonably cross-platform
- [hayro](https://talira.ai/catalog/hayro-aqyrj3a8.md): A set of Rust crates for parsing, interpreting and rendering PDF files.
- [pdfium-render](https://talira.ai/catalog/pdfium-render-yyd0t2g5.md): A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.
- [MuPDF](https://talira.ai/catalog/mupdf-a0hpyn67.md): The ultimate library for managing PDF documents

## Sources

[^1]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 21 Nov 2026)
[^2]: https://github.com/mozilla/pdf.js/blob/master/LICENSE (checked 17 Nov 2026)
[^3]: https://github.com/mozilla/pdf.js (checked 17 Nov 2026)
