We're running across some issues with appending a large number of documents together. We are getting an Out of Memory error from windows -- which varies depending on the machine. What we are noticing is that there is no disk caching happening before the error is thrown. This might be the normal behavior of TMemoryStream -- not sure, haven't looked into it that far yet.
We're looking for any advice you have for managing large documents -- over 500 pages. What sorts of issues do you run into at that size of document?
We did find [](http://www.wpcubed.com/forum/viewtopic.php?t=648). We're getting the same Out of Memory error message as in [](http://www.wpcubed.com/forum/viewtopic.php?t=2800).
Our solution is using a TWPPreview component which is updated by a TWPCustomRichText (we used this approach because of the component hierarchy). After every "append as section" call on the customRTF object, the TWPPreview panel is updated with an
preview.AsString := customRTF.AsString;
We have run some tests where the merge program runs out of memory at 118,000K and sometimes at 159,000K (on a 2GB memory machine). Our customers have the potential of printing 1000+ page documents. Do you have any other components that would make this job easier? Manage memory better?
I see the problem as one where the model of concatenating all of the merged documents together does not scale well -- given memory limitations. I know some other reporting tools only merge one "record" at a time and just let the document spool to the printer and let the spooler do the work. Any insight here?