Membuat PDF booklet
Contents
[
Hide
]
Membuat PDF booklet
Gunakan PdfFileEditor.makeBooklet untuk menyusun ulang halaman PDF yang ada menjadi urutan buku pamflet.
Langkah
- Buat instans
PdfFileEditor. - Panggil
makeBookletdengan PDF sumber dan file output. - Simpan dokumen booklet.
- Jika perlu memeriksa status hasil operasi, gunakan varian yang mengembalikan boolean dan tangani hasil yang gagal.
Contoh Java
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.");
}
}