ImageEn, unit iexUserInteractions |
|
TIEPdfViewerInteraction.AttachmentCount
Declaration
property AttachmentCount: Integer;
Description
Returns the number of files embedded in the document.
Demo
| Demos\Other\PdfViewer\PdfViewer.dpr |
Examples
// 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