| Category | CID/CJK fonts |
|---|
Purpose — Read metadata for the Index-th currently-active CMap (loaded via pdfLoadCMap and actually in use by a CID font).
Description — For Identity-H/Identity-V, synthesizes fixed metadata (Registry="Adobe", Ordering="Identity", WritingMode from H/V). For a real predefined CMap, prefers metadata parsed from the CID font that actually uses it. Respects the caller-supplied CMap.StructSize on input — copies only that many bytes out, so a caller using an older/shorter version of the TPDFCMap struct is safe from a buffer overrun (values < 8 or larger than the full struct size are clamped to the full struct size).
Declarations
BOOL32 __stdcall pdfGetCMap(PPDF IPDF, uint32_t Index, TPDFCMap* CMap);
function pdfGetCMap(const IPDF: PPDF; Index: Cardinal; var CMap: TPDFCMap): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Index | Cardinal | Zero-based index into the active-CMap list (not necessarily the same numbering as the handle returned by pdfLoadCMap — this enumerates *active* CMaps, i.e. ones actually referenced by a CID font). |
CMap | TPDFCMap* | Receives the metadata; on input, CMap.StructSize bounds how many bytes are written back. |
Return value — TRUE if Index is in range; FALSE otherwise.
See also — pdfGetCMapCount
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetCMap
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.