HUB
Sign inSign up
pdf-intelligence-engine logo

visualintegrity/pdf-intelligence-engine

By visualintegrity

•Updated 6 days ago

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

Image
API management
Developer tools
Data science
0

5.3K

visualintegrity/pdf-intelligence-engine repository overview

⁠PDF Intelligence API: document intelligence for your AI pipeline

Image v2.18.1 (also latest) · PDF engine 14.2026.11.1 · linux/amd64

Your AI pipeline is only as good as what it can actually read. Engineering drawings, financial filings, contracts, technical manuals: vision models render these to an image, run OCR, and infer content and coordinates from pixels.

The PDF Intelligence API skips the guessing. It reads the PDF's own content 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.

It's built on Visual Integrity's C++ PDF engine: 30 years · 12,000+ customers in 100 countries. The same engine converts to 15 output formats with full vector precision: SVG, DWG, DXF, WMF, EMF, EPS, HPGL, PDF, PostScript, PNG, JPG, TIFF, BMP, GIF and text. CGM is unavailable since v2.17.3.


⁠Extraction vs. recognition

Vision / OCR modelsPDF Intelligence API
InputRendered raster imageThe PDF's own content
OutputInferred text and layoutExact vector geometry and structure
CoordinatesApproximate bounding boxesExact, in millimeters
Shapes and pathsDescribed in textNative lines, curves, polygons, ellipses
LayersLost at renderPreserved
ResultProbabilisticDeterministic: extracted, not guessed

Designed for born-digital PDFs. Scanned pages contain only images; text is not read from images (OCR is not included).


⁠Quick start

1. Get a licence. Self-hosted licences are issued to customers under a licence agreement: contact [email protected]⁠. To try the API first, request a free hosted key from the demo at api.visual-integrity.com/demo.

2. Run it.

docker pull visualintegrity/pdf-intelligence-engine:v2.18.1

docker run -d --name vi-pdf \
  -p 127.0.0.1:8000:8000 \
  -v vi-data:/data \
  -e VI_LICENSE_KEY="<your licence key>" \
  -e VI_ENGINE_LICENSE="<your engine licence>" \
  -e VI_API_KEY="<a key you choose, at least 24 characters>" \
  -e FEATURES_PDF_OPS=true \
  visualintegrity/pdf-intelligence-engine:v2.18.1

Keep port 8000 on a private network or behind your own TLS gateway; don't expose it to the internet. If you leave out VI_API_KEY, the container creates a key at first start and writes it to /data/api-key.txt.

3. Check it.

curl -s http://localhost:8000/health

Expect "engine_license": true and "convert": true.

4. Send a PDF.

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

The interactive demo runs at http://localhost:8000/demo.


⁠What /v1/extract returns

A pages array. Each page has its size in millimeters, its layers (name and visibility), a per-type summary and the typed objects: polyline, polygon, path, ellipse, text, image, group.

{
  "total_pages": 1,
  "pages": [
    {
      "page": 1,
      "page_size": { "width_mm": 215.9, "height_mm": 279.4 },
      "layers": [{ "name": "Walls", "visible": true }, { "name": "Text", "visible": true }],
      "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 },
          "geometry": { "content": "Quarterly Report" }
        }
      ]
    }
  ]
}

All coordinates are in millimeters, with the origin at the bottom-left of the page.


⁠Environment variables

VariableRequiredDescription
VI_LICENSE_KEYYesYour licence key (VI-XXXX-XXXX-XXXX-XXXX), issued by Visual Integrity to contracted customers.
VI_ENGINE_LICENSEYesYour engine licence, issued with your licence key. Needed for every conversion.
VI_API_KEYRecommendedThe key your applications send as Authorization: Bearer <key>.
FEATURES_PDF_OPS=trueRecommendedEnables the PDF operations below.
DATABASE_URLOptionalDefaults to SQLite in /data.

Without an engine licence, conversions (/v1/convert) answer 503 license_unavailable. Extraction and the PDF operations still work. Output is never watermarked: without a licence there is no conversion at all.


⁠Endpoints

  • POST /v1/extract: every object on a page, as JSON.
  • POST /v1/convert: conversion to any of the 15 formats (asynchronous: returns a job id; then GET /v1/jobs/{id}, GET /v1/jobs/{id}/download, and DELETE /v1/jobs/{id} when you're done).
  • GET /v1/usage: your credit usage.
  • PDF operations (/v1/ops/*, with FEATURES_PDF_OPS=true):
    • preflight, page-count, layer-list: free
    • split, extract-images: metered per page
    • diff: a text comparison of two PDFs, per call

Conversion options are passed as JSON in the options field. Values are validated: an option that can't be used, or a value with a line break or control character, is refused with 400 invalid_options, and nothing is charged.

CGM is unavailable since v2.17.3: POST /v1/convert with output_format=cgm answers 422 format_unavailable at once, with no job and no credits charged, and GET /v1/formats no longer lists it. Use DXF or SVG.

TXT with ascii_format UNICODE is UTF-8 (no byte-order mark, LF line endings) since v2.17.0; it was UTF-16 before. The default ISO8859 is unchanged.


⁠Credits

OutputCredits per page
CAD (DWG, DXF, HPGL) and vector (SVG, EMF, WMF, EPS)3
Document and text (PDF, PostScript, TXT)2
Raster (PNG, JPG, TIFF, BMP, GIF)1
JSON extraction (/v1/extract)3

A call that finds nothing to work on is not charged (since v2.17.5): /v1/extract of a scanned or image-only PDF and a diff where neither file has text answer 422 no_extractable_content, and extract-images that finds no images answers 200 with credits_charged: 0.

A scanned (image-only) PDF converted to DWG, DXF, HPGL, SVG, EMF, WMF, EPS or TXT is refused before any charge (since v2.17.6): 422 scanned_input. Set allow_raster_only=true to get the image wrapped in a vector or CAD format, charged at the raster rate. TXT stays refused.

Plans, current prices and the full billing rules: api.visual-integrity.com/docs/billing⁠. Enterprise and volume terms: [email protected]⁠.


⁠Built for

  • AI and ML pipelines that need ground-truth document structure for RAG, fine-tuning or agent tools.
  • CAD and technical drawings: schematics, floor plans and site plans where geometric precision matters.
  • Financial and legal documents, where layout, tables and typography carry meaning.
  • Document-intelligence platforms that need to know a PDF rather than guess at it.

Visual Integrity is an Open Design Alliance (ODA) member, for interoperability with CAD formats.


⁠Documentation and support

© Visual Integrity Technologies LLC, Portland, Maine

Tag summary

Content type

Image

Digest

sha256:93bb2f831…

Size

146.9 MB

Last updated

6 days ago

docker pull visualintegrity/pdf-intelligence-engine