GetObjectPathStreamA

Document properties, Content extraction

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to GetObjectPathStream and string arguments are interpreted using the current SetAnsiMode code page

Resolves an object path to a stream and returns its decoded bytes, applying the stream filter chain

Syntax

Delphi

Function DLGetObjectPathStreamA(InstanceID: Integer; Path: PAnsiChar; MaxLength: Integer): PAnsiChar;

DLL

const char* DLGetObjectPathStreamA(int InstanceID, const char* Path, int MaxLength);

Parameters

PathObject path selecting a stream, for example pages[0]/Contents[0] for the first content layer
MaxLengthByte cap for the returned data; MaxLength 0 or a non-stream leaf returns an empty string

Return values

Decoded stream bytes, truncated to MaxLength when longer

Remarks

Page content saved as multiple layers is an array, so index the layer explicitly; font programs, metadata and other stream objects resolve the same way

ASCII hexadecimal decoding stops at the first > end-of-data marker and pads an odd final digit with zero; bytes after the marker neither count towards the decoded output nor reach the next filter

ASCII85 decoding yields no decoded bytes for an invalid digit, a misplaced z, a one-digit final group, an overflowing group or a missing ~> terminator; valid whitespace is ignored

See also

GetObjectByPath, GetObjectPathStreamLength, GetObjectPathNumber