ImageEn, unit iexUserInteractions

TIEPdfViewerInteraction.SaveAttachment

TIEPdfViewerInteraction.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.


Demo

Demo  Demos\Other\PdfViewer\PdfViewer.dpr


Example

// 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