Pure-Stream Binary PDF Parser API: FlateDecode Text, Tables & /AcroForm to JSON Schema
Target Query: pdf invoice form extraction to json schema api · Category: Extraction Modality · Verified Rate: $0.015/hit ($0 on miss) · Updated: 2026-12-02
Direct Answer: Most web scraping APIs either choke on binary `application/pdf` links or route every PDF through expensive vision-LLM OCR pipelines at $0.10–$0.50 per document. Scrape-Anything includes a pure-stdlib binary PDF stream parser (`pdf_parser.py`) that decompresses `FlateDecode` (`zlib`) streams, decodes `BT..ET` text operators (`Tj`, `TJ`, `Tm`, `Td`, `T*`) and `ToUnicode` CMaps, extracts `/AcroForm` fields, reconstructs key-value pairs and multi-column rows into strict JSON Schema at `$0.025`/verified hit—and automatically rejects encrypted PDFs at `$0`.
Engineering Mechanics & Deterministic Guardrails
Decompresses standard `FlateDecode` (`zlib`) PDF content streams directly without Ghostscript, Poppler, or vision-OCR markup.
Tracks `Tm`, `Td`, `TD`, and `T*` text positioning operators to reconstruct multi-column invoice line items and `Key: Value` headers.
Extracts interactive `/AcroForm` field names (`/T`) and values (`/V`) from government, compliance, and procurement PDFs.
Detects `/Encrypt` dictionaries cleanly and halts with `blocked_reason: encrypted_pdf` and `billed_micros = 0`—zero broken garbage billed.
PDF Extraction Capabilities & Unit Economics
PDF Feature
Parser Implementation
Output Field
Billing Rule
Compressed `FlateDecode` Streams
Pure `zlib` stream inflater + `BT..ET` operator engine
Test Schema-Validated Extraction Live in 5 Seconds
Paste any public URL, HTML table, JSON-LD, CSV, or fake-200 shell at scrape.fastmesh.dev or top up once with never-expiring Creem prepaid credits ($15 Starter / $59 Growth / $199 Scale — $0/mo recurring).
Can I pass a public PDF URL or upload base64 PDF bytes?
Both are supported. Pass `url` for a public HTTPS PDF or `content_base64` with `content_type: "application/pdf"` for private inline parsing.
What happens when an uploaded or linked PDF is encrypted or scanned-only with zero extractable text?
Encrypted PDFs return `blocked_reason: "encrypted_pdf"` and `billed_micros: 0`. Scanned image-only PDFs with empty text fail schema/empty checks and also return `billed_micros: 0`.
How much does verified PDF extraction cost on prepaid packs?
Base rate is 25,000 micros (`$0.025`), so the $15 Starter pack covers 600 verified PDFs, $59 Growth covers 3,000 PDFs, and $199 Scale covers 12,000 PDFs—with same-tenant cache refreshes at `$0.0025`.