Chart elements in PDF are converted as two separate elements instead of one when converted to PPTX.
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);
}
@srijal,
It looks like the issue is related to Aspose.Pdf library. I’ve moved this forum thread to Aspose.Pdf forum. My colleagues from Aspose.Pdf team will reply to you soon.
I am not part of the dev team, but as far as I can see, the conversion process takes some elements and make them into an image.
It can be very challenging to figure out when one chart starts and when another ends.
The purpose of the conversion is fidelity more than anything else.
From what you want. I get the idea that you want to edit the PPTX document later on.
I can create a ticket if you want, but the development team will decide whether it is a bug or if it is the expected behavior of the conversion process.
Because as I said conversion process tries to achieve fidelity over editability. If both can be achieved it is excellent.
But no one will prefer a conversion process that looks a bit different from the original for the sake of the edition.