Free Support Forum - aspose.com

Word to PDF: NullReferenceException

Hello,

I'm trying to convert an word document to PDF. But during the convert process a NullReferenceException occurred. I'm just open and save the document:

Document doc2pdf = new Document(@"c:\...\TestDoc.docx");
doc2pdf.Save(@"C:\...\TestDoc.pdf", SaveFormat.Pdf);

You can reproduce the exception with the attached document.

Exception details:

at x996431aaaaf00543.x3064c6a807d3a0a8.x5b81632e5b71b64c(XmlDocument x5510939d5b9dcd91)
at x123e776942c1903d.xd959deded1f04060.xe406325e56f74b46(DrawingML x91ebfdc604552811)
at x59d6a4fc5007b7a4.xa7492065dee59ad0.x539f48f6ee6ea753(xdeb77ea37ad74c56 x1e972e751678e682, Boolean& xf31bd0ec37d2cc8b)
at x59d6a4fc5007b7a4.xa7492065dee59ad0.xe406325e56f74b46(xdeb77ea37ad74c56 x1e972e751678e682, Boolean& xf31bd0ec37d2cc8b)
at x4a820b097ff6c983.xdbc6e5b1526a2f0d.x6352d2f80acb683d(xa7492065dee59ad0 x5906905c888d3d98)
at x4a820b097ff6c983.xae895851cacb1a3b.x371451abcd43de03(xa7492065dee59ad0 x5906905c888d3d98)
at x59d6a4fc5007b7a4.xa7492065dee59ad0.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.x6a53cec2ada67e5c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xbf5b03855bcdbdae.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xc6ae5bf3fc6721e2.xa246eb87eda7b55d(x398b3bd0acd94b61 xd7e5673853e47af4, x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xc6ae5bf3fc6721e2.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.x512b9a381ad7cd9c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xdcf47a8f1807f37c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x4a820b097ff6c983.xae895851cacb1a3b.xe406325e56f74b46(xdcf47a8f1807f37c x32eaf67d0ee57cb7, xdeb77ea37ad74c56 x1e972e751678e682)
at xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
at Aspose.Words.Document.Save(String fileName, SaveFormat saveFormat)
at EvaluationCode.Program.TestConvert()

I'm using ASPOSE.Words for .NET Version 9.5.0.0

Hello,

Thank you for your inquiry. I managed to reproduce the problem on my side. Your request has been added to our database of defects. Once the bug is fixed you will be notified immediately.

Just wanted to mention that you are using an older version of our product. The current version 9.7.0.0 You can download it here: http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

But please note that I have reproduced your problem on it. It does not throw such an exception as you have on 9.5, but the picture does not appear in the document.

Hi Aspose,

Why the picture is disappear? Is there any issue? I have same issue with this image.
Please advise.



Hi Kaline,

Thanks for your request. I just answered your question here:

http://www.aspose.com/community/forums/thread/301215/error-print-file-with-the-smart-art-graphic-inside.aspx

Best regards,

Hi

Unfortunately, the issue mentioned above is not resolved yet. The image in your document is actually OOXML chart, unfortunately, Aspose.Words does not support rendering of such charts at the moment. Our developers are working on this feature. Hopefully it will be available in a month or two. We will keep you informed and let you know once this feature is implemented.

Best regards,

The issues you have found earlier (filed as WORDSNET-4494) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-6941) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.