Free Support Forum - aspose.com

Failure when converting doc-docx to PDF

Hi,


I have an issue when trying to convert attached doc to pdf.

Aspose.Pdf.dll 8.5.0.0
Aspose.Words.dll 13.9.0.0

Code:

FileStream fs = File.OpenRead(“c:\work\test2.doc”);
var document = new Aspose.Words.Document(fs);

using (var stream = new MemoryStream())
{
var saveOptions = new Aspose.Words.Saving.PdfSaveOptions
{
SaveFormat = Aspose.Words.SaveFormat.Pdf
};
document.Save(stream, saveOptions);
}

Exception:
Object reference not set to an instance of an object.
at x06e283fdfa5dc5f0.x5f887a65c13f569c.x413b45190f5b64bc(Single x56807c4768855de3)
at x06e283fdfa5dc5f0.x5f887a65c13f569c.xbd16d3d0406045e1(RectangleF xdc901b9828d8600c, Border xdb200d0a72bd656e, Border xc55498ae473c1804, Border x39d4d9d592924ac5, Border xd1516a9a5bb6b163)
at x06e283fdfa5dc5f0.x5f887a65c13f569c.xb1e2c9a68308ad60(RectangleF xdc901b9828d8600c, Border xdb200d0a72bd656e, Border xc55498ae473c1804, Border x39d4d9d592924ac5, Border xd1516a9a5bb6b163, Border x93811d1495c08cdb, Border x7af19449a2ea0295, x6c68e8efd3a92e85 x3647f42eb1706491)
at x6a42c37b95e9caa1.xfef22f4f866de8d2.x02cfd28b22f47a16(x5f887a65c13f569c xcd4ea23e1c937019, x86accec882b7012a xb4144741a65a3e9a, Boolean x4729f6e0bbe03396)
at x6a42c37b95e9caa1.xfef22f4f866de8d2.x67c463ab8a7d7a8e(xb2b9d43291f4067d xe6de5e5fa2d44af5)
at x59d6a4fc5007b7a4.xe4d6d8acaf4e81ea.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xa68c54b19fa2b58c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xb850ecb8335a2e09.xa246eb87eda7b55d(x3adba2572f6b9747 x672ff13faf031f3d, x398b3bd0acd94b61 xd7e5673853e47af4)
at x59d6a4fc5007b7a4.xc6ae5bf3fc6721e2.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.x512b9a381ad7cd9c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x59d6a4fc5007b7a4.xdcf47a8f1807f37c.x7012609bcdb39574(x3adba2572f6b9747 x672ff13faf031f3d)
at x6a42c37b95e9caa1.xfef22f4f866de8d2.xff8c181ac02c38ee(xdcf47a8f1807f37c x32eaf67d0ee57cb7)
at x6a42c37b95e9caa1.xfef22f4f866de8d2.xe406325e56f74b46(xdcf47a8f1807f37c x32eaf67d0ee57cb7, xdeb77ea37ad74c56 x1e972e751678e682)
at xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at UserQuery
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Best regards,
Bartłomiej Chojnowski

Hi Bartłomiej,


Thanks for your inquiry. Aspose.Words support DOC(X) to PDF conversion, so I am moving your query to related forum. There one of my Aspose.Words colleague will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Hi Bartłomiej,


Thanks for your inquiry. The ‘test2.doc’ you attached is a blank document with 0KB size. Please zip and re-attach your input Word document here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

zipped doc attached.

Hi Bartłomiej,


Thanks for your inquiry. After an initial test with Aspose.Words for .NET 15.8.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Best regards,