SetStreamDecodeLimits
Document loading, security, performance
Description
Sets the maximum stream filter-chain length and cumulative decoded bytes for one tracked operation
Syntax
Delphi
Function TPDFlib.SetStreamDecodeLimits(MaxFilters: Integer; MaxOperationBytes: Int64): Integer;Parameters
| MaxFilters | The maximum filters in one stream chain, or 0 for no filter-count limit |
|---|---|
| MaxOperationBytes | The maximum decoded bytes accumulated across streams in one tracked operation, or 0 for no cumulative limit |
Return values
| 1 | The limits were accepted |
|---|---|
| 0 | Either limit was negative |
Remarks
The filter count is checked before decoder allocation and the byte budget prevents many individually small streams from bypassing a single-stream limit
Tracked load, save, extraction, search and optimisation operations start with a fresh cumulative byte counter