iTextSharp.text.pdf.PdfWriter.AddAnnotation C# (CSharp) Méthode

AddAnnotation() public méthode

public AddAnnotation ( PdfAnnotation annot ) : void
annot PdfAnnotation
Résultat void
        public virtual void AddAnnotation(PdfAnnotation annot)
        {
            pdf.AddAnnotation(annot);
        }

Same methods

PdfWriter::AddAnnotation ( PdfAnnotation annot, int page ) : void

Usage Example

 /**
  * @see com.itextpdf.text.pdf.PdfPageEventHelper#onGenericTag(
  *      com.itextpdf.text.pdf.PdfWriter,
  *      com.itextpdf.text.Document,
  *      com.itextpdf.text.Rectangle, java.lang.String)
  */
 public override void OnGenericTag(PdfWriter writer,
   Document document, Rectangle rect, string text)
 {
     PdfAnnotation annotation = new PdfAnnotation(writer,
       new Rectangle(
         rect.Right + 10, rect.Bottom,
         rect.Right + 30, rect.Top
       )
     );
     annotation.Title = "Text annotation";
     annotation.Put(PdfName.SUBTYPE, PdfName.TEXT);
     annotation.Put(PdfName.OPEN, PdfBoolean.PDFFALSE);
     annotation.Put(PdfName.CONTENTS,
       new PdfString(string.Format("Icon: {0}", text))
     );
     annotation.Put(PdfName.NAME, new PdfName(text));
     writer.AddAnnotation(annotation);
 }
All Usage Examples Of iTextSharp.text.pdf.PdfWriter::AddAnnotation