Dear Aspose team,
We have a docx file that cannot be saved as html with our, following code and save options:
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html);
options.ImagesFolder = "doc_files";
options.ImagesFolderAlias ="doc_files";
options.ExportHeadersFootersMode = ExportHeadersFootersMode.FirstSectionHeaderLastSectionFooter;
Aspose.Words.Document doc = new Aspose.Words.Document(inputFilePath);
doc.Save(outputFilePath, saveOptions);
We get the following exception:
System.InvalidOperationException occurred
HResult=-2146233079
Message=Stack empty.
Source=mscorlib
StackTrace:
at System.Collections.Stack.Peek()
at . (Shading )
at . (Paragraph )
at .VisitParagraphStart(Paragraph )
at Aspose.Words.Paragraph.r3ka8zscesabkstb24kjjv9sml9wq7pw (DocumentVisitor )
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at . (Node )
at . (Body )
at . (Section )
at . ()
at . ()
at . ()
at . ( )
at . ( )
at Aspose.Words.Document. ( , SaveOptions )
at Aspose.Words.Document. (Stream , String , SaveOptions )
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
I am attaching the sample file. test.zip (106.0 KB)
Please let us know if we can provide any more details to help you fix the issue.
Best regards,
Daniel Lengyel
31564