ImageEn, unit iexUserInteractions

TIEPdfViewer.SaveAttachment

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:
To add an attachment to a PDF file, use AddAttachment
In Delphi versions before 2007, some attachment functionality is not supported

Demo

Demo  Demos\PDF\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
AddAttachment