GetObjectPathStream
Document properties, Content extraction
Description
Resolves an object path to a stream and returns its decoded bytes, applying the stream filter chain
Syntax
Delphi
Function GetObjectPathStream(Const Path: WideString; MaxLength: Integer): AnsiString;ActiveX
Function PDFlib::GetObjectPathStream(Path As String, MaxLength As Long) As VariantDLL
const char* DLGetObjectPathStream(int InstanceID, const wchar_t* Path, int MaxLength);
const char* DLGetObjectPathStreamA(int InstanceID, const char* Path, int MaxLength);Parameters
| Path | Object path selecting a stream, for example pages[0]/Contents[0] for the first content layer |
|---|---|
| MaxLength | Byte 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