pdfGetObjectDecodeError
Report whether a specific object of the open import source decodes
| Category | Diagnostics (imported documents) |
|---|
Purpose — Report whether a specific object of the open import source decodes cleanly.
Description — Attempts to fetch object ObjectNumber as a string from the currently open import document. Returns 0 when the object decodes successfully and 1 when it does not — a coarse per-object health probe useful when diagnosing a partially-corrupt input PDF.
Declarations
int32_t __stdcall pdfGetObjectDecodeError(PPDF IPDF, int32_t ObjectNumber);
function pdfGetObjectDecodeError(const IPDF: PPDF; ObjectNumber: Integer): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle with an open import source. |
ObjectNumber | int32_t | PDF object number to probe. |
Return value — 0 = decodes OK; 1 = decode failed; -1 if the handle is invalid.
Remarks — This is a boolean-shaped probe, not a rich error code; the value distinguishes "readable" from "not readable" for one object. Requires an import document opened via the V17 import APIs.
See also — pdfGetErrLogMessage
C# (P/Invoke)
public static extern int pdfGetObjectDecodeError(IntPtr IPDF, int ObjectNumber);
Getters
pdfGetObjectDecodeError
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.