We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Network path Issue

We’re getting an error message when trying to convert to pdf “: The document appears to be corrupted and cannot be loaded.”





docFilePath = @"" + docFilePath.Replace(“file:///”, String.Empty);

Aspose.Words.Document document = new Aspose.Words.Document(@"\DELLWRO\share2\test.docx");

string outPutPath = docFilePath.Replace(Path.GetFileName(@"\DELLWRO\share2\test.docx"), Path.GetFileNameWithoutExtension(@"\DELLWRO\share2\test.docx") + “.pdf”);

document.Save(outPutPath);







{Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. —> System.NullReferenceException: Object reference not set to an instance of an object.

at xda075892eccab2ad.xc1b08afa36bf580c.xa9aaee2edd3cd025(String x971e83bc97861294, Byte[] xf9a0d04800d70471, Int32 x10aaa7cdfa38f254)

at x79490184cecf12a1.xc37fee571c29ba92.xdafccb198ba91439()

at x79490184cecf12a1.xc37fee571c29ba92.x2506b757d67702ec()

at x79490184cecf12a1.xc37fee571c29ba92.x902b6f807c71becd(x3dabda6865ed239d x8ad4cdceb54e447f)

at x79490184cecf12a1.xc37fee571c29ba92.xd4c5b858945b0ab2(x3dabda6865ed239d x8ad4cdceb54e447f)

at x79490184cecf12a1.xc37fee571c29ba92.x06b0e25aa6ad68a9(xa52ef41af20225f0 xe134235b3526fa75)

at x79490184cecf12a1.xa52ef41af20225f0.DoRead()

at x79490184cecf12a1.x11e1346c12ead315.x06b0e25aa6ad68a9()

at x79490184cecf12a1.xae13d15563a3a703.x748a2047fcb706ad()

at x79490184cecf12a1.xae13d15563a3a703.x06b0e25aa6ad68a9()

at Aspose.Words.Document.x5d4db34d48fb3129(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)

— End of inner exception stack trace —

at Aspose.Words.Document.x5d4db34d48fb3129(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)

at Aspose.Words.Document.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)

at Aspose.Words.Document…ctor(String fileName, LoadOptions loadOptions)

at Aspose.Words.Document…ctor(String fileName)

at CDUWA.Business.FileManager.ConvertDocToPdfByAspose(String docFilePath) in c:\cneal\Aims-Project-System\SVN\AIMS\Release 3.5.2\CDUWA.Business\FileManager.cs:line 1936}



Hi there,


Thanks for your inquiry. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

Hello,



Attached you find the document.



Thanks

Hi there,

Thanks for sharing the document. We have tested the scenario using latest version of Aspose.Words for .NET 17.1.0 and have not found the shared issue. Please use Aspose.Words for .NET 17.1.0. We have attached the output Pdf with this post for your kind reference.