ImageEn, unit iexUserInteractions |
|
TIEPdfViewer.SaveAttachment
Declaration
function SaveAttachment(Index: Integer; const DestFilename: string): Boolean; overload;
function SaveAttachment(Index: Integer; const DestStream: TStream): Boolean; overload;
Description
Save a file embedded in the document to a file or stream.
Result is false if a save error is encountered.
Note: Delphi 2007 or newer is required for PDF attachment support
| Demos\PDF\PDFViewer\PdfViewer.dpr |
// Prompt the user to save the first attachment to file
idx := 0;
att := ImageEnView1.PdfViewer.Attachment[idx];
SaveDialog1.FileName := att.Name;
if SaveDialog1.Execute() then
ImageEnView1.PdfViewer.SaveAttachment( idx, SaveDialog1.FileName );
See Also
◼Attachment◼AttachmentCount