# pdfjs

> A Portable Document Format (PDF) generation library targeting both the server- and client-side.

Latest version **2.5.4** (published 2025-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install pdfjs
pnpm add pdfjs
yarn add pdfjs
bun add pdfjs
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.4 |
| Published | 2025-07-01 |
| First published | 2013-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=7 |
| Dependencies | 6 |
| Unpacked size | 346.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 817 |
| Author | Markus Ast |
| Maintainers | rkusa |
| Keywords | pdf, generator |

## Links

- npm: https://www.npmjs.com/package/pdfjs
- Repository: https://github.com/rkusa/pdfjs
- Issues: https://github.com/rkusa/pdfjs/issues
- npm.io page: https://npm.io/package/pdfjs

## Dependencies (6)

- [pako](https://npm.io/package/pako.md) ^2.0.3
- [uuid](https://npm.io/package/uuid.md) ^8.3.1
- [unorm](https://npm.io/package/unorm.md) ^1.6.0
- [opentype.js](https://npm.io/package/opentype.js.md) ^1.3.3
- [readable-stream](https://npm.io/package/readable-stream.md) ^3.6.0
- [@rkusa/linebreak](https://npm.io/package/@rkusa/linebreak.md) ^1.0.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 2.5.4 (latest) — 2025-07-01
- 2.5.3 — 2023-12-27
- 2.5.2 — 2023-07-24
- 2.5.1 — 2023-07-23
- 2.5.0 — 2023-05-24
- 2.4.7 — 2021-11-09
- 2.4.6 — 2021-08-23
- 2.4.5 — 2021-07-29
- 2.4.4 — 2021-06-22
- 2.4.3 — 2021-04-22
- 2.4.2 — 2020-10-23
- 2.4.1 — 2020-08-09
- 2.4.0 — 2020-08-08
- 2.3.9 — 2020-06-09
- 2.3.8 — 2020-05-22
- … 37 more at https://npm.io/package/pdfjs/versions

## README

![pdfjs](https://cdn.rawgit.com/rkusa/pdfjs/2.x/logo.svg)

A Portable Document Format (PDF) generation library targeting both the server- and client-side.

[![NPM][npm]](https://npmjs.org/package/pdfjs)

[Documentation](docs) | [Changelog](https://github.com/rkusa/pdfjs/blob/master/CHANGELOG.md) | [Playground](https://stackblitz.com/edit/js-hkxfhq?file=index.js) | [Examples](https://github.com/rkusa/pdfjs/tree/master/test/pdfs)

```bash
npm install pdfjs
```

## Maintenance Status

On life-support. No new features planned. Only gets fixes if time allows.
I recommend that you use something else.

## MIT License

[MIT](LICENSE)

[npm]: https://img.shields.io/npm/v/pdfjs.svg?style=flat-square
[deps]: https://img.shields.io/david/rkusa/pdfjs.svg?style=flat-square
[travis]: https://img.shields.io/travis/rkusa/pdfjs/master.svg?style=flat-square

---
_Source: https://npm.io/package/pdfjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
