GetEmbeddedFileContentToStream
Document properties
Description
Extracts the specified embedded file and writes the content to the specified stream.
Syntax
Delphi
Function TPDFlib.GetEmbeddedFileContentToStream(Index: Integer; OutStream: TStream): Integer;
Parameters
| Index | The index of the embedded file, from 1 through EmbeddedFileCount |
|---|---|
| OutStream | The target stream that receives the decoded content |
Return values
| 0 | The index is invalid, the target is unavailable, or decoding failed |
|---|---|
| 1 | The content was written successfully, including a valid empty embedded file |
Remarks
Embedded files stored through a single Flate filter without a predictor are decoded directly to OutStream through bounded chunks, avoiding a second full decoded copy for large attachments
More complex filter chains retain their established decoding behaviour and are then copied to the target stream