Posted by a ceTe Software moderator
Hello,
When you use Document.getPages().add(page) it will add the page at the end of the existing pages and not at the beginning. We have tested the following code with the
latest build of Generator v7 and it is working as expected. Please try the latest build and see if it resolves the issue.
Document document = new Document();
// Create a Page and add it to the document
Page page = new Page();
document.getPages().add(page);
// Add a label to the page
page.getElements().add(new Label("Page 1", 0,0, 512, 40, Font.getHelvetica(), 30, TextAlign.CENTER));
Page page2 = new Page();
document.getPages().add(page2);
// Add a label to the page
page2.getElements().add(new Label("Page 2", 0,0, 512, 40, Font.getHelvetica(), 30, TextAlign.CENTER));
// Save the PDF document
document.draw("MyDocument.pdf");
In case the latest build does not resolve the problem, please email the following to
support@cete.com so we can look into it further.
1. Code used to create the PDF.
2. Input PDFs (if any used)
3. Output PDF
Thanks,
ceTe Software Support Team.