Aspose fails to convert *.docx file to html

Hello,

Aspose 17.2 fails to convert docx file to the html. Please see attached document and txt file with StackTrace

We are using FixedHTML

Hi,

Thanks for your inquiry.

The following exception occurred on our end upon loading attached DOCX (MRD_Master-2.docx) with Aspose.Words for .NET 17.2.0.

Document doc = new Document(MyDir + @"MRD_Master-2.docx"); // throws following error
Aspose.Words.FileCorruptedException was unhandled
HResult=-2146233088
Message=The document appears to be corrupted and cannot be loaded.
Source=Aspose.Words
StackTrace:
at Aspose.Words.Document. (Stream , LoadOptions )
at Aspose.Words.Document. (Stream , LoadOptions )
at Aspose.Words.Document…ctor(String fileName, LoadOptions loadOptions)
at Aspose.Words.Document…ctor(String fileName)

We have logged this exception in our bug tracking system. The ID of this issue is WORDSNET-14936. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi,

Regarding WORDSNET-14936, we have found that this document can also not be opened by using MS Word 2016. This is because of the problems with the content of this document. MS Word 2016 also asks to recover this document. Maybe you should re-save this document. Re-saving will fix this document and you can then open the fixed document with Aspose.Words.

Best regards,

I attached another .docx file of this document. It is opened in MS Word and still can not be converted to html format.
Could you check it, please?

Thanks

Hi,

Thanks for your inquiry. After an initial test with Aspose.Words for .NET 17.2.0, we were unable to reproduce this issue on our end. Please see attached output HTML file:

Please upgrade to the latest version from the following link:
https://releases.aspose.com/words/net/

Hope, this helps.

Best regards,

Hi,

it seems that you were using not FixedHtml during document converting. And we are using Fixed Html. And also we accept all revisions before document converting. And we have error on this step.

"StackTrace": " at Aspose.Words.CompositeNode.\u0003(Node \u0002, Node \u0003, Node \u0005)\r\n at \u000f .\u0002(Paragraph \u0002)\r\n at \u000f .\u0002(ArrayList \u0002, ArrayList \u0003)\r\n at \u000f .\u0002(\u0006 \u0002, ArrayList \u0003)\r\n at Aspose.Words.RevisionCollection.AcceptAll()\r\n at Rrd.ActiveDocument.DocumentProcessing.Services.WordDocumentProcessingService.AcceptAllRevisions(Stream openXmlStream) in C:\vNextAgents\Agent_03\_work\13\s\Backend\Core\Rrd.ActiveDocument.DocumentProcessing\Services\WordDocumentProcessingService.cs:line 123\r\n at Rrd.ActiveDocument.DocumentProcessing.Services.WordDocumentProcessingService.PreprocessDocument(IBlobData rawData) in C:\vNextAgents\Agent_03\_work\13\s\Backend\Core\Rrd.ActiveDocument.DocumentProcessing\Services\WordDocumentProcessingService.cs:line 77",

Could you please check this scenario?

Thanks

Hi,

Thanks for the additional information.

While using the latest version of Aspose.Words i.e. 17.2.0, we managed to reproduce this issue on our end. The Document.AcceptAllRevisions throws System.ArgumentException. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-14996. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi,

Regarding WORDSNET-14936, in addition to my this reply, we concluded that this is simply a bad DOCX, and Aspose.Words just can’t recover whatever is left. Even MS Word automation (VBA) throws the exception “The file appears to be corrupted.” and cannot recover it. So if you insist, we may try to save the content, which is a valid point. We would then reclassify this as enhancement work. So, please let me know of your opinion on this topic.

Best regards,

hello Awais,

we have double checked attached file and this MRD_Master-2.docx is bad because it was not fully attached to this ticket (only 890 kb was attached instead of real size 2.7 mB).

So I will put MRD_Master-2.docx converted to 7z and attach one more time.

Also I used standalone application to convert file and convertation failed on accepting all tracked changes in the document: Class Document, method AcceptAllRevisions();
Aspose.Words.RevisionCollection.AcceptAll

Stack trace is attached.

Standalone application you can find here:
https://www.dropbox.com/sh/5kiwqz7um88wltl/AADyzlFTVDpxYYCY9jSXMhVFa?dl=0

Thank you for support,

Olga

Hi Olga,

Thanks for the additional information.

While using the latest version of Aspose.Words i.e. 17.3.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-15042. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-15042) have been fixed in this Aspose.Words for .NET 17.4 update and this Aspose.Words for Java 17.4 update.

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

The issues you have found earlier (filed as WORDSNET-14996) have been fixed in this Aspose.Words for .NET 17.5 update and this Aspose.Words for Java 17.5 update.

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