1. PDF Tools
  2. Extract CSV from PDF

PDF Tools

Extract CSV from PDF

Extracts CSV data from PDFs. Useful for table capture, data import, reporting, and document automation.

Uses

Use this task for extracting tables from a PDF file into CSV files. Each table that is found becomes its own CSV file.

INFO

Only tables with visible borders (ruled lines) are detected. Tables laid out with spacing alone, and scanned documents, will not produce CSV files.

Basic Usage

loading...

Parameters Explained

files
required
array

An array of PDF file objects from which to extract CSV data.

page_numbers
required
string

The page numbers or page number range from which to extract the CSV data from the PDF file. Page number ranges can be specified in the format n-m, where n is the starting page and m is the last page for example: 5-9. If CSV needs to be extracted from all pages, the value of all can be used.

function
required
string

The pdf_tools function to call, in this case it would be pdf_to_csv

Result

If no tables are found, the task still succeeds and files is empty.

The newly created files are returned in files. The same files are returned in attachments, which adds them to the stub's attachments.

editor
        {
  "convert_pdf_to_csv": {
    "success": true,
    "payload": {
      "files": [
        {
          "fileuuid": "8142ce6c-f3cd-526c-a5d3-747799ed2b01",
          "filename": "report_p1_t1.csv",
          "originalname": "report_p1_t1.csv",
          "contentType": "text/csv",
          "visibility": "private"
        },
        {
          "fileuuid": "8142ce6c-f3cd-526c-a5d3-747799ed2b02",
          "filename": "report_p2_t1.csv",
          "originalname": "report_p2_t1.csv",
          "contentType": "text/csv",
          "visibility": "private"
        }
      ],
      "attachments": [...]
    }
  }
}