Class PdfAnnotation
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
An annotation: a link, comment, form widget and so on. Its rectangle is in points from the page's bottom-left corner. Role is Tagged when a structure element points to it.
public sealed record PdfAnnotation : IEquatable<PdfAnnotation>
- Inheritance
-
PdfAnnotation
- Implements
- Inherited Members
Properties
AccessibleName
A form widget's tooltip, which a screen reader announces as its name; null when it has none.
public string? AccessibleName { get; init; }
Property Value
Action
The type of action it runs, such as "GoTo", "Launch" or "JavaScript"; null when it has no action or its action opens a web address (Uri), and "URI" for a web-address action that names no address. PdfActionTypes lists the standard ones.
public string? Action { get; init; }
Property Value
ActionTarget
What its action acts on that Action doesn't say: a Named action's name; the fields a ResetForm or Hide action names, joined with commas, each a full name (or for a Hide, another annotation's /NM, or its type in parentheses), after "except:" when a ResetForm resets every field but those or "show:" when a Hide shows them; or the first 16 hex digits of a JavaScript action's script hash. "(unnamed)" for a field without a name, "(unknown)" for a reference to nothing and "(none)" for an empty list. Null otherwise.
public string? ActionTarget { get; init; }
Property Value
Appearance
A hash of the content of the annotation's normal appearance stream (/AP /N), including every state of a check box or radio button hashed together, or "unreadable"; null when it has no appearance. Form XObjects and fonts the stream uses aren't hashed.
public string? Appearance { get; init; }
Property Value
BackgroundColor
A widget's background color (/MK /BG); null when it sets none.
public string? BackgroundColor { get; init; }
Property Value
Border
The border's style and width, from /BS or the older /Border array; null when the annotation sets neither.
public PdfBorder? Border { get; init; }
Property Value
BorderColor
A widget's border color (/MK /BC); null when it sets none.
public string? BorderColor { get; init; }
Property Value
Caption
A widget's caption (/MK /CA), such as a check box's symbol or a button's label; null when it has none.
public string? Caption { get; init; }
Property Value
Color
The annotation's color (/C), used for a link's border or a comment's icon, such as "#0000ff", or "none" for transparent; null when it sets none.
public string? Color { get; init; }
Property Value
Contents
The annotation's text, which for a link is its description for assistive technology; null when it has none.
public string? Contents { get; init; }
Property Value
Destination
Where the link goes, from its own destination or a GoTo, GoToR or GoToE action.
public PdfDestination? Destination { get; init; }
Property Value
File
The file a GoToR or Launch action opens, or the address a SubmitForm action sends the form to. For GoToE, the embedded file it opens, as a path such as data.pdf/inner.pdf.
public string? File { get; init; }
Property Value
Flags
How a viewer treats it: whether it is shown, printed, editable and so on.
public PdfAnnotationFlags Flags { get; init; }
Property Value
Height
The rectangle's height in points.
public double Height { get; init; }
Property Value
Highlight
How a link or widget looks while it's clicked (/H): "none", "invert", "outline", "push" or "toggle"; null when it doesn't say, which means invert.
public string? Highlight { get; init; }
Property Value
MediaClips
The media clips a Screen annotation's Rendition actions play, on click or on an event such as the page opening, with every alternative a selector rendition offers; empty when it plays none.
public IReadOnlyList<PdfMediaClip> MediaClips { get; init; }
Property Value
Page
The page it's on, counted from 1; null only when a structure element points to it and neither the annotation nor the element names a page.
public int? Page { get; init; }
Property Value
- int?
Role
public PdfContentRole Role { get; init; }
Property Value
Subtype
The kind of annotation, such as "Link", "Widget" or "Text"; "(none)" (None) when the PDF doesn't say. PdfAnnotationTypes lists the standard ones.
public required string Subtype { get; init; }
Property Value
Uri
The web address it opens; null when it opens none.
public string? Uri { get; init; }
Property Value
Width
The rectangle's width in points.
public double Width { get; init; }
Property Value
X
The rectangle's left edge, in points from the page's left edge.
public double X { get; init; }
Property Value
Y
The rectangle's bottom edge, in points from the page's bottom edge.
public double Y { get; init; }