API reference › PDF/A & Conformance
pdfGetConformanceViolation
Read back the real violation list pdfCheckConformance's
int32_t __stdcall pdfGetConformanceViolationCount(PPDF IPDF);
BOOL32 __stdcall pdfGetConformanceViolationA(PPDF IPDF, int32_t Index, int32_t* Code, const char* Buf, int32_t BufLen);
function pdfGetConformanceViolationCount(const IPDF: PPDF): Integer; stdcall;
function pdfGetConformanceViolationA(const IPDF: PPDF; Index: Integer; out Code: Integer; Buf: PAnsiChar; BufLen: Integer): LongBool; stdcall;
Purpose. Read back the real violation list pdfCheckConformance's import-side validator populated — one (Code, human-readable message) pair per violation found.
Description. Both are plain, real accessors over the same FConfVCodes/FConfVMsgs parallel arrays populated by CheckImportConformance — there is no separate "run the check" step here; these simply read whatever the most recent pdfCheckConformance call recorded. pdfGetConformanceViolationA's Buf output is bounded by BufLen (truncated and always null-terminated, standard fixed-buffer-safe string-copy convention used elsewhere in this SDK).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Index | 0-based index into the violation list from the most recent pdfCheckConformance call. |
Code | Output: the violation's numeric code (e.g. 1 = forbidden encryption, 2 = missing XMP metadata — see pdfCheckConformance for the confirmed code list). |
Buf, BufLen | Output: the human-readable violation message, truncated to fit and always null-terminated. |
Return value. pdfGetConformanceViolationCount: the number of violations recorded by the most recent check. pdfGetConformanceViolationA: True if Index is in range.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetConformanceViolationA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.