// Add names of all attached files to a TListView lvwAttachments.Items.BeginUpdate; lvwAttachments.Clear; try cnt := ImageEnView1.PdfViewer.AttachmentCount; for i := 0 to cnt - 1 do begin att := ImageEnView1.PdfViewer.Attachment[i]; listItem := lvwAttachments.Items.Add(); listItem.Caption := Format('%s (%d Bytes)', [ att.Name, att.SizeBytes ]); end; finally lvwAttachments.Items.EndUpdate; end;
// 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 );