Skip to content

PdfPageGraphics.Compress Method

Compress()

Compresses the page graphic content.

C#
public void Compress()

Remarks

Call this method to compress the graphic content and reduce memory usage. This method compresses the current graphic content but it leaves the graphics open so new content can be still added. If you are creating pages with heavy vector graphics, such as maps, you can call this method multiple times, after fragments of the page have been drawn in order to reduce the in-memory size of the graphic content. What the page content has been fully created call the PdfGraphics.CompressAndClose method to compress the last fragment and close the page content.