# reportgen
> reportgen is an HTML to PDF API. Send an HTML template plus JSON data and get back a pixel-accurate PDF, synchronously or asynchronously, with EJS, Handlebars, Go templates or raw HTML.
reportgen turns an HTML template plus a JSON payload into a PDF over a single
HTTP call. It supports four rendering engines (EJS, Handlebars, Go templates and
raw HTML), synchronous generation for small documents and asynchronous
generation with signed download links for large ones. Authentication is via API
key or JWT. Reports are stored in S3-compatible object storage.
## Documentation
- [Introduction](https://docs.reportgen.io/api/introduction): what reportgen does and when to use it
- [Getting started](https://docs.reportgen.io/api/getting-started): first PDF in a few minutes
- [Templating engines](https://docs.reportgen.io/api/engines): EJS, Handlebars, Go templates, raw HTML
- [Authentication](https://docs.reportgen.io/api/auth): API keys and JWT
- [API reference](https://docs.reportgen.io/api/reference/reportgen-api): full endpoint reference
- [FAQ](https://docs.reportgen.io/faq/intro): common questions
- [Troubleshooting](https://docs.reportgen.io/faq/in-case-of-errors): what to do when generation fails
## Examples
- [Automated invoice generation](https://docs.reportgen.io/api/examples/automated-invoice-generation)
- [Expenses report](https://docs.reportgen.io/api/examples/expenses-report)
- [Employee report](https://docs.reportgen.io/api/examples/employee-report)
- [Order confirmation](https://docs.reportgen.io/api/examples/order-confirmation)
- [Complex report](https://docs.reportgen.io/api/examples/complex-report)
- [CSS vs API PDF controls](https://docs.reportgen.io/api/examples/css-vs-api-pdf-controls)
## How reportgen is built (engineering series)
- [Part 1 β Architecture overview](https://reportgen.io/blog/how-reportgen-is-built-architecture-overview): the Go API, Temporal workflows, the two-tier worker system and the request lifecycle
- [Part 2 β Rendering HTML to PDF at scale](https://reportgen.io/blog/how-reportgen-renders-html-to-pdf-at-scale): Puppeteer clustering, template rendering and the cost of a page
- [Part 3 β Guaranteeing reliable delivery](https://reportgen.io/blog/how-reportgen-guarantees-reliable-pdf-delivery): retries, terminal report status, quota enforcement and failure modes
## Blog
- [No Report Left Behind: How reportgen.io Guarantees Reliable PDF Delivery (Part 3)](https://reportgen.io/blog/how-reportgen-guarantees-reliable-pdf-delivery): Durable workflows, calibrated retries, a terminal-state guarantee for every report, and billing that rides the same rails β the reliability engineering behind reportgen.io.
- [Inside reportgen.io's Rendering Pipeline: Four Template Engines, One Browser Fleet (Part 2)](https://reportgen.io/blog/how-reportgen-renders-html-to-pdf-at-scale): How reportgen.io turns a template and JSON into a pixel-accurate PDF: engine routing between Go and Node workers, Puppeteer pooling with puppeteer-cluster, and why artifacts travel through object storage.
- [How reportgen.io Is Built: The Architecture Behind Our HTML-to-PDF API (Part 1)](https://reportgen.io/blog/how-reportgen-is-built-architecture-overview): A transparent, engineering-level tour of reportgen.io: the Go API, Temporal workflows, a two-tier worker system, and the request lifecycle behind every PDF we generate.
- [CSS vs API in HTML-to-PDF: Who Actually Controls Margins and Backgrounds? π―](https://reportgen.io/blog/css-vs-api-pdf-controls): If your PDF margin or print_background settings seem ignored, template CSS may be overriding overlapping API options. Here is the common precedence and how to avoid conflicts.
- [Template Version Control: Update PDFs Without Breaking Production π](https://reportgen.io/blog/template-version-control-without-breaking-production): Deploying PDF template changes shouldn't feel like defusing a bomb. Learn how to version, test, and roll out template updates safely without breaking existing reports in production.
- [PDF Generation from Notion, Airtable, and Third-Party APIs: Automate Everything π](https://reportgen.io/blog/pdf-generation-from-notion-airtable): Stop copying data between tools. Learn how to pull data from Notion, Airtable, Google Sheets, and other APIs to generate PDFs automatically - with zero manual work.
- [Dynamic Charts and Visualizations in PDFs: From Data to Beautiful Reports π](https://reportgen.io/blog/dynamic-charts-and-visualizations): Static tables are boring. Learn how to embed dynamic charts, graphs, and visualizations in your PDFs - from simple bar charts to complex dashboards.
- [PDF Accessibility and WCAG Compliance: Making Your Documents Work for Everyone βΏ](https://reportgen.io/blog/pdf-accessibility-wcag-compliance): Inaccessible PDFs exclude millions of users. Learn how to create WCAG-compliant, screen-reader-friendly PDFs that work for people with disabilities.
- [Scaling PDF Generation at Enterprise Level: From 1K to 1M PDFs Per Month π](https://reportgen.io/blog/scaling-pdf-generation-at-enterprise-level): Your PDF generation worked great at 1,000 PDFs/month. Now you're hitting 100K and everything's on fire. Learn how to scale to millions without breaking the bank or your sanity.
- [Reportgen.io vs Html2pdf.app β Which PDF API Should You Use in 2025? βοΈ](https://reportgen.io/blog/reportgen-vs-html2pdf): A detailed comparison between Reportgen.io and Html2pdf.app for HTML-to-PDF conversion. Discover which API best fits your development needs.
- [Advanced PDF Features: Headers, Footers, Watermarks, and Page Numbers That Actually Work π](https://reportgen.io/blog/advanced-pdf-features): Go beyond basic PDFs. Learn how to implement headers, footers, page numbers, watermarks, table of contents, and other advanced features that make your documents professional.
- [Testing PDF Generation Pipelines: Because Broken PDFs in Production Suck π§ͺ](https://reportgen.io/blog/testing-pdf-generation-pipelines): Stop shipping broken PDFs to production. Learn how to build comprehensive test suites for PDF generation - from visual regression to load testing.
- [Reportgen.io vs RenderPDF.io - Which PDF API Should You Use in 2025? βοΈ](https://reportgen.io/blog/reportgen-vs-renderpdfio): A detailed comparison between Reportgen.io and RenderPDF.io for HTML-to-PDF conversion. Discover which API best fits your development needs.
- [Cost Optimization for PDF Generation: Cut Your Bill by 70% Without Sacrificing Quality π°](https://reportgen.io/blog/cost-optimization-pdf-generation): Generating thousands of PDFs per month? Learn proven strategies to slash your PDF generation costs while maintaining speed and quality.
- [PDF Security Best Practices: Protect Your Documents and Your Users π](https://reportgen.io/blog/pdf-security-best-practices): Don't leak sensitive data through PDFs. Learn how to implement proper security - encryption, access control, data sanitization, and compliance-ready document generation.
- [Why We Built reportgen.io (and What Everyone Else Got Wrong)](https://reportgen.io/blog/why-we-built-reportgen): Frustrated by unreliable, expensive PDF tools, we built reportgen.io - a fast, cheap, developer-first utility for HTML to PDF conversion.
- [Multi-Language PDF Generation: From English to Ψ§ΩΨΉΨ±Ψ¨ΩΨ© Without Breaking Everything π](https://reportgen.io/blog/multi-language-pdf-generation): Generate PDFs in any language - Arabic, Chinese, Japanese, Hebrew - with proper fonts, text direction, and encoding. A complete guide to internationalization.
- [We Just Shipped Billing β And Crossed 300K Reports! π](https://reportgen.io/blog/billing): No subscriptions. No surprises. Just clean, pay-as-you-go PDF generation. Here's how reportgen.io is shaking up billing - and what's coming next.
- [Async PDF Workflows: Build It Right the First Time π](https://reportgen.io/blog/webhooks-and-async-workflows): Stop blocking your API with slow PDF generation. Learn how to build robust async workflows with job queues, polling, and error handling that actually works in production.
- [Debugging PDF Generation Issues: A Developer's Field Guide π](https://reportgen.io/blog/debugging-pdf-generation-issues): When your PDFs look broken, load blank, or fail silently - this comprehensive debugging guide has you covered with real-world fixes and troubleshooting strategies.
- [Building Branded PDF Reports That Don't Look Like Garbage π¨](https://reportgen.io/blog/building-branded-pdf-reports): Stop generating ugly PDFs. Learn how to create beautifully branded reports that your users will actually want to share - with real code examples and design principles.
- [PDF Performance Optimization: From Seconds to Milliseconds β‘](https://reportgen.io/blog/pdf-performance-optimization): Your PDF generation is slow. Here's how to make it blazing fast - real optimization strategies that reduced generation time by 10x for reportgen.io users.
- [Migrating from Legacy PDF Tools: A Step-by-Step Guide to reportgen.io π](https://reportgen.io/blog/migrating-from-legacy-pdf-tools): Ready to ditch your legacy PDF solution? This practical guide walks you through migrating to reportgen.io with minimal downtime and maximum results.
- [Building a Custom Report Pipeline with Templating Engines: EJS, Handlebars, and GoTempl π οΈ](https://reportgen.io/blog/custom-report-pipeline): Learn how to build a robust custom report pipeline using EJS, Handlebars, or GoTempl. Discover the pros and cons of each templating engine and explore practical examples to enhance your document generation process.
- [Avoiding Common Pitfalls in PDF Generation: Lessons from reportgen.io Users π§](https://reportgen.io/blog/common-pitfalls): Discover the most common PDF generation mistakes developers face and how reportgen.io users overcome them for seamless, high-quality document automation.
- [reportgen.io in Action: Stories from SaaS Builders π](https://reportgen.io/blog/datapulse-analytics): Discover how DataPulse Analytics transformed customer reporting with reportgen.io, automating PDF generation for real-time analytics and dynamic insights.
- [The Power of Automation: How reportgen.io Saves Developers Time and Effort βοΈ](https://reportgen.io/blog/the-power-of-automation): Discover how reportgen.io automates PDF generation, saving developers time, effort, and sanity with real-world case studies and testimonials.
- [Reportgen.io vs. Legacy PDF Solutions: Why Modern APIs Win π](https://reportgen.io/blog/reportgen-vs-legacy): Discover how reportgen.io's modern API-driven approach to PDF generation outperforms legacy solutions with scalability, ease of use, and flexibility for developers.
- [How to Make Your Reports Less Ugly - PDF Styling with reportgen.io π
](https://reportgen.io/blog/less-ugly-reports): Learn how to improve the look of your PDFs with CSS, integrate third-party libraries like Tailwind, and even add charts with Chart.js.
- [Introducing Transparent and Affordable Pricing at reportgen.io π](https://reportgen.io/blog/introducing-pricing): Simplify PDF generation with reportgen.io: unlimited size, $0.0025/report, no subscriptions, and transparent pricing!
- [How to Use reportgen.io for Seamless Invoice Generation in SaaS Applications πΈ](https://reportgen.io/blog/seamless-invoicing): Explore how SaaS businesses use Python and reportgen.io to automate invoice generation with dynamic templates, secure APIs, and scalable PDF workflows for seamless integration.
- [Top 5 Industries Benefiting from HTML to PDF Conversion with reportgen.io π](https://reportgen.io/blog/top-5-industries-benefiting-from-html): Discover how businesses in SaaS, finance, e-commerce, healthcare, and legal services leverage HTML-to-PDF automation to streamline document workflows and enhance user experiences.
- [π Happy New Year 2025 from the Reportgen.io Team! π](https://reportgen.io/blog/new-year-report): Wishes from the reportgen team and some stats from the past year, along with a sneak peek of what's coming next.
- [How to Integrate reportgen.io into Your JavaScript/TypeScript App βοΈ](https://reportgen.io/blog/how-to-integrate-reportgen-into-your-js-app): Learn how to integrate reportgen.io into your JS or TS application to generate dynamic documents, reports, and more.
- [Transforming Your Document Workflow: Top Use Cases for the reportgen.io API π](https://reportgen.io/blog/top-use-cases): Generate docs with reportgen.ioβs API: invoices, dashboards, and moreβfast, precise, effortless. And more in this post!
## Product
- [Home](https://reportgen.io/): overview, pricing calculator and supported languages
- [Contact](https://reportgen.io/contact): support and sales
- [Privacy policy](https://reportgen.io/privacy)
- [Terms of service](https://reportgen.io/terms)