A CLI that crawls a site and turns every page into a PDF

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

Developers who need offline archives of documentation sites can now generate formatted, navigable PDFs with a single command instead of printing pages one by one.

Read this as

Web2pdf is a free command-line tool that turns an entire website into a set of PDFs. You give it one web address, and it automatically follows links on that same site, up to a depth you choose, converting each page into a properly formatted document. Unlike a browser's 'print to PDF', it can add page numbers, a table of contents, and your own custom styling. It suits developers, writers, and anyone who wants to keep tutorials or documentation readable offline.

Web2pdf is a free open-source utility for archiving websites as formatted PDFs, useful for offline documentation and internal reference material. It costs nothing but requires installing system libraries such as Cairo and Pango, which the author flags as the main friction point, with conda recommended for setup. A paid companion service called DocuQueue is suggested for production-scale needs. No competitors' pricing or adoption figures are given.

Web2pdf (github.com/dvcoolarun/web2pdf) is a Python CLI that uses WeasyPrint for PDF rendering, requiring Cairo, Pango, gdk-pixbuf, libffi and pkg-config installed beforehand, ideally via conda. It recursively crawls same-domain links at a configurable depth, with link filtering to block external sites. Output supports custom CSS injection, multi-column layouts, auto page numbers, heading-based table of contents, and explicit page breaks. macOS users may need DYLD_LIBRARY_PATH and PKG_CONFIG_PATH set to /opt/homebrew/lib to fix a libgobject load error.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Web2pdf WeasyPrint DocuQueue conda Cairo Pango GitHub

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading