int32_t __stdcall pdfDAGetObjectCount(PPDF IPDF, int32_t FileHandle);
const char* __stdcall pdfDAGetObjectToString(PPDF IPDF, int32_t FileHandle, int32_t ObjectNumber);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
FileHandle | Accepted 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)
public static extern int pdfDAGetObjectCount(IntPtr IPDF, int FileHandle);
Core
pdfDAGetObjectCount
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.