I have a DOCX file that cannot be saved as HTML with save options. I have attached a sample document and code to reproduce this issue. PFA StackEmpty.zip
Unhandled exception. System.InvalidOperationException: Stack empty.
at System.Collections.Generic.Stack1.ThrowForEmptyStack() at System.Collections.Generic.Stack1.Pop()
at . ()
at . ( )
at . ( )
at . ( )
at . ( )
at . ( , )
at .( , )
at . ( )
at . ( )
at Aspose.Words.Document. ( )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
at StackEmpty.Program.Main(String[] args)
It seems problem occurs because of the Content Control in the primary Footer of source Word DOCX document. The exception does not occur when you remove this StructuredDocumentTag node and then convert DOCX to HTML Fixed file format:
For the sake of correction in Aspose.Words for .NET API, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21462. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.