Sign inSign up

visualintegrity/pdf-intelligence-engine

By visualintegrity

•Updated about 22 hours ago

Convert PDF to DWG, DXF, SVG + 13 formats. Extract structured vector objects as JSON. Self-hosted.

Image
API management
Developer tools
Data science
0

4.6K

visualintegrity/pdf-intelligence-engine repository overview

⁠Document Intelligence for Your AI Pipeline

Your AI pipeline is only as good as what it can actually read. Engineering drawings, financial filings, legal contracts, technical manuals, design specs — today's vision models render these to an image, run OCR, infer content from pixels, approximate coordinates, and describe shapes in prose.

The PDF Intelligence API skips the guessing. It reads the document's native bytecode directly and returns everything on the page — every path, glyph, shape, layer, coordinate, and color — as structured, schema-stable JSON. Deterministic, lossless, and ready for an LLM, a RAG pipeline, or a document agent to build on.

This isn't a wrapper around OCR. It's 30 years of production-proven parsing — the same Visual Integrity C++ engine that runs at Fortune 500 scale for Oracle, Amazon, Siemens, and Delta Air Lines. Hallucination-free ground truth from native PDF documents.

On ParseBench, the industry benchmark for complex documents, we scored 91.62% on chart extraction and 81.99% on tables — an internal run on their public dataset — placing at the top of the public leaderboard by roughly 13.5 points.

These are unpublished internal results, run against the public ParseBench dataset; a formal submission is pending completion of additional modules.

Need the document in a different format instead of JSON? The same engine converts across 16 output formats with sub-point geometric precision — no rendering, no rasterizing, no approximation. The precise vector geometry that went into the PDF comes back out: SVG, DWG, DXF, WMF, EMF, EPS, HPGL, CGM, PDF, PostScript, PNG, JPG, TIFF, BMP, GIF, and text.

Conversion is the 30-year foundation. Comprehension is what we've built on top of it.


⁠Comprehension vs. Recognition

Vision / OCR ModelsPDF Intelligence API
InputRendered raster imageNative PDF bytecode
OutputInferred text & layoutExact vector geometry + structure
CoordinatesApproximate bounding boxesSub-point precision
Shapes & pathsDescribed in textNative Bézier curves, arcs, polygons
Layer dataLost at renderPreserved
FidelityProbabilisticDeterministic
Hallucination riskPresent — model infers what it can't seeNone — extracted, not guessed

⁠Key Capabilities

  • Structural hierarchy — pages, layers, groups, and drawing order preserved
  • Text with typographic context — glyphs with font, size, color, position, and reading order
  • Vector geometry extraction — lines, curves, polygons, circles, Bézier paths as native coordinates
  • Color fidelity — RGB, CMYK, and spot colors extracted natively
  • Schema-stable JSON output — consistent, predictable structure downstream pipelines can rely on call after call
  • 16 output formats — raster (PNG, JPG, TIFF, BMP, GIF), vector (SVG, EPS, WMF, EMF, CGM), CAD (DWG, DXF, HPGL), plus PDF, PostScript, and text
  • PDF Operations suite — 16 dedicated document-manipulation endpoints beyond conversion and extraction (see below)
  • AI-powered document summary — BYOK summarization with Claude (Anthropic), GPT-4o (OpenAI), or Gemini (Google); a 2-credit orchestration fee, refunded automatically if the provider call fails; your AI provider is billed separately on your own key
  • Born-digital PDF focus — engineered for the documents AI pipelines most often need to parse

⁠Quick Start

docker pull visualintegrity/pdf-intelligence-engine
docker run -d \
  -p 8000:8000 \
  -v vi-data:/data \
  -e VI_LICENSE_KEY=your_license_key \
  -e VI_ENGINE_LICENSE=your_base64_engine_license \
  -e FEATURES_PDF_OPS=true \
  visualintegrity/pdf-intelligence-engine

Open the demo and get your API key:

http://localhost:8000/demo

Send a PDF:

curl -X POST http://localhost:8000/v1/extract \
  -H "Authorization: Bearer vi_your_api_key" \
  -F "file=@your_document.pdf"

⁠Response Structure

/v1/extract returns a pages array; each page carries its size in millimeters, its layer names, a per-type object summary, and the typed objects themselves. Object types: polyline, polygon, path, ellipse, text, image, group.

{
  "total_pages": 1,
  "metering": { "credits_charged": 3 },
  "pages": [
    {
      "page": 1,
      "page_size": { "width_mm": 215.9, "height_mm": 279.4 },
      "layers": ["Walls", "Dimensions", "Text"],
      "summary": { "total": 1284, "polylines": 512, "polygons": 88, "paths": 340, "text": 344 },
      "objects": [
        {
          "id": 1,
          "type": "text",
          "layer": "Text",
          "bbox": { "x1": 25.4, "y1": 254.0, "x2": 98.1, "y2": 261.9, "width": 72.7, "height": 7.9 },
          "pen": { "color": { "hex": "#1A1A1A" }, "visible": true },
          "geometry": { "content": "Quarterly Report" }
        },
        {
          "id": 2,
          "type": "polyline",
          "layer": "Walls",
          "bbox": { "x1": 25.4, "y1": 250.0, "x2": 190.5, "y2": 250.0, "width": 165.1, "height": 0.0 },
          "pen": { "color": { "hex": "#CCCCCC" }, "visible": true },
          "fill": { "type": "none" }
        }
      ]
    }
  ]
}

