PDFCraft
Extraction guide

Extract a purchase order PDF to JSON

Everything below is the response the live API returned for a purchase order, generated when this page was built. Not a description of what it would return — the output itself, including what it scored low on.

Who this is for

Order-management and EDI-replacement tools for suppliers whose buyers email PDFs.

The job, in the words people search for: “parse purchase orders sent as PDF attachments”.

What makes this shape awkward

Two address blocks sit side by side above the line items. Laid out in columns, they read as a perfectly well-formed two-column table — and are not one.

The measured result

Pages read1
Time13 ms (13 ms/page)
Labelled fields found unprompted5
Tables1 (8 rows)
Inputpurchase-order.pdf (28 KB — synthetic, generated from a spec in the repo; real documents of this type cannot be published)

Fields, with a schema

Ask for the fields you want by the label printed on the page. Each answer carries the text exactly as printed (raw), the value coerced to the type you asked for, a confidence, and a bounding box you can draw on the page to check it.

curl -X POST https://api.pdfcraft.dev/v1/extract \
  -H "Authorization: Bearer $PDFCRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "<base64 of your purchase order>",
    "schema": {
      "po_number": "string",
      "order_date": "date",
      "required_by": "date"
    }
  }'

What came back

Fieldrawvalueconfidence
po_numberPO-88213"PO-88213"60%
order_date2026-03-02"2026-03-02"70%
required_by2026-03-30"2026-03-30"70%

Every label it found without being asked

Send no schema and you get all of these, keyed by the label as printed. Useful for discovering what a new supplier’s layout actually contains before you write a schema against it.

PO Number, Order Date, Required By, Buyer, Payment Terms

Tables

Line · Part number · Description · Qty · Unit price · 8 rows × 5 columns · page 1

Table confidence 90%. Header confidence 100% — the first row was promoted out of the data.

LinePart numberDescriptionQtyUnit price
1PN-9000Servo motor4120.00
2PN-9013Encoder2500.00
3PN-9026Coupling9235.00

First 3 of 8 rows.

With options.rows_as_objects, the same row keyed by its header:

{
  "Line": "1",
  "Part number": "PN-9000",
  "Description": "Servo motor",
  "Qty": "4",
  "Unit price": "120.00"
}

What this does not do

Try it on your own purchase order

The playground takes a file and shows the same JSON, with every bounding box drawn over the page. No key and no signup for the first few; a free key gives you 100 pages a month.

Related