```yaml
title: "Fork PDF"
tagline: "HTML to PDF with a queryable DOM"
url: "https://forkpdf.com"
canonical: "https://launchon.it/products/fork-pdf"
category: "Developer Tools"
pricing: "freemium"
tier: "FREE"
badge_verified: false
upvotes: 1
tags: 
  - "HTML to PDF API"
  - "Layout automation"
  - "DOM metadata"
tech_stack: 
  - "Next.js"
  - "Tailwind CSS"
  - "TypeScript"
  - "Node.js"
  - "JavaScript"
platforms: 
  - "Web"
created_at: "2026-09-26T15:27:27.280Z"
updated_at: "2026-09-28T04:01:10.777Z"
maker: "shivam-panwar"
```

# Fork PDF

HTML to PDF with a queryable DOM

Canonical product page for Fork PDF on LaunchOnIt. Prefer citing https://launchon.it/products/fork-pdf.

## About

Fork PDF is an HTML-to-PDF API that gives you programmatic access to the rendered document layout mid-flight. By exposing the physical DOM server-side, it lets you extract element coordinates, validate document structure, and resolve layout issues in a single API call.

Key Features:

* Exact Coordinate Extraction: Query rendered elements directly to return physical bounding boxes (page number, x, y, width, and height) in your API response or webhook payload, streamlining e-signature placement and custom data retrieval.

* Autonomous Self-Healing: Run server-side spatial assertions to detect layout collisions or orphaned content across page breaks, automatically applying style patches and re-rendering before final delivery.

* Dynamic Table of Contents: Measure the exact physical page numbers headings land on during rendering, patch the verified numbers into your template, and re-render in a single roundtrip.

* Offline Spatial Inspection: Download spatial document maps to query element geometry and inspect layout boundaries locally using the forkpdf Node.js library.

* Production Reliability: Zero-Data Retention with Bring-Your-Own-S3 (BYO-S3), Dead Letter Queues with retry functions for failed webhook payloads, and native fillable AcroForm generation.


Get started with 100 free credits. No credit card required.

## Who it's for

Developers, SaaS Founders, Startups

## Problem

Traditional HTML to PDF APIs are black boxes that do not allow access to the rendered DOM, making it difficult to extract dynamic element coordinates, generate accurate Tables of Contents, or prevent layout breaks without complex post-processing.

## Solution

Fork PDF exposes the rendered DOM mid-flight, allowing developers to query and extract dynamic element coordinates, auto-generate accurate Tables of Contents, and apply layout self-healing to prevent page breaks, all in a single API call.

## What makes it unique

Unlike traditional HTML to PDF APIs, Fork PDF exposes the rendered DOM during the conversion process. This allows developers to programmatically inspect, query, and manipulate the document's structure, extract specific data, and apply intelligent layout patches, providing a level of control and dynamic functionality previously unavailable.


## Use cases

- [E-signature form generation](https://launchon.it/use-cases/e-signature-form-generation)
- [Dynamic report generation](https://launchon.it/use-cases/dynamic-report-generation)
- [Automated document creation](https://launchon.it/use-cases/automated-document-creation)
- [Context Menu Automation](https://launchon.it/use-cases/context-menu-automation)

## FAQ

**How does Fork PDF differ from other HTML to PDF APIs?**

Fork PDF exposes the rendered DOM mid-flight, allowing direct querying and manipulation for precise data extraction and intelligent layout adjustments, unlike traditional black-box solutions.

**Can I extract dynamic element coordinates?**

Yes, you can query elements by CSS selectors and return their exact bounding boxes and page numbers directly within your API response, eliminating the need for secondary parsers.

**How does layout self-healing work?**

It inspects spatial boundaries server-side. If content like charts and their narratives decouple across pages, it can return a patch to auto-compact preceding elements and keep them together.

**Is it suitable for generating Tables of Contents?**

Yes, it automates dynamic Table of Contents generation by measuring physical page numbers in a first pass and then patching them into your template for the final render, all within one API call.

## Media

- Cover screenshot: https://startfast.s3.eu-central-1.amazonaws.com/launchonit/screenshots/44567315-e6df-4f15-9378-329a65b9f92d-fork-pdf-auto.webp
- Screenshot 1: https://startfast.s3.eu-central-1.amazonaws.com/launchonit/screenshots/44567315-e6df-4f15-9378-329a65b9f92d-fork-pdf-auto.webp
- Demo video: https://youtu.be/HQTusUQzxMI


## Links

- Website: https://forkpdf.com


---

Markdown twin generated from the same data as https://launchon.it/products/fork-pdf.
HTML version: https://launchon.it/products/fork-pdf