All coordinates are in millimeters, origin at the page's bottom-left.


⁠Environment Variables

VariableRequiredDescription
VI_LICENSE_KEYYesYour Visual Integrity license key (VI-XXXX-XXXX-XXXX-XXXX). Provided with your Docker subscription.
VI_ENGINE_LICENSEYesBase64-encoded engine license. Required for raster output (JPG, PNG, TIFF, BMP, GIF); without it those conversions fail with "Conversion produced no output files." Provided with your Docker subscription.
FEATURES_PDF_OPS=trueRecommendedEnables the full /v1/ops/* PDF Operations suite (see below).
DATABASE_URLOptionalDefaults to SQLite at /data/vi_conversion_server.db. Use a PostgreSQL URL for production multi-instance deployments.

Raster output: VI_ENGINE_LICENSE unlocks JPG/PNG/TIFF/BMP/GIF. Vector formats (SVG, DXF, DWG) and JSON extraction work in evaluation mode without it, but include a watermark.


⁠PDF Operations (/v1/ops/*)

Enabled with FEATURES_PDF_OPS=true. Sixteen endpoints beyond core conversion and extraction — thirteen metered, three free.

Metered:

  • merge — combine multiple PDFs into one
  • split — extract a page range into a new PDF
  • extract-images — pull embedded raster images out of a PDF
  • extract-text — plain-text extraction
  • extract-markdown — Markdown-formatted extraction
  • smart-markdown — Markdown with layout-aware structure (headings, tables)
  • watermark — stamp text onto every page
  • stamp — overlay an image or PDF page onto every page
  • pdfa — convert to PDF/A for long-term archival
  • diff — visual/structural comparison between two PDFs
  • merge-template — mail-merge style document generation from a template + records
  • swap-image — replace a specific embedded image, or list all images in a document
  • promote-hidden-text — surface hidden/OCR text layers as visible text

Free — no credits charged:

  • preflight — document inventory (page count, layers, object-type tallies) before you commit to a paid operation
  • page-count — total page count
  • layer-list — named layers (OCG) and visibility state for a given page

⁠Supported Formats

CategoryFormatsCredits/page
CADDWG, DXF, HPGL3
VectorSVG, EMF, WMF, EPS, CGM3
RasterPNG, JPEG, TIFF, BMP, GIF1
Document / TextPDF, PostScript, TXT2

16 output formats. Input: PDF, EPS, PostScript, AI. Structured JSON extraction: 3 credits/page. AI document summary: 2 credits/call (orchestration fee, refunded if the provider call fails).

Note: PDF Operations pricing varies per operation — see the interactive demo for the current per-op credit table.


⁠Pricing

Paid plans are monthly subscriptions with included credits; usage beyond the allotment accrues as overage.

PlanPrice / monthIncluded credits / month
Starter$251,800
Developer$799,000
Team$24937,500
Scale$749150,000

Enterprise / custom volume: contact [email protected]⁠ for higher volume, custom terms, or an SLA.

Free tier: 150 credits at signup, no credit card required — provisioned once per key, not renewed monthly. Upgrade to a paid plan for ongoing monthly credits.

Full billing mechanics — what a credit is, per-format weighting, and overage — are documented in the interactive demo at api.visual-integrity.com/demo⁠ and in the materials included with your subscription. Questions: [email protected]⁠.


⁠Customer Portal

Subscribers manage their account from the self-service portal at /portal:

  • Masked API key with one-click copy
  • Current tier and credit balance, with usage against your plan's monthly allotment
  • Pre-filled Quick Start tabs — cURL, Python, and C# examples using your own key
  • Buy Credits, and upgrade, downgrade, or cancel your subscription at any time

⁠AI Summary

The demo includes an AI-powered document summary. After extraction, choose your LLM provider — Claude (Anthropic), GPT-4o (OpenAI), or Gemini (Google) — and supply your own API key. The summary reasons over the extracted page structure, not a rendered image.

Billing: a flat 2-credit orchestration fee per call, refunded automatically if the provider call fails. Your AI provider bills its own token usage on your key — Visual Integrity never sees or marks up that cost.


⁠Built For

  • AI/ML pipelines needing ground-truth document structure for fine-tuning, RAG, or agent tool use — without hallucination risk from vision inference.
  • CAD and technical drawings — engineering schematics, floor plans, and vector diagrams where geometric precision is non-negotiable.
  • Financial and legal documents — filings, contracts, and reports where exact layout, table structure, and typography carry semantic meaning.
  • Document-intelligence platforms — anywhere you need to know a PDF rather than guess at it.

⁠Engine

A proprietary C++ parsing engine with 30+ years of production heritage, serving Fortune 500 clients across manufacturing, finance, and aerospace. It operates directly on the PDF content stream — no intermediate render step, no lossy conversion. Open Design Alliance (ODA) member — interoperability with CAD formats including DWG, DXF, and DGN.


⁠Reference & Support

© Visual Integrity Technologies LLC — Portland, Maine

Tag summary

Content type

Image

Digest

sha256:968897bc0…

Size

150.5 MB

Last updated

about 22 hours ago

docker pull visualintegrity/pdf-intelligence-engine