Free Support Forum - aspose.com

Performance issue because of AppendDocument method

Hi

I am using Document's AppendDocument method to append 1200+ documents in to a single document.

It is taking more than 2 minutes approximately to append these many documents.

Please suggest a better approach to improve the performance.

Following is the code used to append the documents in to single document.

if (lintPageCnt > 0)

{

Document ldocSrcDoc = new Document(@"E:\Temp\TemplateOutPut_0.doc");

for (int i = 1; i < lintPageCnt; i++)

{

Document ldocSrcDoc1 = new Document(@"E:\TemplateOutPut_" + i + ".doc");

ldocSrcDoc.AppendDocument(ldocSrcDoc1, ImportFormatMode.KeepSourceFormatting);

}

ldocSrcDoc.Save(@"E:\TemplateOutPutFinal.doc");

}

Thanks

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Unfortunately, there is no other way to concatenate documents. Also, I do not advice you to concatenate so many documents at all. For instance if each document consist of one page, your final document will consist of 1200+ pages. Ms Word does not like such huge documents. Of course, MS Word will open it, but it will work too slowly.

Best regards.

Hi

Thanks for the quick resposnse.

We had tried this approach of appending so many documents as a work around to the issue logged with id: 221165 (<A href="https://forum.aspose.com/t/77308</A></FONT></FONT>)</P> <P>Please review the issue and suggest a better approach.</P> <P>Thanks</P>

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I answered in the original thread. Please let me know in case of any issues.

Best regards.