ImageEn, unit iexUserInteractions |
|
TIEPdfViewer.AttachmentCount
Declaration
property AttachmentCount: Integer;
Description
Returns the number of files embedded in the document.
| Demos\PDF\PDFViewer\PdfViewer.dpr |
// 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;
// Delete all attachments from document
While ImageEnView1.PdfViewer.AttachmentCount > 0 do
ImageEnView1.PdfViewer.DeleteAttachment( 0 );
See Also
◼Attachment
◼SaveAttachment