SetOptimizationWorkers

Optimisation, performance

Description

Configures the maximum number of workers used by parallel image optimisation and Flate stream recompression

Syntax

Delphi

Function TPDFlib.SetOptimizationWorkers(MaxWorkers: Integer): Integer;

Parameters

MaxWorkers0 selects the available processor count automatically, 1 forces serial execution, and 2 through 64 set an explicit upper bound

Return values

1The setting was accepted
0The value was outside the supported range and the previous setting was preserved

Remarks

The default is 0

The effective worker count never exceeds the number of independent jobs in the current batch

Worker tasks transform private byte buffers and dictionaries; successful results are applied to the selected document in object order

See also

GetOptimizationWorkers, OptimizeImages, RecompressStreams, Abort