Automatically generate PDF invoices or receipts from an HTML template by posting a URL to the API.
Take screenshots of web pages programmatically for monitoring, archiving, or visual testing.
Render JavaScript-heavy single-page apps to PDF for reporting or offline sharing.
Do not expose to the public internet without access controls, the service runs JavaScript in Chrome and can read host machine files.
This project is a small API service that converts web pages into PDF files or screenshot images. You give it a URL or raw HTML, and it returns a rendered PDF or PNG, using a full instance of Google Chrome running in the background without a visible window (called headless Chrome). The result matches what you would get if you opened the page in a real Chrome browser and printed it to PDF. The service is built primarily for generating documents like receipts, invoices, and reports. Any web page that can be opened in Chrome can be rendered, including single-page applications that load their content via JavaScript. An option called scrollPage triggers the browser to scroll the page to the bottom before rendering, which helps capture pages that load images or content only as the user scrolls down. Configuration is done through URL query parameters or a JSON body in a POST request. You can control the output format (PDF or image), page size, margins, orientation, whether to emulate print or screen styles, and how long to wait before capturing. The API uses Puppeteer internally, a Node.js library that controls Chrome programmatically. Page size, margins, and scale are all adjustable. The README includes a prominent security warning: because the service runs JavaScript inside a real Chrome session on the server, it could be used to read files from the host machine. It should not be exposed to the public internet without careful access controls. Deployment to Heroku is available with a one-click button. Running it locally requires Node.js and access to Chrome. A Docker image from a third party is also referenced in the README.
← alvarcarto on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.