How do I limit memory consumption while rasterizing PDF pages?

Q: When rasterizing pages of a pdf document, we find that the library
consumes memory for about 2X the size of the PDF. Do you have any
suggestions for how to limit memory consumption while rasterizing
A: The memory requirement required to render a PDF page using PDFNet
SDK are not necessarily related to the file size of input PDF
document. For example, a 1k PDF page rendered at 600 DPI will
typically take much more memory than 100MB PDF at 72DPI.

In case you are using pdfdraw.GetBitmap() in .NET you may want to use
pdfdraw.Export() instead. This should cut down on memory requirements
somewhat. Also calling pdfdraw.Dispose(), pdfdoc.Close() etc should
help to keep memory under control. In case PDFNet is still using too
much memory you could lower the DPI or rasterize the page in tiles
instead of a single pass. Most of the required memory is usually
related to the storage of the primary frame buffer.