Beispiel #1
0
        /// <summary>
        /// Removes an annotation from the document.
        /// </summary>
        public void Remove(PDFAnnotation annotation)
        {
            if (annotation.Owner != Owner)
            {
                throw new InvalidOperationException("The annotation does not belong to this document.");
            }

            Owner.Internals.RemoveObject(annotation);
            Elements.Remove(annotation.Reference);
        }
Beispiel #2
0
 /// <summary>
 /// Adds the specified annotation.
 /// </summary>
 /// <param name="annotation">The annotation.</param>
 public void Add(PDFAnnotation annotation)
 {
     annotation.Document = Owner;
     Owner.IrefTable.Add(annotation);
     Elements.Add(annotation.Reference);
 }