Extract PDF data

Extract structured data from PDFs and scanned images into a CSV using AI.

Extract PDF data turns PDFs and scanned images into a structured CSV by using an AI model to find rows and columns. You describe the data you want, optionally give it a column shape, and the model emits a CSV file that downstream transforms can validate or deliver.

Availability: Requires the WorkflowsPdfExtraction feature. Contact your OneSchema support representative if you do not see this transform.

What it does

  • Input: one or more files (PDFs or scanned images).
  • Output: a CSV file for each input file, shaped by the columns you describe.
  • The transform uses an AI model to locate tables, forms, or repeated sections in the document and emit them as rows. It works on native PDFs, scanned PDFs, and images.

When to use it

  • You receive vendor invoices, statements, or reports as PDFs and need them as CSVs.
  • The PDF contains a table that users currently copy and paste by hand.
  • You have scanned documents or images with tabular data.
  • A mixed batch includes Word documents and PDFs; convert Word docs to PDF upstream with Convert to PDF first, then run this transform.

How to configure it

In the MFF builder, add an Extract PDF data node after the node that produces the PDF files.

Settings

SettingDescriptionDefault
PromptA plain-language description of what data to extract. Be specific about the table or section you want.Empty
Output columnsOptional list of column names (and types) that the output CSV should contain. If left empty, the model infers the columns from the document.Empty
ProviderThe AI provider used to run the extraction. Leave as the default unless your organization has a specific requirement.Default provider
Output replica countNumber of times the model runs the extraction so results can be compared to reduce hallucinations. Higher values increase reliability at the cost of runtime.1
Consistency thresholdThe minimum level of agreement required across replicas before a result is accepted. Only used when the replica count is greater than 1.Empty

Prompt tips

  • Describe the document section you want: "Extract the line items from each invoice, one row per line item."
  • Mention columns you expect: "Return one row per invoice line with columns: Item, Description, Quantity, Unit Price, Total."
  • If the PDF has many pages, tell the model what to ignore: "Ignore the cover page and footer notes."

Example

Input

A two-page PDF invoice with a line-items table.

Output

ItemDescriptionQuantityUnit PriceTotal
1001Widget A105.0050.00
1002Widget B520.00100.00

Troubleshooting

"No table found" or empty output

  • Make sure the prompt clearly points to the data you want.
  • Increase the output replica count to improve consistency.
  • Check that the input file is a valid PDF or image. Use Convert to PDF upstream for Word documents.

Output columns do not match expectations

  • Add explicit output columns in the settings panel.
  • Increase the output replica count and set a consistency threshold to reduce variance.

Data is in a complex layout

  • If the document has nested sections, add a Split PDF by content node before Extract PDF data to break the document into one file per logical section.

See also


Did this page help you?