Hi,
We are using the Aspose word version 18.11.0.0 to generate word documents from HTML. Now, we want to migrate to the latest version 20.6.0.0. We are facing two issues which are described below, both of them are producible in the version 18.11.0.0 and 20.6.0.0.
Scenario 1, in our template both header and footer are defined. Both header and footer values are displayed only on the first page of the generated word document but are not displayed from the second page and so on.
Scenario 2, in our template when header and footer are defined; the first page of the generated document is empty.
File “Template.dotx” and file “Sample Html for issue.html” can be used to generate the word document. File “Word Document.docx” is the generated output word file. The same HTML and template can be used to produce both scenarios.
We are using the following code:
Document htmlDoc = new Document(htmlFilePath, new Aspose.Words.HtmlLoadOptions() { LoadFormat = LoadFormat.Html, Encoding =
Encoding.UTF8 });
Document templateDocument = new Document(templatePath);
templateDocument.AppendDocument(htmlDoc, ImportFormatMode.UseDestinationStyles);
SaveOutputParameters param = templateDocument.Save(docxFilePath);
Please look into this issue and let us know if any other help is required from our side.
Issue data.zip (42.4 KB)
Regards,
Asif Sharif