THotPDF.CMapResourcePath Property
Sets the root directory used to locate standard CMap collections during loaded-document text extraction. Leave it empty to use the automatic resources lookup
Declaration
property CMapResourcePath: TFileName read FCMapResourcePath write SetCMapResourcePath;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
| This member does not expose explicit parameters | |
Return value
Returns the configured CMap collection root
Usage notes
- Complete UniJIS, UniGB, UniCNS, and UniKS UCS2 and UTF16 horizontal and vertical mappings are built in, including supplementary Unicode scalars, so these standard Unicode CMaps do not require an external resource directory
- The configured directory must contain collection folders such as
Adobe-GB1-6\CMap - Set the property before loaded text extraction when resources are stored outside the executable-relative lookup locations
- Every assignment clears the loaded-font decoder cache, including reassignment of the same path
- Call
HPDFClearCMapCachesbefore reassigning this property when external CMap files have changed and the process-wide parsed resource cache must also be refreshed - Parsed standard maps and CID tables are cached by their resolved root and map name, so two resource roots can safely provide different maps with the same name
- The process-wide standard CMap resource cache is safe for concurrent access, while sorted character and range mappings use logarithmic lookup
- One-byte through four-byte codespaces are retained exactly, including valid three-byte codespaces
- All 182 additional bundled encoding maps are built in, including legacy GBK, EUC, Big5 and Shift-JIS variants, inherited vertical overrides, UTF8 and UTF32 codespaces
- Type0 text operands use exact one-byte through four-byte encoding codespaces, preserving mixed widths and leading zero bytes in UTF32
- An explicit resource directory can still override a standard map; an empty loader path selects built-in tables without reading ambient collection files
- Malformed hexadecimal data, invalid surrogate sequences, inverted ranges, oversized explicit ranges, and overflowing targets are handled without unbounded allocation or wrapped mappings