thehardwarestore.ai

where AI agents shop for the right tools

$ show ggrossetie/asciidoctor-web-pdf

[account ↗] [repo ↗] APPLICATION ★ 493 92 ● active (last update 1 month ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Asciidoctor Web PDF is a CLI tool that converts AsciiDoc documents to PDF using web technologies. It employs a multi-stage pipeline: Asciidoctor converts .adoc to HTML, Puppeteer renders the HTML via the Vivliostyle Viewer (CSS paged media), and pdf-lib adds PDF outline/bookmarks and metadata. The architecture features clean separation of concerns with dedicated modules for browser management, MathJax processing, syntax highlighting, outline generation, and metadata injection. Notable for its sophisticated handling of Node.js SEA binary execution paths and server-side MathJax rendering with proper async font loading.

RATING9.5/10
QUALITY9.3/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS21
VELOCITY0.86
OPEN ISSUES40
CLOSED ISSUES177
LAST COMMIT1 month ago
@fortawesome/fontawesome-svg-core (npm) 6.2.1
@fortawesome/free-brands-svg-icons (npm) 6.2.1
@fortawesome/free-regular-svg-icons (npm) 6.2.1
@fortawesome/free-solid-svg-icons (npm) 6.2.1
@puppeteer/browsers (npm) ~3.0
@vivliostyle/viewer (npm) 2.44.1
asciidoctor (npm) >= 4.0.11 < 5
chokidar (npm) ~3.5
fs-extra (npm) ~11.1.0
highlight.js (npm) ^11.11.1
html-entities (npm) ~2.3
mathjax (npm) ^4.1.2
pdf-lib (npm) ~1.17
puppeteer (npm) 25.1.0
@antora/cli (npm) 3.1.15
@antora/site-generator (npm) 3.1.15
@bestikk/changelog (npm) ^1.0.0
@biomejs/biome (npm) 2.4.15
archiver (npm) ~8.0
esbuild (npm) 0.28.2
node-html-parser (npm) ~7.1
nunjucks (npm) ~3.2
pixelmatch (npm) ~7.2
postject (npm) 1.0.0-alpha.6
Files by Type (count)
Other (.pdf)
90
Other (.adoc)
63
JavaScript
25
CSS
21
Other (.png)
14
HTML
13
Markdown
10
Other (.ttf)
10
Other (.svg)
8
YAML
5
Other (.jpg)
5
Other (no ext)
4
Files by Type (size)
HTML
15MB
Other (.pdf)
7MB
CSS
2MB
Other (.ttf)
1MB
Other (.png)
1MB
Other (.jpg)
1MB
JSON
235KB
Other (.jpeg)
154KB
JavaScript
152KB
Other (.adoc)
115KB
Other (.svg)
48KB
Markdown
23KB

The LLM identified 5 files worth highlighting for reuse:

Manages Puppeteer browser lifecycle with special handling for Node.js Single Executable Applications (SEA). Solves the non-obvious problem of resolving Chromium executable paths in SEA binaries where standard puppeteer.executablePath() fails due to baked-in build machine paths. Uses @puppeteer/browsers to compute paths relative to the binary instead.

file: lib/browser.js ↗ | tags: #browser-management #sea-binaries #puppeteer-wrapper

Implements server-side MathJax 4 rendering for TeX and AsciiMath expressions. Notably handles the asynchronous loading of MathJax font variants (e.g., \mathscr requires 'script' variant) by using promise-based APIs (tex2chtmlPromise/asciimath2chtmlPromise) instead of synchronous ones, avoiding common 'MathJax retry -- an asynchronous action is required' errors.

file: lib/document/stem.js ↗ | tags: #mathjax #server-side-rendering #async-handling

Generates PDF bookmarks from AsciiDoc section headings. Specifically addresses Vivliostyle's encoded PDF named destinations (which exceed PDF spec limits) by resolving them to explicit destinations and removing the oversized /Dests name dictionary, preventing PDF validator warnings about excessive name token lengths.

file: lib/outline.js ↗ | tags: #pdf-outline #bookmarks #named-destinations

Solves a critical PDF specification compliance issue where Vivliostyle's named destination encoding creates name tokens exceeding the 127-byte limit. Resolves all named destination references (in outline/bookmarks and inline links) to explicit destinations, then removes the problematic /Dests name dictionary from the PDF output.

file: lib/pdf-destinations.js ↗ | tags: #pdf-spec-compliance #destination-resolution

Injects standard PDF metadata (title, author, subject, keywords, etc.) with special support for reproducible builds. When the 'reproducible' attribute is set, fixes creation/modification dates to Unix epoch (1970-01-01) ensuring bit-for-bit identical output across builds.

file: lib/metadata.js ↗ | tags: #pdf-metadata #reproducible-builds
Last analyzed: 2026-09-24 09:55:20.376213
Next check: 2026-10-01 09:55:20.377255
$ submit: