How i can create Pdf with a certain number of pages.
I need to create a pdf with the exact number of pages, can I do that?
public static void createPdf(int totalpages){ // totalpages количество страниц
PdfDocument pdf = new PdfDocument(new PdfWriter(DEST));
Document document = new Document(pdf);
pdf.setDefaultPageSize(PageSize.A5);
document.add(new Paragraph("hello stackoverflow ... LONG TEXT"));
document.close();
}