Get Started

Asciidoctor Web PDF provides a standard document layout. To convert an AsciiDoc document using this layout, open a terminal and type:

asciidoctor-web-pdf document.adoc

Asciidoctor Web PDF relies on Puppeteer to generate a PDF from a web page. If you get the following error, make sure that all the necessary dependencies are installed:

> Unable to generate the PDF - Error: TimeoutError: Timed out after 30000 ms while trying to connect to Chrome!

Useful CLI options

Asciidoctor Web PDF exposes all the standard Asciidoctor CLI options (-a, -r, --extension, -T, etc.), plus a few options specific to the PDF conversion:

Option Description

-w, --watch

Watch the source file (and included files) and regenerate the PDF on every change.

--preview

Open a browser so you can inspect the rendered HTML before it is converted to PDF.

--preserve-html

Keep the intermediate HTML file after conversion instead of deleting it.

--template-require <script>

Load a custom layout before converting the document.

Run asciidoctor-web-pdf --help for the full list of options.