API referenceCore SDK

pdfDAGetObjectToString

"Direct Access" (DA) variants of pdfGetObjectCount/

C
int32_t __stdcall pdfDAGetObjectCount(PPDF IPDF, int32_t FileHandle);
const char* __stdcall pdfDAGetObjectToString(PPDF IPDF, int32_t FileHandle, int32_t ObjectNumber);
Delphi
function pdfDAGetObjectCount(const IPDF: PPDF; FileHandle: Integer): Integer; stdcall;
function pdfDAGetObjectToString(const IPDF: PPDF; FileHandle, ObjectNumber: Integer): PAnsiChar; stdcall;

Purpose. "Direct Access" (DA) variants of pdfGetObjectCount/ pdfGetObjectToString, intended in the classic API to operate on an arbitrary externally-opened file handle rather than the current document.

Description. FileHandle is accepted by both but never consulted — both simply delegate to the exact same DocObjectCount/GetObjectAsString calls as their non-DA siblings above, always operating on the current document regardless of what FileHandle identifies. There is no actual multi-file Direct-Access mechanism in this engine — this cluster exists purely for classic flat C ABI compatibility, same rationale as the pdfDocumentCount/ pdfSelectDocument trio above.

Parameters.

ParameterDescription
IPDFDocument handle.
FileHandleAccepted but never consulted — always operates on the current document.
ObjectNumber*(ToString only)* Target object number.

Return value. Identical semantics to pdfGetObjectCount/ pdfGetObjectToString above, always against the current document.

See also. pdfGetObjectCount.

C# (P/Invoke)

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

Core

Exported names

pdfDAGetObjectToString

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.