Chart in PDF Converted in Java as Two Separate Elements in PPTX

Hi,

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);
}

Source and output files:
Archive 2.zip (6.0 MB)

Could you please take look? Try to move the chart elements; the data is left behind when the chart moves.

@srijal,
Thank you for contacting support.

It looks like the PDF document you provided does not contain charts. Could you please check it carefully? Did you mean the tables?

Sorry about that. Uploaded the wrong files. New ones attached.

Files: Files.zip (134.5 KB)

@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.

@srijal,

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.

Hi everyone,
I came across this discussion and wanted to check if there have been any updates on this issue. I’m experiencing the same behavior where chart elements from PDFs are being split into separate elements when converted to PPTX.
Has there been any progress on resolving this, or are there any recommended workarounds? I’d really appreciate any insights.
Thanks!

@lmarinov

Would you kindly share your sample source and output files for our reference? We will test the scenario in our environment and address it accordingly. About the issue that has been discussed in this forum thread, we are afraid that it hasn’t been yet resolved. However, we will open a dedicated ticket for your file and attach it to this forum thread.

Thanks for the quick response :slight_smile:
chartSample.pdf (19.2 КБ)
image.png (24.8 КБ)
I’m attaching the source PDF file along with a screenshot of the result, after some rearrangement to showcase the issue (since PPTX files cannot be uploaded here). I also noticed that the outcome remains the same when converting to PPTX using the web tool.
The borders can be moved and resized separately from the data inside. The borders behave similarly to images rather than being part of a single element.
I appreciate your time and look forward to your response.

@srijal

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-44790

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.