# asciidoctor-pdf

> A PDF converter for AsciiDoc based on web technologies

Latest version **1.0.3** (published 2026-08-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install asciidoctor-pdf
pnpm add asciidoctor-pdf
yarn add asciidoctor-pdf
bun add asciidoctor-pdf
```

Provides the commands `asciidoctor-pdf`, `asciidoctor-web-pdf`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2026-08-22 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=21 |
| Dependencies | 14 |
| Unpacked size | 2.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 493 |
| Author | Guillaume Grossetie |
| Maintainers | ggrossetie |
| Keywords | asciidoc, asciidoctor, pdf |

## Links

- npm: https://www.npmjs.com/package/asciidoctor-pdf
- Repository: https://github.com/ggrossetie/asciidoctor-web-pdf
- Homepage: https://github.com/ggrossetie/asciidoctor-web-pdf#readme
- Issues: https://github.com/ggrossetie/asciidoctor-web-pdf/issues
- npm.io page: https://npm.io/package/asciidoctor-pdf

## Dependencies (14)

- [mathjax](https://npm.io/package/mathjax.md) ^4.1.2
- [pdf-lib](https://npm.io/package/pdf-lib.md) ~1.17
- [chokidar](https://npm.io/package/chokidar.md) ~3.5
- [fs-extra](https://npm.io/package/fs-extra.md) ~11.1.0
- [puppeteer](https://npm.io/package/puppeteer.md) 25.1.0
- [asciidoctor](https://npm.io/package/asciidoctor.md) >= 4.0.11 < 5
- [highlight.js](https://npm.io/package/highlight.js.md) ^11.11.1
- [html-entities](https://npm.io/package/html-entities.md) ~2.3
- [@puppeteer/browsers](https://npm.io/package/@puppeteer/browsers.md) ~3.0
- [@vivliostyle/viewer](https://npm.io/package/@vivliostyle/viewer.md) 2.44.1
- [@fortawesome/fontawesome-svg-core](https://npm.io/package/@fortawesome/fontawesome-svg-core.md) 6.2.1
- [@fortawesome/free-solid-svg-icons](https://npm.io/package/@fortawesome/free-solid-svg-icons.md) 6.2.1
- [@fortawesome/free-brands-svg-icons](https://npm.io/package/@fortawesome/free-brands-svg-icons.md) 6.2.1
- [@fortawesome/free-regular-svg-icons](https://npm.io/package/@fortawesome/free-regular-svg-icons.md) 6.2.1

## 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

- 1.0.3 (latest) — 2026-08-22
- 1.0.0-beta.4 (testing) — 2026-08-14
- 1.0.2 — 2026-08-19
- 1.0.1 — 2026-08-17
- 1.0.0 — 2026-08-15
- 1.0.0-beta.3 — 2026-08-14
- 1.0.0-alpha.16 — 2022-09-03
- 1.0.0-alpha.15 — 2022-09-03
- 1.0.0-alpha.14 — 2021-11-23
- 1.0.0-alpha.12 — 2021-02-19
- 1.0.0-alpha.11 — 2020-12-06
- 1.0.0-alpha.10 — 2020-10-19
- 1.0.0-alpha.9 — 2020-08-14
- 1.0.0-alpha.8 — 2020-06-13
- 1.0.0-alpha.7 — 2020-03-03
- … 6 more at https://npm.io/package/asciidoctor-pdf/versions

## README

# Asciidoctor Web PDF

[![Build](https://github.com/ggrossetie/asciidoctor-web-pdf/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ggrossetie/asciidoctor-web-pdf/actions/workflows/build.yml)
[![npm version](https://img.shields.io/npm/v/asciidoctor-pdf.svg)](https://www.npmjs.org/package/asciidoctor-pdf)
[![Docker image](https://img.shields.io/docker/v/ggrossetie/asciidoctor-web-pdf?label=Docker%20image)](https://hub.docker.com/r/ggrossetie/asciidoctor-web-pdf)

A PDF converter for AsciiDoc based on web technologies.
It allows complex layouts to be defined with CSS and JavaScript, while writing the content in AsciiDoc.

<table>
  <tr align="center">
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/document/document.pdf">
        <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/document_screenshot.png" />
      </a>
    </td>
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/letter/letter.pdf">
        <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/letter_screenshot.png" />
      </a>
    </td>
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/book/book.pdf">
        <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/book_screenshot.png" />
      </a>
    </td>
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/cheat-sheet/maven-security-cheat-sheet.pdf">
      <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/maven-security-cheat-sheet_screenshot.png" />
      </a>
    </td>
  </tr>
  <tr align="center">
    <td with="25%">
      Document<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/document/"> source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/document/document.pdf"> PDF </a>
    </td>
    <td with="25%">
      Letter<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/letter/"> Source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/letter/letter.pdf"> PDF </a>
    </td>
    <td with="25%">
      Book<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/book/"> source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/book/book.pdf"> PDF </a>
    </td>
    <td with="25%">
      Cheat sheet<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/cheat-sheet/"> Source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/cheat-sheet/maven-security-cheat-sheet.pdf"> PDF </a>
    </td>
  </tr>
</table>
<table>
  <tr align="center">
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/resume/resume.pdf">
        <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/resume_screenshot.png" />
      </a>
    </td>
    <td width="25%">
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/presentation/ioslides/presentation.pdf">
        <img src="https://github.com/ggrossetie/asciidoctor-web-pdf/raw/main/docs/modules/ROOT/images/presentation_screenshot.png" />
      </a>
    </td>
    <td width="25%"></td>
    <td width="25%"></td>
  </tr>
  <tr align="center">
    <td width="25%">
      Resume<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/resume/"> Source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/resume/resume.pdf"> PDF </a>
    </td>
    <td width="25%">
      Presentation<br/>
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/tree/main/examples/presentation/ioslides/"> Source </a> /
      <a href="https://github.com/ggrossetie/asciidoctor-web-pdf/blob/main/examples/presentation/ioslides/presentation.pdf"> PDF </a>
    </td>
    <td width="25%"></td>
    <td width="25%"></td>
  </tr>
</table>

Asciidoctor Web PDF has support for LaTeX-style mathematical equations (via [MathJax](https://www.mathjax.org/)) and syntax highlighting (via [highlight.js](https://highlightjs.org/)).
Many more features can be added by importing an existing JavaScript or CSS framework.

## Quick start

```sh
npm i -g asciidoctor-pdf
asciidoctor-web-pdf document.adoc
```

Or with Docker:

```sh
docker run --rm ggrossetie/asciidoctor-web-pdf --version
```

## Documentation

The full documentation is published at [asciidoctor-web-pdf.netlify.app](https://asciidoctor-web-pdf.netlify.app).

## Contribute!

New contributors are always welcome!
If you discover errors or omissions in the source code or documentation, please don't hesitate to submit an issue or open a pull request with a fix.
See [CONTRIBUTING.adoc](CONTRIBUTING.adoc) to set up your development environment.

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