CustomJS (PDF & File Toolkit) icon

CustomJS (PDF & File Toolkit)

All-in-one toolkit for PDF, HTML, JSON and file conversions

PDF → Split Pages

AI-generated

Summary

Split a PDF into one PDF file per page, using either an input binary field or a URL. Each output includes the page number and total page count in its JSON data.

Inputs

  • Input Type — Choose Binary (default) or URL as the PDF source.
  • Input Binary Field (required) — When Input Type is Binary, name of the input binary property to read; defaults to data.
  • URL (required) — When Input Type is URL, the PDF URL to process.
  • Output Filename Prefix — Prefix for each output PDF filename; defaults to page, producing names such as page_1.pdf.

Output shape

A list of items, one per PDF page.

Each item contains binary data in the data property, named <prefix>_<page number>.pdf, and JSON fields page and totalPages, alongside the input item's JSON fields. If no page count is returned, it emits one item with the original JSON and no binary data.

Examples

Example 1: Use a PDF from an incoming binary property and keep the default prefix.

Set Input Type to Binary and Input Binary Field to data (or the name of the incoming property).

Example 2: Split a PDF hosted at a URL and use filenames beginning `invoice-page`.

Set Input Type to URL, enter the PDF URL, and set Output Filename Prefix to invoice-page.

Links

Discussion