1. PDF Tools
  2. Extract PDF Pages

PDF Tools

Extract PDF Pages

Extracts selected pages from PDFs. Useful for splitting documents, isolating sections, and preparing attachments.

Uses

Use this task for extracting specific pages from a PDF into a new PDF.

Basic Usage

loading...

Parameters Explained

files
required
array

An array of PDF files from which to extract the pages.

page_numbers
required
string

The page numbers to extract from the PDF into a new PDF file, either a range in the format n-m, where n is the first page to include and m is the last page to include, or a list of pages such as 2,5,9. Pages that don't exist in the PDF are skipped.

function
required
string

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

Result

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

editor
        {
  "extract_pdf_pages": {
    "success": true,
    "payload": {
      "files": [
        {
          "fileuuid": "8142ce6c-f3cd-526c-a5d3-747799ed2b01",
          "filename": "report_pages_1-5.pdf",
          "originalname": "report_pages_1-5.pdf",
          "contentType": "application/pdf",
          "visibility": "private"
        }
      ],
      "attachments": [...]
    }
  }
}