THPDFHeadlessCompareOptions
Declared in HPDFHeadlessCompare; initialise with Default before adjusting limits or tolerances
| Field | Default | Purpose |
|---|---|---|
| MaxObjects / MaxEdges / MaxDepth | 250000 / 1000000 / 64 | Object, traversal work and recursion bounds |
| MaxDifferences | 10000 | Maximum report changes |
| MaxStreamBytes / MaxTotalStreamBytes | 33554432 / 268435456 | Per-stream and aggregate decoded structural stream bytes |
| MaxWorkingBytes / MaxResultBytes | 268435456 / 16777216 | Temporary preparation and report storage bounds |
| MaxPixelsPerPage / MaxTotalPixels | 16000000 / 128000000 | Comparison canvas and aggregate rendered input pixels |
| DPI / ColorTolerance | 96 / 0 | Render resolution and maximum unchanged channel delta |
| Luminance | False | Compare weighted luminance instead of RGB channels |
| MinimumSimilarity / MaxChangedPixelRatio | 1 / 0 | Minimum similarity and maximum changed pixel fraction |
| CancellationToken | nil | Optional caller-owned cancellation source, combined with document tokens |
Limits must be positive, MaxWorkingBytes must be at least 4096, DPI must lie between 1 and 2400, colour tolerance must lie between 0 and 255, and both floating-point thresholds must be finite values between 0 and 1
Existing document limits can further restrict traversal and decoding; working memory also caps object indices, sorted dictionaries, bounded text glyphs, page surfaces and prepared PNGs
Rendered input pixels count both documents; page geometry must match even when numerical similarity thresholds are relaxed