GetEmbeddedFileContentToFile
Document properties
Description
Extracts the specified embedded file and writes the content to the specified file.
Syntax
Delphi
Function TPDFlib.GetEmbeddedFileContentToFile(Index: Integer; Const FileName: WideString): Integer;
ActiveX
Function PDFlib::GetEmbeddedFileContentToFile(Index As Long, FileName As String) As Long
DLL
int DLGetEmbeddedFileContentToFile(int InstanceID, int Index, const wchar_t * FileName);
Parameters
| Index | The index of the embedded file, from 1 through EmbeddedFileCount |
|---|---|
| FileName | The path and file name of the destination file |
Return values
| 0 | The index is invalid, the destination cannot be created, or decoding failed |
|---|---|
| 1 | The content was written successfully, including a valid empty embedded file |
Remarks
The extraction path writes decoded Flate content directly to the destination file through bounded chunks, avoiding a second full decoded copy for large attachments