Add an Attachment Annotation
Code Example:
PdfDocument doc = new PdfDocument();
PdfPage p = doc.Pages.Add();
PdfAnnotation anno = new PdfAttachmentAnnotation(“att.txt”,new RectangleF(10, 90, 50, 50));
p.Annotations.Add(anno);
doc.Save(@"AttachmentAnnotation.pdf");
Dim doc As PdfDocument = new PdfDocument()
Dim p As PdfPage = doc.Pages.Add()
Dim anno As PdfAttachmentAnnotation
= New PdfAttachmentAnnotation (New RectangleF(10, 90, 50, 50),”att.txt”);
p.Annotations.Add(anno)
doc.Save(@"AttachmentAnnotation.pdf")