merge

fun merge(vararg documents: ByteArray): ByteArray

Merges documents into a single PDF, concatenating their pages in argument order, via PdfBox's PDFMergerUtility.

Passing no documents returns an empty (zero-page) PDF; passing one returns a re-saved copy of it.

Return

the merged PDF bytes.

Parameters

documents

the source PDFs, each as encoded bytes.