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