Hi!
We are trying to convert the docx file attached to html using the following code:
var docxInputFilePath = @"...";
var outputHtmlFilePath = @"...";
AsposeLicenser.LoadLicense();
var saveOptions = new HtmlSaveOptions
{
SaveFormat = SaveFormat.Html,
CssStyleSheetType = CssStyleSheetType.Inline,
ExportImagesAsBase64 = true,
ExportFontsAsBase64 = true,
PrettyFormat = true,
Encoding = Encoding.UTF8,
ExportPageSetup = true,
ExportPageMargins = true,
ExportRoundtripInformation = false
};
var docxDocument = new Document(docxInputFilePath);
docxDocument.JoinRunsWithSameFormatting();
docxDocument.Save(outputHtmlFilePath, saveOptions);
Aspose.Words throws System.InvalidOperationException: ‘Cannot remove because there is no parent.’ from the Save(…) call. Tried with 21.5.0 and 21.6.0, same results.
isolated.zip (27.4 KB)
Thanks for any help,
Arnold