FForgeKit

Best html2pdf Alternative: ForgeKit

Last verified: Feb 1, 2026

TL;DR: html2pdf works for static HTML exports in the browser. ForgeKit handles URL-to-PDF with full JavaScript rendering server-side.

Why developers switch from html2pdf

  • No JS rendering
  • Breaks on complex CSS
  • Not suitable for URL-to-PDF

What ForgeKit adds

  • Unified API for screenshots, PDFs, OG images, QR codes, and link previews
  • MCP server for AI agent integration
  • Credit-based pricing with 250 free credits
  • Async jobs for long-running captures
  • OpenAPI spec and llms.txt for agent discovery

Migration checklist

  1. Create a ForgeKit account and generate an API key
  2. Replace html2pdf SDK calls with ForgeKit REST endpoints
  3. Map response formats (PNG, PDF, SVG) to your existing pipeline
  4. Update webhook handlers for async job completion
  5. Remove html2pdf infrastructure dependencies

Code migration

// html2pdf approach
const result = await captureWithhtml2pdf({
  url: "https://example.com",
  format: "png",
});
// ForgeKit — one REST call
const res = await fetch("https://useforgekit.dev/api/v1/screenshot", {
  method: "POST",
  headers: {
    "Authorization": "Bearer fk_live_...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://example.com", width: 1280 }),
});
const { jobId } = await res.json();

Read the full html2pdf vs ForgeKit comparison

Start free with ForgeKit