SetOptimizeContentStreams

Document properties, Optimisation

Description

Enables or disables the peephole content stream optimiser that runs during CompressContent and CompressPage calls

Syntax

Delphi

Function TPDFlib.SetOptimizeContentStreams(Enable: Integer): Integer;

Parameters

EnablePass 1 to enable optimisation (default), or 0 to disable it.

Return values

0Failed to apply setting.
1Setting applied successfully.

Remarks

The content stream optimiser performs redundant operator simplification and spacing reduction. It is enabled by default to ensure minimum file size upon stream compression

Example

PDF.SetOptimizeContentStreams(1);
PDF.CompressContent; // compress and optimize streams

See also

GetOptimizeContentStreams, CompressContent