Free Support Forum -

Convert Docx file (containing images or charts) to PDF

Hi guys, Ive been working with AsposeWord and Pdf, to convert the documents, but Ive found that when doing it Im unable to get Charts in the output pdf file.

I saw this article:

Followed recommendation to save to disk instead of a stream but still got the same behavior charts wouldnt be recognized.
Im attaching a sample note that replicated the issue (Im using trial version now, while I prototype for my client, but going through several test cases to make sure your libraries will satisfy our needs).

Here’s a sample of .Net C# Code that replicates the issue:

private void test()
//Create a New Doc object
Document doc = new Document(@“c:\testNote.docx”);
//Save the document in Aspose.Pdf.Xml format

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
//Enable the caching of True type font map on disk
pdf.IsTruetypeFontMapCached = true;
//Set the path of True type font map file
pdf.TruetypeFontMapPath = System.IO.Path.GetTempPath();
//Load the XML document into Aspose.Pdf
pdf.BindXML(@“c:\man.xml”, null);
//Now produce the PDF file.

Is there a fix or a workaround for this issue?

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for reporting this.

I was able to reproduce the case and created a new issue #6001 in our defect database. We’ll investigate it and provide more information. Any updates will be posted here in the forum.


by the way this also happens when saving the docx, to doc.
so my take is that, its completely ignoring the charts, regardless of the conversion you perform.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. Yes we saw this problem.

Issue #6001 - Diagram object is not imported from DOCX

Best regards.

This is an OOXML Chart. OOXML charts and diagrams are not yet supported. Will be supported in the future, hopefully in 2009.

yeah I know its not support for Word, I thought it was supported in excel an exported as an image?

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. If you need to convert Excel char to image then you should use Aspose.Cells. Please see the following link for more information.

Hope this helps.

Best regards.

This is not an Excel chart either. This char is an OOXML chart. None of the Aspose components currently support that.

The issues you have found earlier (filed as 6001) have been fixed in this update.