I’m trying to build a document with Aspose.Words which contains more than 100 pages. But the building of this page isn’t very fast. It takes quite a while to build, and somethings it also makes the session to drop.
I’m building with the starttable, insertcell, endrow, etc etc commands. Is there a more efficient way to produce documents with a lot of pages ??
Generally, we don’t recommend building documents dynamically, especially such a big documents. It is much more efficient to generate documents based on premade templates. But we will research the issue of course.
Please attach a sample project. I will check if the code could be optimized or if we can make some optimizations in the library.
With mail merge the template grows automatically duplicating template content for each record of merge data source. See our demo projects, for example ‘DinnerInvitation’ document generation. The process of doing MailMerge with Aspose.Words is described in details in our wiki documentation:
The dynamic creation of mail merged rows is supported via MailMerge.ExecuteWithRegions method. See related articles in our help. It is also demonstrated in demos (ProductCatalogDemo, SalesInvoiceDemo, EmployeesReportDemo).