API referenceFonts

pdfSetCMapDir

Nominally: configure a directory to search for external CMap

CategoryCID/CJK fonts (non-functional)
AvailabilityNon-functional (write-only) — same pattern as pdfSetTextShader/pdfSetExt*ColorSpace/pdfSetFontWeight

Purpose — Nominally: configure a directory to search for external CMap resource files.

Description — not operational in this release. Stores Path into FCMapDir and always succeeds. That field is never read anywhere else in the codebase — this engine's predefined-CMap support is entirely built-in (HasPredefinedCMap/LoadPredefinedCMap), not loaded from external files on disk, so there is nothing for a CMap search directory to feed into.

Declarations

C
int32_t __stdcall pdfSetCMapDirA(PPDF IPDF, const char* Path, uint32_t Recursive);
int32_t __stdcall pdfSetCMapDirW(PPDF IPDF, const wchar_t* Path, uint32_t Recursive);
Delphi
function pdfSetCMapDirA(const IPDF: PPDF; const Path: PAnsiChar; Recursive: Cardinal): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetCMapDirW(const IPDF: PPDF; const Path: PWideChar; Recursive: Cardinal): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
PathstringAccepted and stored; has no effect.
RecursiveCardinalAlso accepted but not read — a second, independent dropped parameter on top of the whole call being inert.

Return value — Always 1 on a valid handle.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfSetCMapDirA(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string Path, uint Recursive);
public static extern int pdfSetCMapDirW(IntPtr IPDF, [MarshalAs(UnmanagedType.LPWStr)] string Path, uint Recursive);
Area
Fonts
Category

Setters

Exported names

pdfSetCMapDirA pdfSetCMapDirW

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.