/// <summary>
        /// Export PDF document attachment
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            ListViewItem   item   = this.listView1.SelectedItems[0];
            SaveFileDialog dialog = new SaveFileDialog();
            DialogResult   result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string       fileName = dialog.FileName;
                FileStream   stream   = new FileStream(fileName, FileMode.Create);
                BinaryWriter writer   = new BinaryWriter(stream);
                if (this.m_isAttachmentAnnotation)
                {
                    PdfDocumentAttachmentAnnotation annotation = (PdfDocumentAttachmentAnnotation)item.Tag;
                    byte[] data = annotation.Data;
                    writer.Write(data);
                }
                else
                {
                    PdfDocumentAttachment annotation = (PdfDocumentAttachment)item.Tag;
                    byte[] data = annotation.Data;
                    writer.Write(data);
                }

                writer.Close();
                stream.Close();
                System.Diagnostics.Process.Start(fileName);
            }
        }
 //export attachment data to file
 private void listView1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (this.listView1.SelectedItem != null && this.listView1.SelectedItem is PdfDocumentAttachment)
     {
         PdfDocumentAttachment attachment = this.listView1.SelectedItem as PdfDocumentAttachment;
         SaveFileDialog        dialog     = new SaveFileDialog();
         dialog.Filter = "All files(*.*)|*.*";
         bool?isOk = dialog.ShowDialog();
         if (isOk.Value)
         {
             string fileName = dialog.FileName;
             attachment.SaveAS(fileName);
             string info = "Export attachment data to file: " + "\n" + fileName;
             MessageBox.Show(info, "Export", MessageBoxButton.OK, MessageBoxImage.Information);
             try
             {
                 System.Diagnostics.Process.Start(fileName);
             }
             catch
             {
             }
         }
         return;
     }
     if (this.listView1.SelectedItem != null && this.listView1.SelectedItem is PdfDocumentAttachmentAnnotation)
     {
         PdfDocumentAttachmentAnnotation annotation = this.listView1.SelectedItem as PdfDocumentAttachmentAnnotation;
         SaveFileDialog dialog = new SaveFileDialog();
         dialog.Filter = "All files(*.*)|*.*";
         bool?isOk = dialog.ShowDialog();
         if (isOk.Value)
         {
             string fileName = dialog.FileName;
             annotation.SaveAs(fileName);
             string info = "Export attachment data to file: " + "\n" + fileName;
             MessageBox.Show(info, "Export", MessageBoxButton.OK, MessageBoxImage.Information);
             try
             {
                 System.Diagnostics.Process.Start(fileName);
             }
             catch
             {
             }
         }
         //can go to specify PdfDocumentAttachmentAnnotation instance
         this.pdfDocumentViewer1.GotoAttachmentAnnotation(annotation);
     }
 }
 /// <summary>
 /// Read PDF document common attachments
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAttachment_Click(object sender, EventArgs e)
 {
     this.tableLayoutPanel1.SetRowSpan(this.pdfDocumentViewer1, 1);
     this.m_isAttachmentAnnotation = false;
     this.listView1.Visible        = true;
     this.listView1.Columns.Clear();
     this.listView1.Items.Clear();
     if (this.pdfDocumentViewer1.IsDocumentLoaded)
     {
         //Get common attachment in PDF document
         PdfDocumentAttachment[] attchments = this.pdfDocumentViewer1.GetAttachments();
         this.listView1.View = View.Details;
         this.listView1.Columns.Add("FileName", 80);
         this.listView1.Columns.Add("MimeType", 80);
         this.listView1.Columns.Add("Description", 120);
         this.listView1.Columns.Add("CreationTime", 100);
         this.listView1.Columns.Add("ModifyTime", 100);
         if (attchments != null && attchments.Length > 0)
         {
             //get common attachment property
             for (int i = 0; i < attchments.Length; i++)
             {
                 PdfDocumentAttachment attachment = attchments[i];
                 string       fileName            = attachment.FileName;
                 string       mimeType            = attachment.MimeType;
                 string       desc       = attachment.Description;
                 DateTime     createDate = attachment.CreationTime;
                 DateTime     modifyDate = attachment.ModifyTime;
                 Object       data       = attachment.Data;
                 ListViewItem item       = new ListViewItem();
                 item.Text = Path.GetFileName(fileName);
                 item.SubItems.Add(mimeType);
                 item.SubItems.Add(desc);
                 item.SubItems.Add(createDate.ToShortDateString());
                 item.SubItems.Add(modifyDate.ToShortDateString());
                 item.Tag = attachment;
                 this.listView1.Items.Add(item);
             }
         }
     }
 }