Powered by Foxit Document Generation + PDF Services APIs

Verified PDFs from
JSON, Images, or Scans

JSON, LaTeX, screenshots, or scanned documents — DocForge turns any input into a watermarked, verified, production-ready PDF. Two engines, OCR ingestion, 7-check verification, all powered by Foxit APIs.

Try Live Demo arrow_downward

How to Use DocForge

Four modes, two engines, one pipeline. Pick whichever fits your workflow.

language

Web Demo

No install required

  1. 1

    Prepare your JSON

    Create a JSON file with product_name, version, features, fixes, and breaking_changes. Or use our example below.

  2. 2

    Paste into the demo

    Scroll to the Live Demo section. Switch between 4 modes: JSON, Image, or Scan input. Choose engine, watermark, and password.

  3. 3

    Click Generate

    Watch the 5-step pipeline progress, see verification results (7 checks), and step timings — all in real time.

  4. 4

    Download verified PDF

    A watermarked, flattened, verified PDF with full job metadata (SHA-256 hash, step durations). No data is stored.

terminal

CLI / CI Pipeline

For automation & GitHub Actions

  1. 1

    Install & configure

    Clone the repo, run make setup, and add your Foxit API keys to backend/.env.

  2. 2

    Start the backend

    Run make backend to start the FastAPI server. It validates your credentials on startup.

  3. 3

    Run the generate command

    docforge generate release.json \
      --engine latex --watermark DRAFT \
      --password s3cret --verify --open
  4. 4

    Verified PDF saved to disk

    CLI prints output path, size, verification (7/7 checks), step timings, and SHA-256 hash. Use --open to view instantly. 3 GitHub Actions templates included.

Advanced
science

LaTeX Engine

For research & engineering teams

  1. 1

    Same JSON input

    Use the exact same release JSON. No extra formatting needed — variables are auto-injected into a LaTeX template.

  2. 2

    Select LaTeX engine

    In the demo, choose LaTeX (tectonic) from the Engine dropdown. In CLI: --engine latex.

  3. 3

    Tectonic compiles PDF

    A sandboxed tectonic build produces a typeset PDF with precise tables, headers/footers, and professional formatting.

  4. 4

    Foxit post-processing

    The PDF still passes through Foxit PDF Services API for watermarking, flattening, and optional password protection.

Input JSON Fields

REQ
product_name — Product name (e.g. "Acme Platform")
REQ
version — Release version (e.g. "2.4.0")
OPT
release_date — ISO date (defaults to today)
OPT
summary — Release summary paragraph
OPT
features[] — Array of {title, description}
OPT
fixes[] — Array of {id, title, description}
OPT
breaking_changes[] — Array of {title, description, migration}
OPT
links[] — Array of {label, url}
OPT
images[] — Array of {path, caption, alt_text}
OPT
attachments[] — Array of {path, description}

Missing optional fields gracefully show "None" in the output PDF. New: images and attachments support with security validation.

Live Demo: Input → Output

Four modes — all powered by Foxit PDF Services API for post-processing.

shield No data is stored. Files are processed in memory and discarded after output is generated.

Pipeline Progress

1

Validate Input JSON

Waiting...

2

Generate PDF (Document Generation API)

Waiting...

3

Process PDF (PDF Services API)

Watermark → Flatten → Protect

4

Deliver Output

Waiting...

Where We Use Each Foxit API

Both APIs are used meaningfully — not just "hello world" calls.

article

Foxit Document Generation API

What we generate and why

We build a Word template programmatically using Foxit's token syntax ({{ product_name }}, {{TableStart:features}}), merge it with the release JSON data, and receive a complete PDF with formatted tables for features, bug fixes, breaking changes, and links.

POST /document-generation/api/GenerateDocumentBase64
→ Input: base64 .docx template + JSON values
→ Output: base64 PDF (synchronous)
cloud_sync

Foxit PDF Services API

What we do to the PDF and why

We post-process the generated PDF through 3 operations:

  • 1. Watermark — stamp "INTERNAL" or "DRAFT" diagonally across every page
  • 2. Flatten — lock annotations and form fields for archival
  • 3. Password-protect — encrypt the PDF so only authorized users can open it
POST /api/documents/upload
POST /api/documents/enhance/pdf-watermark
POST /api/documents/modify/pdf-flatten
POST /api/documents/security/pdf-protect
GET /api/documents/{id}/download

Architecture Flow

Complete input → output workflow.

terminal

CLI / Web Input

Read & validate JSON

article

Doc Gen API

Template + JSON → PDF

or LaTeX (tectonic)

cloud_sync

PDF Services API

Watermark · Flatten · Lock

download

Deliver PDF

Download or save to disk

Quick Start

Get your first verified PDF in 4 commands.

$ git clone https://github.com/docforge/docforge-cli && cd docforge-cli
$ make setup # installs deps, creates .env
$ make backend # start API server on :8000
$ docforge generate examples/release.json --engine latex --verify --open
# Or visit http://localhost:8000 for the web demo with all 4 modes:
# JSON → PDF · Image → PDF · Scan → JSON → PDF · LaTeX → PDF
description 7 API endpoints
swap_horiz 2 render engines
verified 7 verification checks
document_scanner OCR ingestion
deployed_code 3 CI templates