We’ve got an issue with Aspose.Words failing to save a specific document to pdf. Code duplicating the issue is as follows…
static void Main(string args)
var doc = new Document(args);
var destFileName = Path.GetFileNameWithoutExtension(args) + ".pdf";
var format = Aspose.Words.Saving.SaveOptions.CreateSaveOptions(destFileName).SaveFormat;
This is the document that produces the issue Chart_Issue.docx (37.7 KB). When the above code is executed passing this document as the argument it fails with a NullReferenceException on the call to Document.Save.
The above document is a cut down copy of a client document, it’s worth noting that there were a number of charts in the original document, it was this single chart inside the above document that seems to be responsible for the issue. We don’t know why there was an issue with this specific chart.
@support-1 With the latest 22.4 version of Aspose.Words exception does not occur and document is saved to PDF. However, I have noticed that trendline label of the chart is not rendering with Aspose.Words, this problem has been logged as WORDSNET-23801. We will let you know once it is resolved.
So, please try using the latest version of Aspose.Words to avoid the exception.
We’re still seeing the issue with the label of the chart and a forumla on the right hand side (y = 0.9065x + 2.6959R² = 0.2421) being missing when converting the word document to a pdf in 22.9. Any update on the issue?
@support-1 It is not likely this issue is related to the issue you have reported in another you thread, since the issue reported here is related to DML Chart rendering, but the issue in another thread is related to shape rendering.
@support-1 Thank you for additional information.
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-25113
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.
Hi thanks for the update. It’s now producing a PDF however it seems the gradation on the vertical axis of the first chart in the document is different in the PDF when compared with the original word document…
Here’s the PDF
Here’s the word document…
Whilst its a technically correct representation of the data in the chart at a glance they look different.