I'm using pdfbox-layout to create and manage PDF documents using Document API.
Document document = new Document();
It manages to create new page automatically if the text size increases beyond current page using Paragraph API.
Paragraph paragraph = new Paragraph();
However, I'm unable to add new page manually as and when needed. I want to print some content starting from new page.
After going through the API's source code, I found that
addmethod accepts parameter of typeElement,And after inspecting all the classes that implements
Elementinterface, I found the one that I need, i.e. ControlElementSo, to add a new page, my code looks like,