Hi,
I ran into an issue when converting a PDF to PPTX. When the first page is of a different size in PDF that others. the PPTX export doesn’t have the elements in the correct position filling the slides.
var fileName = ""; // Enter the PDF filename
try (Document document = new Document("src/main/java/" + fileName + ".pdf")) {
document.save("saved.pptx", SaveFormat.Pptx);
var presentation = new Presentation(fileName + ".pptx");
presentation.getSlideSize().setOrientation(SlideOrientation.Landscape);
}
I’ve attached both the PDF and PPTX files for one without the issue and one with.
Archive 3.zip (355.4 KB)
Please convert both to PPTX and check the difference. The second page of the HPS.pdf is not covering the full page but the one in the second PDF (where I removed the first one) is.
Regards,
Sitamsh