We are mail merging letters and then saving in PDF format. Normally this works fine, but the following line results in a System.OutOfMemoryException error when the document has around 2,000 letters or more (3 pages per letter = around 6,000 pages):
The server in question has 40GB of RAM.
The stack trace is as follows:
at . ( , , Boolean , Boolean , , Node , ) at . (Node , Int32 , Boolean , ) at . (Node ) at . (Node ) at . () at . () at . () at Aspose.Words.Document.UpdatePageLayout() at . ( , ) at . ( ) at . ( ) at Aspose.Words.Document. ( ) at Aspose.Words.Document. (Stream , String , SaveOptions ) at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
Most of the stack trace seems to be unprintable characters.
We are working around this issue by re-generating the letters in batches of 1,000.
This is Aspose.Words for .NET v21.4.