Dev.to
6/20/2026

How to Generate a PDF from JSON in Node.js (without a headless browser)
Short summary
Generate PDFs directly from JSON via API instead of shipping 300MB Chromium binaries. Separate document design (JSON) from data values, POST to the API, and receive instant editable PDF links. Bonus: integrated MCP server lets Claude agents auto-generate the document JSON.
- •Eliminate headless browser overhead by describing PDF structure as JSON and posting it to an API
- •Get back editable, downloadable PDF links that can be reviewed before deployment
- •MCP server integration enables Claude agents to generate document JSON automatically
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



