PDF Split
PDF Split
Section titled “PDF Split”Type: pdf-split · Package: PDF Activities v1.2.4 · Output: List
Splits each page of a PDF into its own file, and returns the list of files created. Useful when you receive a batch of documents in a single PDF (one page per document) and need to process them separately.
How it works
Section titled “How it works”Creates one PDF per page of the original document in the outputDir folder and returns the list of paths created, in page order. The original stays intact.
- Files are named
<prefix>_<page>.pdf, with the page as three digits:batch_001.pdf,batch_002.pdf… If you don’t setprefix, the source PDF name without extension is used. - It creates
outputDirif it doesn’t exist and overwrites files with the same name. If you split several PDFs into the same folder, use a differentprefixfor each.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | — | Path of the source PDF. |
outputDir | string | — | Folder where the split pages are saved. Created if it doesn’t exist. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
prefix | string | source name | Prefix of the file names. By default, the source PDF name without extension. |
Output
Section titled “Output”Returns a List of string with the full paths of the files created, one per page and in order (C:/split/batch_001.pdf, …).
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
File not found. | The path doesn’t exist. |
'path' is required. / 'outputDir' is required. | The parameter was left empty or its expression returned null. |
| PDF library error when opening the file | Password-protected or damaged PDF. See Protected and damaged PDFs. |
| File system access error | No permission on outputDir, or an output file is open in another program. |
Example
Section titled “Example”Split a batch and process each page:
PDF Split path = filePath outputDir = "C:/split" prefix = "batch" → output: pagesFor Each items = pages itemVariable = pagePdf └─ activities: PDF Get Text path = pagePdf → output: text ... process each document ...Related activities
Section titled “Related activities”- PDF Extract Pages — extract a range into a single PDF.
- PDF Merge — the reverse operation: merge.