Hello,
I split the document by heading using the following script:
var proposalPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\Files\\Template.docx";
var htmlOutputPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\Files\\Result\\Output.html";
var doc = new Document(proposalPath);
HtmlSaveOptions options = new HtmlSaveOptions
{
HtmlVersion = Aspose.Words.Saving.HtmlVersion.Html5,
ExportFontsAsBase64 = true,
CssStyleSheetType = CssStyleSheetType.Embedded,
ExportImagesAsBase64 = true,
PrettyFormat = true,
ExportHeadersFootersMode = ExportHeadersFootersMode.PerSection,
DocumentSplitCriteria = DocumentSplitCriteria.HeadingParagraph,
DocumentSplitHeadingLevel = 6,
};
doc.Save(htmlOutputPath, options);
My question is how to know the parent heading for each heading section?