PDF Splitter Guide
Learn how to use the pdf-splitter slash command to split PDF files into smaller chunks
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
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:
Advanced Usage
Split PDF with custom expiration:
With Custom Metadata
Split PDF with custom metadata for project tracking:
From Artifact
Split PDF from previous step:
Direct Upload
Upload and split PDF content:
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)