Create PDF Booklet
Contents
[
Hide
]
Create a PDF booklet
Use PdfFileEditor.makeBooklet to rearrange the pages of an existing PDF into booklet order.
Steps
- Create a
PdfFileEditorinstance. - Call
makeBookletwith the source PDF and output file. - Save the booklet document.
- If you want to check the return status, use the boolean-return variant and handle a failed result.
Java example
public static void createPdfBooklet(Path inputFile, Path outputFile) {
PdfFileEditor bookletMaker = new PdfFileEditor();
bookletMaker.makeBooklet(inputFile.toString(), outputFile.toString());
}
public static void tryCreatePdfBooklet(Path inputFile, Path outputFile) {
PdfFileEditor bookletMaker = new PdfFileEditor();
if (!bookletMaker.makeBooklet(inputFile.toString(), outputFile.toString())) {
System.out.println("Failed to create booklet.");
}
}