API referenceCore SDK

pdfGetObjectDecodeError

Report whether a specific object of the open import source decodes

CategoryDiagnostics (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

C
int32_t __stdcall pdfGetObjectDecodeError(PPDF IPDF, int32_t ObjectNumber);
Delphi
function pdfGetObjectDecodeError(const IPDF: PPDF; ObjectNumber: Integer): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle with an open import source.
ObjectNumberint32_tPDF object number to probe.

Return value0 = 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 alsopdfGetErrLogMessage

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetObjectDecodeError(IntPtr IPDF, int ObjectNumber);
Area
Core SDK
Category

Getters

Exported names

pdfGetObjectDecodeError

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.