Skip to main content
Each operation below is a stage for stages lists, and a method on PDF for a single operation. Options of type pages take a page selection such as "1-3", "odd" or "!last".

merge

Appends the PDFs into one, in the alphanumeric order of their names. The result takes the name of the first PDF. Bookmarks are kept and point at the merged pages.
As a stage: { op: "merge" }. On LibreOffice.convert(), it joins the exported documents into one PDF. For a bookmark per merged file, add a set-bookmarks stage after it.

split

Cuts each PDF into several, which come back in a ZIP: report_0.pdf, report_1.pdf… Set every or ranges, not both.
In a stages list, the stages after split run on each part.

select and delete

select keeps the pages you list, in the order you list them; delete removes them.
To pull a few pages into one PDF, use select; to get one PDF per range, use split.

insert

Inserts the pages of another PDF.

compose

Draws pages of the PDFs on new pages of the size you choose: a label, a packing slip, a sheet of several pages. The result is one new PDF, named after the first input. Set paperSize, or both paperWidth and paperHeight. Each placement takes:
  • source — the name of an input PDF to draw from; leave it out with one input. Every input PDF must be placed.
  • sourcePage — the page of source, 1 by default.
  • page — the new page to draw on, 1 by default. A page no placement names comes out blank.
  • x, y — the bottom-left corner of the drawn page, in points from the bottom-left of the new page (72 points to the inch).
  • scale — 1 by default; rotation — degrees, counter-clockwise around x and y.
Annotations, form fields, bookmarks, tags and metadata of the source pages are not drawn. Add set-metadata, set-bookmarks or autotag stages after compose to give the result its own.

rotate

Sets the rotation of pages. Viewers turn them clockwise.
See Reference — PDF and Reference — stages.