Automatically Detect a Table in a PDF Using PDF.co Document Parser

Create a reusable Document Parser template that detects a table and extracts its contents as structured data.

Step 1: Open the Template Manager

Sign in to PDF.co and open the Document Parser Template Manager.

Create a new template and open it in the editor.

Step 2: Load Your Sample PDF

Load a PDF containing the table you want to extract.

For this example, use a document with a table on its first page. Keep the source PDF available so you can compare it with the extracted results.

Step 3: Add an Auto-Detection Table Object

Give the object a descriptive name, such as ExtractedTable.

Configure it to target:

  • Page index: 0 for the first page.
  • Table index: 0 for the first detected table on that page.

To target another table, adjust these indexes. Page and table numbering begin at zero.

See the Document Parser Template Creation Guide for details about automatic table detection and template settings.

Step 4: Test the Template

Run the template against your sample PDF and review the extracted table in the results.

Compare the output with the original, checking that:

  • The expected rows and columns are included.
  • Values appear in the correct columns.
  • Numbers, decimal places, and multiline descriptions are extracted correctly.

Adjust the configuration and rerun the test if needed.

Step 5: Save and Reuse the Template

Save the template with a recognizable name and copy its Template ID.

Use that ID with the Document Parser API or a Document Parser action in Make or Zapier to apply the saved extraction settings to other PDFs.

In this tutorial, you learned how to auto-detect the table in a PDF using PDF.co Document Parser. You also learned how to create a new template using the Document Parser Template Editor.

Related Tutorials

See Related Tutorials