PdfAnnotation Class
An annotation associates an object such as a note, link or rich media with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard.
public abstract class PdfAnnotation : PdfObject
Public MustInherit Class PdfAnnotation
Inherits PdfObject
- Inheritance:
- System.ObjectPdfAnnotation
- Derived
Properties
AnnotationType
Gets the type of the annotation.
public abstract PdfAnnotationType AnnotationType { get; }
Public MustOverride ReadOnly Property AnnotationType As PdfAnnotationType
Property Value
The type of the annotation.
See Also
Appearance
Gets the appearance settings for this PdfAnnotation.
public PdfAppearance Appearance { get; }
Public ReadOnly Property Appearance As PdfAppearance
Property Value
The appearance settings for this PdfAnnotation.
AssociatedFiles
(Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.
public PdfAssociatedFileCollection AssociatedFiles { get; }
Public ReadOnly Property AssociatedFiles As PdfAssociatedFileCollection
Property Value
An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.
Bounds
(Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units.
Property Value
The annotation bounds, defining the location and the size of the annotation on the page in default user space units.
Exceptions
- System.ArgumentNullException
Value is null.
See Also
Locked
(PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.
Property Value
- System.Boolean
If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user.
See Also
Page
Gets the page with which this annotation is associated.
Property Value
The page with which this annotation is associated.
See Also
Methods
SetBounds(Double, Double)
Sets the size of the Bounds.
public void SetBounds(double width, double height)
Public Sub SetBounds(width As Double, height As Double)
Parameters
width
- System.Double
The width of the Bounds.
height
- System.Double
The height of the Bounds.
Exceptions
- System.ArgumentException
width
or height
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
- System.ArgumentOutOfRangeException
width
or height
is less than zero.
SetBounds(Double, Double, Double, Double)
Sets the Bounds.
public void SetBounds(double left, double bottom, double right, double top)
Public Sub SetBounds(left As Double, bottom As Double, right As Double, top As Double)
Parameters
left
- System.Double
The left X coordinate of the Bounds.
bottom
- System.Double
The bottom Y coordinate of the Bounds.
right
- System.Double
The right X coordinate of the Bounds.
top
- System.Double
The top Y coordinate of the Bounds.
Exceptions
- System.ArgumentException
left
, bottom
, right
or top
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
Inherited Properties
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |