You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library to generate PDF from multiple HTML files. I can do so but it starts new PDF on a new page instead of existing page. Can anyone help me?
Attaching my code here :
PDDocument doc = new PDDocument();
File file = File.createTempFile("temp_openhtmltopdf_", ".pdf");
PdfRendererBuilder builder = new PdfRendererBuilder();
builder.useDefaultPageSize(210, 297, PageSizeUnits.MM);
builder.useSVGDrawer(new BatikSVGDrawer());
builder.usePDDocument(doc);
for (String html : uris) {
builder.withHtmlContent(html, "UTF-8");
PdfBoxRenderer renderer = builder.buildPdfRenderer();
renderer.createPDFWithoutClosing();
}
doc.save(file);
doc.close();
It generates 2 page PDF. I want to start the 2nd page from the ending of the 1st page.
The text was updated successfully, but these errors were encountered:
Concatenating multiple renderings at their respective bottom positions is doable yet not so straightforward; you have to combine the solutions discussed here:
I am using this library to generate PDF from multiple HTML files. I can do so but it starts new PDF on a new page instead of existing page. Can anyone help me?
Attaching my code here :
It generates 2 page PDF. I want to start the 2nd page from the ending of the 1st page.
The text was updated successfully, but these errors were encountered: