| Category | Diagnostics |
|---|
Purpose — Verify core internal invariants of the loaded library.
Description — Runs a set of static, instance-independent checks: the Standard-14 AFM width tables (e.g. Helvetica A=667, i=222; Courier W=600; Times W=944), encryption key-length enum ordinals (kl40bit=0, klAES256=4), and a device RGB→CMYK→RGB colour round-trip within tolerance. Because the checks are static it is safe to call with a nil handle. (It was previously an unconditional TRUE; it now returns a real pass/fail.)
Declarations
BOOL32 __stdcall pdfSelfTest(PPDF IPDF);
function pdfSelfTest(const IPDF: PPDF): LongBool; stdcall; external 'LumasPdf.dll';
Return value — TRUE if all invariants hold; FALSE if any check fails (indicates a corrupt or mismatched DLL). The IPDF argument is ignored.
Remarks — A useful smoke check at startup to confirm the correct LumasPdf.dll is loaded before doing real work.
See also — pdfGetLumasPDFVersion
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfSelfTest
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.