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.{ 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.
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.
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 ofsource,1by default.page— the new page to draw on,1by 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—1by default;rotation— degrees, counter-clockwise aroundxandy.
set-metadata, set-bookmarks or autotag stages after compose to give the result its own.