0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

PDF → Split PDF File

AI-generated

Overview

The node provides a utility to split PDF files into smaller parts. It supports splitting a PDF either by specifying explicit page ranges or by defining an interval (number of pages per split). This is useful when you need to extract specific sections from large PDFs, create smaller documents for easier sharing, or process parts of a document separately.

Practical examples:

  • Splitting a 100-page report into chapters by page ranges (e.g., pages 1-10, 11-20).
  • Dividing a large PDF into multiple files each containing 5 pages for batch processing.
  • Extracting only certain pages from a PDF received via URL or binary data.

Properties

Name Meaning
PDF URL Public URL of the PDF file to split.
PDF Buffer Binary buffer data of the PDF file (alternative to URL input).
Split Method Method to split the PDF. Options: "By Page Ranges" or "By Interval".
Page Ranges Specific page ranges to split by (e.g., "1-5", "10", "^1"). Multiple ranges can be specified.
Interval Number of pages per split file when using the interval method.
File Name Prefix for naming the output PDF files generated after splitting.

Output

The node outputs JSON data representing the resulting split PDF files. Each output item corresponds to one split segment of the original PDF. The output includes metadata such as the file name and the content of the split PDF part. If binary data is involved, it represents the actual PDF file content of each split segment.

Dependencies

  • Requires an API key credential for authentication with the external PDF processing service.
  • Needs internet access to fetch PDF files if provided via URL.
  • No additional local dependencies; all processing is done via the external API endpoint /pdf/split.

Troubleshooting

  • Common issues:

    • Providing both URL and buffer empty or invalid will cause failure.
    • Incorrect page range formats (e.g., invalid syntax like "5--7") may result in errors.
    • Specifying intervals larger than the total number of pages might return the entire PDF as one file.
    • Network or authentication errors if the API key is missing or invalid.
  • Error messages:

    • "Invalid page range format": Check that page ranges are correctly formatted strings.
    • "Missing PDF input": Ensure either a valid URL or binary buffer is provided.
    • "Authentication failed": Verify the API key credential is configured properly.
    • "Network error": Confirm network connectivity and API endpoint availability.

Links and References

Discussion