Skip to main content

Extract tables

Find tables in a PDF that holds text (invoices, statements, reports) by how the text lines up in columns, and return each as a Data Table. Scanned PDFs need OCR first.

Command in the PDF toolkit · id ooa.pdf/extract_tables · 6 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PathFileYesPDF file.
PagesStringNoPages to read, e.g. 1,3-4; every page when empty.
First row is the headerBooleanNotrueThe first row of each table holds the column names; Column1, Column2 … when off.
Merge across pagesBooleanNotrueJoin a table that continues at the top of the next page (same number of columns) into one, leaving out a repeated header row.
Minimum columnsNumberNo2Lines need at least this many separate columns to count as a table.
PasswordCredentialNoPassword for protected PDFs.

Outputs​

OutputTypeWhat it is
tablesListEvery table found, as Data Tables, top to bottom and page by page.
tableTableThe first (or only) table; an empty table when none was found.
countNumberNumber of tables found.