THPDFJBIG2SymbolSafetyPolicy Type
Controls whether THotPDF.ShareLoadedJBIG2Globals deduplicates JBIG2 globals streams and how strict the checking is
Declaration
THPDFJBIG2SymbolSafetyPolicy= (jbspDisabled, jbspExactGlobalsOnly);
Unit
HPDFDoc
Values
| Value | Meaning |
|---|---|
jbspDisabled | No sharing: the routine leaves without scanning any image |
jbspExactGlobalsOnly | Deduplicate only byte-identical /JBIG2Globals streams (same SHA-256 hash and payload); globals differing in any byte are never merged |
Usage notes
- Pass a value of this type to THotPDF.ShareLoadedJBIG2Globals, which repoints the /JBIG2Globals references of duplicate JBIG2 images at one retained globals stream and marks the redundant ones as deleted
- The exact-globals-only policy is the safe default: merging symbol dictionaries that differ can corrupt decoded images, so only streams that are provably identical are shared
- The count of shared streams is reported in THPDFLoadedResourceOptimizationInfo, and the rendered page cache is invalidated once anything has changed