Developer wraps headless Chromium in a single HTTP endpoint for PDF generation
A developer built a lightweight REST API called SnappDF that converts any web page into a PDF using a single curl command, avoiding the need to run Puppeteer directly on a server. The tool uses headless Chromium under the hood, preserving CSS, web fonts, and page layout in the output file. It supports query parameters for paper format, orientation, scale, background color, and a waitForSelector option that delays rendering until a specific DOM element appears — useful for JavaScript-heavy pages. The creator built it primarily to archive invoice pages for bookkeeping on a resource-constrained VPS. The project is open source on GitHub and a public demo endpoint is available for testing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in