Hi ,
I am using trial version of Spire.PdfViewer.
Below code is using for getting Attachments of PdfDocument. i am able to get attachment data but unable to get Attachment File Name. It is giving File Name always Blank.
if (pdfViewer.IsDocumentLoaded)
{
ListView lstView = new ListView();
lstView.View = View.Details;
lstView.Columns.Add("FileName", 200);
lstView.Columns.Add("Size", 120);
PdfDocumentAttachment[] attchments = pdfViewer.GetAttachments();
if (attchments != null && attchments.Length > 0)
{
for (int i = 0; i < attchments.Length; i++)
{
PdfDocumentAttachment attachment = attchments[i];
string fileName = attachment.FileName;
byte[] data = attachment.Data;
ListViewItem item = new ListViewItem();
item.Text = Path.GetFileName(fileName);
string size = (attachment.Data.Length / 1024).ToString() + "Kb";
item.SubItems.Add(size);
item.Tag = attachment;
lstView.Items.Add(item);
}
}
How to get the File Name of Attachments of pdfDocument using Spire.PdfViewer ?
Please Help.