PDFEngines.split
Splits PDFs using Gotenberg’s split route:options object holds the split configuration:
- mode —
"pages"or"intervals" - span — Page range string (e.g.
"1-2","1,3,5") - unify — When
modeis"pages", merge the split results into one PDF - flatten — Flatten form fields and annotations in the output — part of
optionson this route specifically (see the note below)
PDFEngines.split() also accepts optional metadata, pdfa/pdfUA, userPassword/ownerPassword and the six permission booleans (see PDF permissions), and watermark, stamp, and rotate for PDF-engine post-processing on the split output. See Rotate PDFs. downloadFrom, webhook, outputFilename, and trace are also accepted — see Request tracing.
Split on Chromium and LibreOffice
Chromium converters and LibreOffice also support asplit option on convert() so you can split the generated PDF in the same request:
ConvertSplit type.
flatten is not part of split on Chromium/LibreOffice convert() —
it’s a separate top-level option there (see Flatten
PDFs). It’s only nested inside options on the
dedicated PDFEngines.split() route shown above.