PDF.co API icon

PDF.co API

Generate PDF, extract data from PDF, split PDF, merge PDF, convert PDF. Fill PDF forms, add text and images to pdf and much more with pdf.co!

Split PDF

AI-generated

Overview

This node splits a PDF file based on user-defined criteria such as specific page numbers or ranges, text search, or barcode search. It is useful for automating the extraction of sections from large PDF documents, such as invoices, reports, or contracts, by specifying how the PDF should be divided.

Use Case Examples

  1. Splitting a PDF invoice into separate files for each page or range of pages.
  2. Extracting sections of a PDF report by searching for specific text strings and splitting at those points.
  3. Dividing a PDF document based on detected barcodes to separate different document parts.

Properties

Name Meaning
Authentication Method of authentication to access the PDF processing service, either API Key or OAuth2.
PDF URL to Split The URL of the PDF file to be split.
Split By The method to split the PDF: by page numbers, text search, or barcode search.
Pages (Numbers or Ranges) Comma-separated list of page numbers or ranges to split the PDF by, applicable when splitting by page numbers.
Text Search String The text string to search for in the PDF when splitting by text search.
Barcode Search String The barcode string to search for in the PDF when splitting by barcode search.
Advanced Options (Text Search) Additional options for text search splitting such as case sensitivity, regex search, excluding pages with identified text, OCR language, output file name, callback URL, output link expiration, inline response, HTTP credentials, and custom profiles.
Advanced Options (Barcode) Additional options for barcode search splitting similar to text search options, including case sensitivity, regex, excluding pages, file name, callback URL, expiration, inline response, HTTP credentials, and custom profiles.
Advanced Options (Page Number) Additional options for page number splitting including file name, callback URL, expiration, inline response, HTTP credentials, and custom profiles.

Output

JSON

  • url - URL of the split PDF file or files.
  • pages - Pages or ranges that were split from the original PDF.
  • fileName - Name of the output file if specified.
  • callback - Callback URL if used to receive output data.
  • expiration - Expiration time of the output link in minutes.
  • inline - Indicates if the output is returned inline in the response.

Dependencies

  • PDF.co API or service for PDF processing

Troubleshooting

  • Ensure the PDF URL is accessible and correct to avoid download errors.
  • Verify authentication credentials (API Key or OAuth2) are valid and have necessary permissions.
  • Check that the page numbers, text, or barcode search strings are correctly formatted and exist in the PDF.
  • If using advanced options like OCR, ensure the language is supported and correctly specified.
  • For callback URLs, ensure the endpoint is reachable and properly configured to receive data.

Links

Discussion