PdfAnnotationCollection Class
Represents a collection of PdfAnnotations.
public sealed class PdfAnnotationCollection : PdfOptionalCollection<PdfAnnotation>, IList, ICollection, IList<PdfAnnotation>, ICollection<PdfAnnotation>, IEnumerable<PdfAnnotation>, IEnumerable
Public NotInheritable Class PdfAnnotationCollection
Inherits PdfOptionalCollection(Of PdfAnnotation)
Implements IList, ICollection, IList(Of PdfAnnotation), ICollection(Of PdfAnnotation), IEnumerable(Of PdfAnnotation), IEnumerable
- Inheritance:
- System.ObjectPdfAnnotationCollection
Implements
Methods
AddCaret(Double, Double, Double, Double)
Adds a PdfCaretAnnotation to the PdfAnnotationCollection.
public PdfCaretAnnotation AddCaret(double left, double bottom, double width, double height)
Public Function AddCaret(left As Double, bottom As Double, width As Double, height As Double) As PdfCaretAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfCaretAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfCaretAnnotation bounds specified in default user space units.
width
- System.Double
The width of the PdfCaretAnnotation bounds specified in default user space units.
height
- System.Double
The height of the PdfCaretAnnotation bounds specified in default user space units.
Returns
A new PdfCaretAnnotation added to the PdfAnnotationCollection.
AddCircle(String, Double, Double, Double, Double)
Adds an oval PdfSquareCircleAnnotation to the PdfAnnotationCollection.
public PdfSquareCircleAnnotation AddCircle(string author, double left, double bottom, double right, double top)
Public Function AddCircle(author As String, left As Double, bottom As Double, right As Double, top As Double) As PdfSquareCircleAnnotation
Parameters
author
- System.String
Identification of the user who added the oval PdfSquareCircleAnnotation.
left
- System.Double
The lower-left horizontal coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
right
- System.Double
The upper-right horizontal coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
top
- System.Double
The upper-right vertical coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
Returns
A new oval PdfSquareCircleAnnotation added to the PdfAnnotationCollection.
AddCrossOut(PdfQuad)
Adds a strikeout PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddCrossOut(PdfQuad bounds)
Public Function AddCrossOut(bounds As PdfQuad) As PdfTextMarkupAnnotation
Parameters
bounds
- PdfQuad
The bounds of the strikeout PdfTextMarkupAnnotation specified in default user space units.
Returns
A new strikeout PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
AddCrossOut(Double, Double, Double, Double)
Adds a strikeout PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddCrossOut(double left, double bottom, double width, double height)
Public Function AddCrossOut(left As Double, bottom As Double, width As Double, height As Double) As PdfTextMarkupAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the strikeout PdfTextMarkupAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the strikeout PdfTextMarkupAnnotation bounds specified in default user space units.
width
- System.Double
The width of the strikeout PdfTextMarkupAnnotation bounds specified in default user space units.
height
- System.Double
The height of the strikeout PdfTextMarkupAnnotation bounds specified in default user space units.
Returns
A new strikeout PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
AddEmptyFileAttachment(Double, Double, String)
Adds a PdfFileAttachmentAnnotation to the PdfAnnotationCollection with the associated file created from the specified fileSpecificationName
with an empty EmbeddedFile.
The Paperclip whose size is 7 pt x 17 pt is used for an appearance of a newly added PdfFileAttachmentAnnotation.
public PdfFileAttachmentAnnotation AddEmptyFileAttachment(double left, double bottom, string fileSpecificationName)
Public Function AddEmptyFileAttachment(left As Double, bottom As Double, fileSpecificationName As String) As PdfFileAttachmentAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfFileAttachmentAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfFileAttachmentAnnotation bounds specified in default user space units.
fileSpecificationName
- System.String
The name of the file with an empty EmbeddedFile associated with a newly added PdfFileAttachmentAnnotation.
Returns
A new PdfFileAttachmentAnnotation added to the PdfAnnotationCollection.
Exceptions
- System.ArgumentNullException
fileSpecificationName
is null or System.String.Empty.
AddFileAttachment(Double, Double, String)
Adds a PdfFileAttachmentAnnotation to the PdfAnnotationCollection with the associated file copied from the resource specified by the filePath
.
The Paperclip whose size is 7 pt x 17 pt is used for an appearance of a newly added PdfFileAttachmentAnnotation.
public PdfFileAttachmentAnnotation AddFileAttachment(double left, double bottom, string filePath)
Public Function AddFileAttachment(left As Double, bottom As Double, filePath As String) As PdfFileAttachmentAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfFileAttachmentAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfFileAttachmentAnnotation bounds specified in default user space units.
filePath
- System.String
The location of the resource copied to the file associated with a newly added PdfFileAttachmentAnnotation. This value is also used to resolve the Name of the associated file.
Returns
A new PdfFileAttachmentAnnotation added to the PdfAnnotationCollection.
Exceptions
- System.ArgumentNullException
filePath
is null or System.String.Empty.
AddHighlight(PdfQuad)
Adds a highlight PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddHighlight(PdfQuad bounds)
Public Function AddHighlight(bounds As PdfQuad) As PdfTextMarkupAnnotation
Parameters
bounds
- PdfQuad
The bounds of the highlight PdfTextMarkupAnnotation specified in default user space units.
Returns
A new highlight PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
AddHighlight(Double, Double, Double, Double)
Adds a highlight PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddHighlight(double left, double bottom, double width, double height)
Public Function AddHighlight(left As Double, bottom As Double, width As Double, height As Double) As PdfTextMarkupAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the highlight PdfTextMarkupAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the highlight PdfTextMarkupAnnotation bounds specified in default user space units.
width
- System.Double
The width of the highlight PdfTextMarkupAnnotation bounds specified in default user space units.
height
- System.Double
The height of the highlight PdfTextMarkupAnnotation bounds specified in default user space units.
Returns
A new highlight PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
AddLink(Double, Double, Double, Double)
Adds a PdfLinkAnnotation to the PdfAnnotationCollection.
public PdfLinkAnnotation AddLink(double left, double bottom, double width, double height)
Public Function AddLink(left As Double, bottom As Double, width As Double, height As Double) As PdfLinkAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfLinkAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfLinkAnnotation bounds specified in default user space units.
width
- System.Double
The width of the PdfLinkAnnotation bounds specified in default user space units.
height
- System.Double
The height of the PdfLinkAnnotation bounds specified in default user space units.
Returns
A new PdfLinkAnnotation added to the PdfAnnotationCollection.
AddOval(Double, Double, Double, Double)
Adds an oval PdfSquareCircleAnnotation to the PdfAnnotationCollection.
public PdfSquareCircleAnnotation AddOval(double left, double bottom, double width, double height)
Public Function AddOval(left As Double, bottom As Double, width As Double, height As Double) As PdfSquareCircleAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
width
- System.Double
The width of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
height
- System.Double
The height of the oval PdfSquareCircleAnnotation bounds specified in default user space units.
Returns
A new oval PdfSquareCircleAnnotation added to the PdfAnnotationCollection.
AddPencilMark(Double, Double, Double, Double)
Adds a PdfPencilMarkAnnotation to the PdfAnnotationCollection.
public PdfPencilMarkAnnotation AddPencilMark(double left, double bottom, double width, double height)
Public Function AddPencilMark(left As Double, bottom As Double, width As Double, height As Double) As PdfPencilMarkAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfRedactionAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfRedactionAnnotation bounds specified in default user space units.
width
- System.Double
The width of the PdfRedactionAnnotation bounds specified in default user space units.
height
- System.Double
The height of the PdfRedactionAnnotation bounds specified in default user space units.
Returns
A new PdfPencilMarkAnnotation added to the PdfAnnotationCollection.
AddRectangle(Double, Double, Double, Double)
Adds a rectangular PdfSquareCircleAnnotation to the PdfAnnotationCollection.
public PdfSquareCircleAnnotation AddRectangle(double left, double bottom, double width, double height)
Public Function AddRectangle(left As Double, bottom As Double, width As Double, height As Double) As PdfSquareCircleAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
width
- System.Double
The width of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
height
- System.Double
The height of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
Returns
A new rectangular PdfSquareCircleAnnotation added to the PdfAnnotationCollection.
AddRedaction(Double, Double, Double, Double)
Adds a PdfRedactionAnnotation to the PdfAnnotationCollection.
public PdfRedactionAnnotation AddRedaction(double left, double bottom, double width, double height)
Public Function AddRedaction(left As Double, bottom As Double, width As Double, height As Double) As PdfRedactionAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfRedactionAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfRedactionAnnotation bounds specified in default user space units.
width
- System.Double
The width of the PdfRedactionAnnotation bounds specified in default user space units.
height
- System.Double
The height of the PdfRedactionAnnotation bounds specified in default user space units.
Returns
A new PdfRedactionAnnotation added to the PdfAnnotationCollection.
AddSquare(String, Double, Double, Double, Double)
Adds a rectangular PdfSquareCircleAnnotation to the PdfAnnotationCollection.
public PdfSquareCircleAnnotation AddSquare(string author, double left, double bottom, double right, double top)
Public Function AddSquare(author As String, left As Double, bottom As Double, right As Double, top As Double) As PdfSquareCircleAnnotation
Parameters
author
- System.String
Identification of the user who added the rectangular PdfSquareCircleAnnotation.
left
- System.Double
The lower-left horizontal coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
right
- System.Double
The upper-right horizontal coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
top
- System.Double
The upper-right vertical coordinate of the rectangular PdfSquareCircleAnnotation bounds specified in default user space units.
Returns
A new rectangular PdfSquareCircleAnnotation added to the PdfAnnotationCollection.
AddStamp(Double, Double, Double, Double, PdfStampIcon)
Adds a PdfStampAnnotation to the PdfAnnotationCollection with the specified stamp appearance icon.
public PdfStampAnnotation AddStamp(double left, double bottom, double width, double height, PdfStampIcon icon)
Public Function AddStamp(left As Double, bottom As Double, width As Double, height As Double, icon As PdfStampIcon) As PdfStampAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfStampAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfStampAnnotation bounds specified in default user space units.
width
- System.Double
The width of the PdfStampAnnotation bounds specified in default user space units or non-positive value to use the default icon
width.
height
- System.Double
The height of the PdfStampAnnotation bounds specified in default user space units or non-positive value to use the default icon
height.
icon
- PdfStampIcon
The icon used in displaying the PdfStampAnnotation.
Returns
A new PdfStampAnnotation added to the PdfAnnotationCollection.
AddStickyNote(Double, Double)
Adds a PdfStickyNoteAnnotation to the PdfAnnotationCollection.
The Comment whose size is 24 pt x 24 pt is used for an appearance of a newly added PdfStickyNoteAnnotation.
public PdfStickyNoteAnnotation AddStickyNote(double left, double bottom)
Public Function AddStickyNote(left As Double, bottom As Double) As PdfStickyNoteAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the PdfStickyNoteAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the PdfStickyNoteAnnotation bounds specified in default user space units.
Returns
A new PdfStickyNoteAnnotation added to the PdfAnnotationCollection.
AddTextBox(Double, Double, Double, Double)
Adds a text box PdfFreeTextAnnotation to the PdfAnnotationCollection.
public PdfFreeTextAnnotation AddTextBox(double left, double bottom, double width, double height)
Public Function AddTextBox(left As Double, bottom As Double, width As Double, height As Double) As PdfFreeTextAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the text box PdfFreeTextAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the text box PdfFreeTextAnnotation bounds specified in default user space units.
width
- System.Double
The width of the text box PdfFreeTextAnnotation bounds specified in default user space units.
height
- System.Double
The height of the text box PdfFreeTextAnnotation bounds specified in default user space units.
Returns
A new text box PdfFreeTextAnnotation added to the PdfAnnotationCollection.
AddTextComment(Double, Double, Double, Double)
Adds a text comment PdfFreeTextAnnotation to the PdfAnnotationCollection.
public PdfFreeTextAnnotation AddTextComment(double left, double bottom, double width, double height)
Public Function AddTextComment(left As Double, bottom As Double, width As Double, height As Double) As PdfFreeTextAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the text comment PdfFreeTextAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the text comment PdfFreeTextAnnotation bounds specified in default user space units.
width
- System.Double
The width of the text comment PdfFreeTextAnnotation bounds specified in default user space units.
height
- System.Double
The height of the text comment PdfFreeTextAnnotation bounds specified in default user space units.
Returns
A new text comment PdfFreeTextAnnotation added to the PdfAnnotationCollection.
AddUnderline(PdfQuad)
Adds an underline PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddUnderline(PdfQuad bounds)
Public Function AddUnderline(bounds As PdfQuad) As PdfTextMarkupAnnotation
Parameters
bounds
- PdfQuad
The bounds of the underline PdfTextMarkupAnnotation specified in default user space units.
Returns
A new underline PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
AddUnderline(Double, Double, Double, Double)
Adds an underline PdfTextMarkupAnnotation to the PdfAnnotationCollection.
public PdfTextMarkupAnnotation AddUnderline(double left, double bottom, double width, double height)
Public Function AddUnderline(left As Double, bottom As Double, width As Double, height As Double) As PdfTextMarkupAnnotation
Parameters
left
- System.Double
The lower-left horizontal coordinate of the underline PdfTextMarkupAnnotation bounds specified in default user space units.
bottom
- System.Double
The lower-left vertical coordinate of the underline PdfTextMarkupAnnotation bounds specified in default user space units.
width
- System.Double
The width of the underline PdfTextMarkupAnnotation bounds specified in default user space units.
height
- System.Double
The height of the underline PdfTextMarkupAnnotation bounds specified in default user space units.
Returns
A new underline PdfTextMarkupAnnotation added to the PdfAnnotationCollection.
ApplyRedactions()
Performs the Content removal phase of the redaction process after which the content in the area specified (either via Quads or Bounds) by all PdfRedactionAnnotations contained in this PdfAnnotationCollection is removed. In the removed content's place, some marking appears to indicate the area has been redacted as specified by the RedactedAreaFillColor, OverlayText, and related properties. Also, all PdfRedactionAnnotations (and their associated pop-up annotations) are removed from this PdfAnnotationCollection. If a portion of a content (either text, path, image, or form) is contained in a redaction region, that portion of the content is destroyed; clipping or image masks are not used to hide that content.
See Also
Inherited Properties
Count | Gets the number of elements contained in the PdfCollection. (Inherited from PdfCollection) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |
Inherited Methods
Clear() | Removes all elements from the PdfCollection. (Inherited from PdfCollection) |
RemoveAt(System.Int32) | Removes the element at the specified index of the PdfCollection. (Inherited from PdfCollection) |