Hi,
We are using Aspose words API through html input and word templates “.dotx” to produce word documents. Please use following code to produce the scenario:
string filePath = @"[DirectoryName]:\Myhtmlfile.html";
string dotxFilePath = @"[DirectoryName]:\MyWordTemplate.dotx";
string docxFilePath = @"[DirectoryName]:\MyOutputWord.docx";
Document htmlDoc = new Document(filePath, new Aspose.Words.HtmlLoadOptions() {LoadFormat =LoadFormat.Html, Encoding = Encoding.UTF8});
Document templateDoc = new Document(dotxFilePath );
templateDoc .AppendDocument(htmlDoc, ImportFormatMode.UseDestinationStyles);
SaveOutputParameters param = templateDoc.Save(docxFilePath );
/---------------------------------------------------------------------------------------------------------------------------------------------/
“Document htmlDoc = new Document(filePath, new Aspose.Words.HtmlLoadOptions() {LoadFormat =LoadFormat.Html, Encoding = Encoding.UTF8});”
The above line takes 58 mintutes to load html input and the below line of code of saving document throws out of memory exception.
SaveOutputParameters param = templateDoc.Save(docxFilePath );
Use html “AgileHdImages5000.zip” and template “Blank.dotx” to produce the scenario
AgileHdImages5000.zip (193.6 KB)
Blank.zip (8.7 KB)
Kindly look in to the issue and let us know the findings.
Regards,
Asif.