PdfReader.CompressedImageThreshold Property

Gets or sets the size in bytes above which the compressed data of an image is kept in a temporary file instead of in memory.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public long CompressedImageThreshold { get; set; }

Property Value

An Int64 value. The default value is 0, which keeps all image data in memory.

Remarks

This property applies to the content that GetContent() returns. It does not apply to the content that was requested before the value was set.

The threshold is compared with the size of the image data inside the PDF file, not with the size of its pixels. A temporary file is deleted when the content that uses it is disposed.

The content does not depend on the reader. You can release the reader and the file or stream it read as soon as the content is returned. The reader itself keeps the PDF streams in memory until it is closed.

Exceptions

Exception Condition
System.ArgumentOutOfRangeException The value is negative.

See Also

Reference