PDFCraft
Extraction guide

Extract a bill of materials PDF to JSON

Everything below is the response the live API returned for a bill of materials, 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

Manufacturing and MRP tools onboarding a product whose BOM arrives from engineering as a PDF export.

The job, in the words people search for: “import a bill of materials from a PDF into an MRP system”.

What makes this shape awkward

Level numbers in the first column carry the assembly tree, and sub-assemblies are indented. The indentation is the only thing expressing the hierarchy and it is whitespace — which means the level column is the real structure and the indentation is noise that shifts the first column band.

The measured result

Pages read1
Time9 ms (9 ms/page)
Labelled fields found unprompted4
Tables1 (14 rows)
Inputbill-of-materials.pdf (30 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 bill of materials>",
    "schema": {
      "assembly": "string",
      "revision": "string",
      "released": "date"
    }
  }'

What came back

Fieldrawvalueconfidence
assemblyASM-4471"ASM-4471"60%
revisionC"C"60%
released2026-02-14"2026-02-14"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.

Assembly, Revision, Released, Engineer

Tables

Level · Part number · Description · Qty · UOM · 14 rows × 5 columns · page 1

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

LevelPart numberDescriptionQtyUOM
1PN-7400Housing5ea
2PN-7411Rotor5ea
3PN-7422Stator6ea

First 3 of 14 rows.

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

{
  "Level": "1",
  "Part number": "PN-7400",
  "Description": "Housing",
  "Qty": "5",
  "UOM": "ea"
}

What this does not do

Try it on your own bill of materials

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