Skip to main content

DocuForge

DocuForge is a PDF generation API for developers. Send HTML or template data — get pixel-perfect PDFs back in under 3 seconds. No headless browsers to manage, no rendering bugs to chase.

Three Ways to Generate

HTML → PDF

Send raw HTML with full CSS support. Flexbox, Grid, custom fonts — all rendered correctly.

Templates

Design reusable templates with variable slots. Merge data via API.

React → PDF

Use React components for type-safe PDF layouts. (Coming in Phase 2)

Why DocuForge?

  • Fast — Generate a 2-page invoice in under 1.5 seconds
  • Pixel-perfect — Full CSS3 support including Flexbox, Grid, and @page rules
  • Simple — 4 lines of code to your first PDF
  • Smart page breaks — No more orphaned headings or split table rows
  • Headers & footers — With automatic page number interpolation
  • SDKs — TypeScript and Python, with more coming soon

Quick Example

import { DocuForge } from 'docuforge';

const df = new DocuForge('df_live_...');

const pdf = await df.generate({
  html: '<h1>Invoice #1234</h1><p>Amount: $500</p>',
  options: { format: 'A4', margin: '1in' }
});

console.log(pdf.url);
// → https://cdn.getdocuforge.dev/gen_abc123.pdf