# pdfmake

> Client/server side PDF printing in pure JavaScript

Latest version **0.3.11** (published 2026-06-12) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 63/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; has provenance; high quality score; popular repo.

Warnings: low downloads; no esm support; large bundle; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.11 |
| Published | 2026-06-12 |
| First published | 2014-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/pdfmake) |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 3 |
| Unpacked size | 14.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 12350 |
| Author | Bartek Pampuch |
| Maintainers | bpampuch, danawoodman, miltador, liborm85 |
| Keywords | pdf, javascript, printing, layout |

## Links

- npm: https://www.npmjs.com/package/pdfmake
- Repository: https://github.com/bpampuch/pdfmake
- Homepage: http://pdfmake.org
- Issues: https://github.com/bpampuch/pdfmake/issues
- npm.io page: https://npm.io/package/pdfmake

## Dependencies (3)

- [pdfkit](https://npm.io/package/pdfkit.md) ^0.19.1
- [xmldoc](https://npm.io/package/xmldoc.md) ^2.0.3
- [linebreak](https://npm.io/package/linebreak.md) ^1.1.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

- 0.3.11 (latest) — 2026-06-12
- 0.3.0 (beta) — 2026-01-01
- 0.3.10 — 2026-06-07
- 0.3.9 — 2026-05-23
- 0.3.8 — 2026-05-06
- 0.3.7 — 2026-03-17
- 0.3.6 — 2026-03-10
- 0.3.5 — 2026-02-22
- 0.3.4 — 2026-02-13
- 0.3.3 — 2026-01-18
- 0.3.2 — 2026-01-11
- 0.2.23 — 2026-01-11
- 0.3.1 — 2026-01-07
- 0.2.22 — 2026-01-07
- 0.3.0-beta.19 — 2025-12-22
- … 109 more at https://npm.io/package/pdfmake/versions

## README

# pdfmake [![Node.js CI][githubactions_img]][githubactions_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url]

[githubactions_img]: https://github.com/bpampuch/pdfmake/actions/workflows/node.js.yml/badge.svg?branch=master
[githubactions_url]: https://github.com/bpampuch/pdfmake/actions

[github_img]: https://img.shields.io/github/release/bpampuch/pdfmake.svg?colorB=0E7FBF
[github_url]: https://github.com/bpampuch/pdfmake/releases/latest

[npm_img]: https://img.shields.io/npm/v/pdfmake.svg?colorB=0E7FBF
[npm_url]: https://www.npmjs.com/package/pdfmake


PDF document generation library for server-side and client-side in pure JavaScript.

Check out [the playground](http://bpampuch.github.io/pdfmake/playground.html) and [examples](https://github.com/bpampuch/pdfmake/tree/master/examples).

### Features

* line-wrapping,
* text-alignments (left, right, centered, justified),
* numbered and bulleted lists,
* tables and columns
  * auto/fixed/star-sized widths,
  * col-spans and row-spans,
  * headers automatically repeated in case of a page-break,
  * snaking columns (newspaper-style layout where content flows column-to-column),
* images and vector graphics,
* convenient styling and style inheritance,
* page headers and footers:
  * static or dynamic content,
  * access to current page number and page count,
* background-layer,
* page dimensions and orientations,
* margins,
* document sections,
* custom page breaks,
* font embedding,
* support for complex, multi-level (nested) structures,
* table of contents,
* helper methods for opening/printing/downloading the generated PDF,
* setting of PDF metadata (e.g. author, subject).

## Documentation

**Documentation URL: https://pdfmake.github.io/docs/**

Source of documentation: https://github.com/pdfmake/docs **Improvements are welcome!**

## Building from sources

using npm:
```
git clone https://github.com/bpampuch/pdfmake.git
cd pdfmake
npm install
npm run build
```

using yarn:
```
git clone https://github.com/bpampuch/pdfmake.git
cd pdfmake
yarn
yarn run build
```

## License
MIT

## Authors
* [@bpampuch](https://github.com/bpampuch) (founder)
* [@liborm85](https://github.com/liborm85)

pdfmake is based on a truly amazing library [pdfkit](https://github.com/devongovett/pdfkit) (credits to [@devongovett](https://github.com/devongovett)).

Thanks to all contributors.

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