What can you do with it?

Split PDF files into smaller chunks. Supports both URL-based splitting and direct file uploads, perfect for breaking down large documents into manageable pieces. Puts chunks into the file store collection that you specify. Does not retrun the chunks directly, since there may be many.

How to use it?

Basic Command Structure

Use pdf-splitter skill with collectionId:XXX
file: the PDF file to split
pages per chunk: number of pages per split file
metadata: (optional) custom metadata object
replaceExisting: (optional) true/false - defaults to true

Parameters

  • file: URL of the PDF file to split or PDF content to upload
  • pages per chunk: Number of pages per split chunk (e.g., 2 means 2 pages per file)
  • collection id (required): Collection ID for grouping split files - must be provided in user prompt
  • file links expire in days (optional): Number of days before download links expire - defaults to 4
  • split into pages type (optional): Always set to “PDF” for PDF splitting
  • metadata (optional): Custom metadata object to attach to files (e.g., {"project": "onboarding"})
  • replaceExisting (optional): Whether to replace existing files with same filename - defaults to “true”

Response Format

Returns an array of split PDF files with metadata including file IDs, filenames with page ranges, file sizes, enhanced metadata (including originalFilename, batchId, and custom metadata), and a collection ID. Provides URLs for accessing files instead of automatically downloading them.

Examples

Basic Usage

Split PDF into 2-page chunks:

Use pdf-splitter skill with collectionId:GL7O7FAfCY3RvWgv4E56
file: https://example.com/document.pdf
pages per chunk: 2

Advanced Usage

Split PDF with custom expiration:

Use pdf-splitter skill with collectionId:ABC123DEF456
file: https://example.com/manual.pdf
pages per chunk: 3
file links expire in days: 7

With Custom Metadata

Split PDF with custom metadata for project tracking:

Use pdf-splitter skill with collectionId:ABC123DEF456
file: https://example.com/manual.pdf
pages per chunk: 3
metadata: {"project": "onboarding", "department": "HR"}
replaceExisting: false

From Artifact

Split PDF from previous step:

Use pdf-splitter skill with collectionId:XYZ789GHI012
file: [PDF artifact from previous step]
pages per chunk: 1
file links expire in days: 3

Direct Upload

Upload and split PDF content:

Use pdf-splitter skill with collectionId:DEF456JKL345
file: [PDF content to upload]
pages per chunk: 5
file links expire in days: 4
metadata: {"source": "upload", "batch": "2025-07-08"}
replaceExisting: true

Notes

  • Each split file includes page range information in the filename
  • Files are grouped under a collection ID for easy management
  • Supports splitting large PDFs into any number of pages per chunk
  • Maintains original PDF quality and formatting in split files
  • Returns file IDs and URLs for accessing individual chunks
  • Do not automatically download files (could be hundreds) - provide URLs to user instead
  • Collection ID is required for all PDF splitting operations
  • Custom metadata can be attached to all split files for project tracking and organization
  • Response includes enhanced metadata with originalFilename, batchId, and any custom metadata provided
  • Use replaceExisting: false to prevent overwriting files with the same name (defaults to true)