Skip to content
//PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs example\\

Split a PDF into chapters by its bookmarks

Cuts a PDF into one file per top-level bookmark, named after the chapter.

Updated November 13, 2026

What this example returns

The dataset’s “Results” view shows 13 columns: Type, File, Download, Operations, Pages, Page range, Page, Size (bytes), Smaller by %, Source file, Notes, Status, and Error. See every output field.

What each setting does

The input this example runs PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

PDF and image links fileUrls

https://arxiv.org/pdf/1706.03762

Links to the PDF files to work on, one per line (images such as JPEG, PNG, WebP, GIF, TIFF, BMP and HEIC become PDF pages). Up to 500 MB per file. Google Drive, Google Docs, Dropbox, GitHub and arXiv share links are turned into download links automatically. You can also upload files below, or take them from a…

What to do operations

compress, split

Pick one or more operations. They always run in this order, whatever order you pick them in: images to PDF, merge, extract / remove / reorder pages, rotate, watermark, page numbers, metadata, compress, password; then the readers (info, text, embedded images, page images) look at the finished PDF, and split cuts it…

Split mode splitMode

By top-level bookmarks (chapters)

Each part becomes one PDF with its own download link.

Default: Every page its own PDF → this example uses By top-level bookmarks (chapters)

Compression level compressionLevel

Lossless (no image quality loss)

Lossless rewrites the file compactly. Balanced and Strong also scale down and recompress large images. A file that cannot get smaller is kept as it was.

Default: Balanced (images to 150 DPI, good quality) → this example uses Lossless (no image quality loss)

.json
{
  "fileUrls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "operations": [
    "compress",
    "split"
  ],
  "compressionLevel": "lossless",
  "splitMode": "bookmarks"
}

What it costs

You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.

  • File loaded$0.00425Each PDF or image file that was downloaded and opened. Files that cannot be downloaded or opened are free.
  • Embedded image saved$0.0017Each embedded image saved from a PDF.
  • Info and metadata read$0.00425Each file whose info and metadata were read.
  • Page converted to an image$0.00425Each PDF page saved as a PNG, JPEG, WebP or TIFF image.
  • Page processed$0.0017Each page a page step writes: merge, split, extract, remove or reorder pages, rotate, watermark, page numbers and compress (counted per step).
  • PDF compressed$0.0085Each compressed PDF.

Full pricing

When to use this example

From the PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs readme:

What if a file fails?

It gets an error row with a plain message (not found, not a PDF, wrong password...) and the other files carry on. Failed files are not charged.

Other ways to run PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs

All examples of PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs

About PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs

Merge, split, compress, rotate, reorder, extract or remove pages, add watermarks and page numbers, convert pages to images and images to PDF, extract text and embedded images, read and write metadata, and add or remove passwords. Chain several steps in one run; every output file gets a download link.

Price:
$4.25 / 1,000 results
Developer:
Querystone

PDF Toolkit – Merge, Split, Compress, Convert & Edit PDFs pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.