Hello team,
I’m attempting to convert a Word document into HTML. However, before I perform this conversion, I am extracting each page one by one from the source document and appending them into a destination document. Then, I’m converting this new document to HTML. The problem is that in the HTML output, every page is displaying as “Page 1”. This is not matching the page numbering in the source document. How can I fix this issue?
Snippet :
string sourcePath = "D:\Source.docx";
Aspose.Words.Document sourceDoc = new Aspose.Words.Document(sourcePath);
Aspose.Words.Document destDoc = new Aspose.Words.Document();
for (int i = 0; i < sourceDoc.PageCount; i++)
{
Document page = sourceDoc.ExtractPages(i, 1);
destDoc.AppendDocument(page, ImportFormatMode.KeepSourceFormatting);
}
destDoc.Save(@"D:\Output.html");
Attachments:
WordToHTML_Issue.zip (378.2 KB)