We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

appendDocument Limit


Is there a limit on how many documents can be appended into 1. When testing we find that doing a merge of say 1700 records the part where appendDocument is called causes the process to go slow. I know it depends on the the document and data involved, but I was wondering if there is a way to speed this up? or a better approach.

I build a document list for each merge, then merge them all into 1.

List mergedList = new ArrayList();

Loop thru data and call merge function to return a merged doc for each record

while not end of query {



That all runs quite fast, but the append is slow.

for (int x = 0; x < mergedList.size(); x++) {
if (null != mergedDoc) {
mergedDoc.appendDocument(mergedList.get(x), ImportFormatMode.USE_DESTINATION_STYLES);
} else {
mergedDoc = (Document) mergedList.get(x).deepClone(true);

Any help appreciated as we are still testing you're product.




Thanks for your request. There is no size limit of document you can generate using Aspose.Words. The only limit is the amount of RAM available on your side. Usually Aspose.Words needs few times more memory than document size to build model of the document in memory. For example if your document’s size is 1 MB, Aspose.Words needs 10-20 MB of RAM to build its DOM in memory. Multiplier depends on format also because some formats are more compact than others. For example DOCX format is more compact than DOC and RTF, and DOC is more compact than RTF.

Also, I would like to say that producing huge MS Word documents is not very good practice. MS Word does not like huge documents. Usually it takes a lot of time to open such documents in MS Word and sometimes MS Word just hangs. Normal size of MS Word documents is 100 – 200 pages.

So I would suggest you produce few small documents instead of one huge document.

Best regards.