API referenceCore SDK

pdfSelfTest

Verify core internal invariants of the loaded library.

CategoryDiagnostics

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

C
BOOL32 __stdcall pdfSelfTest(PPDF IPDF);
Delphi
function pdfSelfTest(const IPDF: PPDF): LongBool; stdcall; external 'LumasPdf.dll';

Return valueTRUE 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 alsopdfGetLumasPDFVersion

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Core

Exported names

pdfSelfTest

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.