OptimizationOptions

OptimizationOptions class

Class which describes document optimization algorithm.
Instance of this class may be used as parameter of OptimizeResources() method.

The OptimizationOptions type exposes the following members:

Constructors

NameDescription
OptimizationOptions()Initializes a new instance of the OptimizationOptions class

Properties

NameDescription
link_duplcate_streamsIf this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then thes streams will be stored as one object.
This allows to decrease document size in some cases (for example, when same document was concatenedted multiple times).
allow_reuse_page_contentIf true page contents will be reused when document is optimized for equal pages.
remove_unused_streamsIf this flag set to true, every resource is checked on it’s usage. If resource is never used, then resources is removed.
This may decrease document size for example when pages were extracted from document.
remove_unused_objectsIf this flag is set to true, all document objects will be checked and unused objects (i.e. objects which does not have any reference) are removed from document.
image_compression_optionsSet of options which describe will images in the document be compressed and parameters of the compression.
compress_imagesIf this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.
resize_imagesIf this flag set to true and CompressImages is true images will be resized if image resoultion is greater then specified MaxResolution parameter.
image_qualitySpecifies level of image compression when CompressIamges flag is used.
max_resoultionSpecifies maximum resolution of images. If image has higher resolition it will be scaled
unembed_fontsMake fonts not embedded if set to true.
subset_fontsFonts will be converted into subsets if set to true.
remove_private_infoRemove private information (page piece info).
image_encodingImage encodre which will be used.

Methods

NameDescription
all()Creates optimization strategy will all options activated.
Please note that activated only options which does not change any functionality of the document.
I.e. image compressing and fonts unembedding will not enabled (and can be embedded manually).

See Also