Chart in PDF is not similar with Word file

Hi Team,

We are facing issue with chart in PDF. In which, chart is not proper in the pdf file.
Please find the code snippet and attached zip file in which issue is highlight in the pdf_issue.png

Code Snippet:

Document document = new Document(wordFile.getAbsolutePath());
document.save(outputPdfFilePath);
String rightsWatchMark = document.getCustomDocumentProperties().get("RightsWATCHMark").toString();
String encodedRightsWatchMark = Base64.getEncoder().encodeToString(rightsWatchMark.getBytes());
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(outputPdfFilePath);
DocumentInfo documentProperty = pdfDocument.getInfo();
documentProperty.set_Item("RightsWATCHMark", encodedRightsWatchMark);
pdfDocument.save();

Sample_issue_pdf_file.zip (981.3 KB)

@forasposeissues

It seems you are experiencing issues with chart rendering when converting a Word document to PDF using Aspose. This can happen due to various reasons, including differences in how charts are handled in Word and PDF formats.

Here are a few suggestions to troubleshoot and potentially resolve the issue:

  1. Update Aspose.Words: Ensure you are using the latest version of Aspose.Words. Recent updates often include improvements and fixes related to chart rendering. For instance, the latest releases have significantly improved chart rendering capabilities.

  2. Check Chart Compatibility: Some chart types or features in Word may not be fully supported in PDF. Review the chart types you are using and consult the Aspose documentation to see if there are any known limitations.

  3. Use Save Options: When saving the document to PDF, consider using specific save options that might enhance the rendering of charts. For example, you can set options that control how charts are exported.

  4. Test with Different Formats: If possible, try saving the document in different formats (like HTML) before converting to PDF. This can sometimes help identify if the issue is with the initial conversion or the final PDF output.

  5. Review Sample Files: If you have a sample file that demonstrates the issue, it may be helpful to share it on the forum or with Aspose support for more targeted assistance.

If the problem persists, consider providing more details about the specific chart types and features you are using, as well as any error messages or unexpected behavior you are encountering.

For further assistance, you might want to check similar discussions in the Aspose forums, as other users may have faced and resolved similar issues.

If you have any more questions or need further clarification, feel free to ask!

image.png (75.5 KB)

We are using following version in our project

aspose.words.version-24.12
aspose.pdf.version-24.10
JDK-17

@forasposeissues
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): WORDSNET-27878

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.