Interface IAnnotation

Interface that represents an annotation.

Namespace: PSPDFKit.Api.Annotation
Assembly: Api.dll
Syntax
public interface IAnnotation

Properties

| Edit this page View Source

BlendMode

Gets or sets the blend mode for annotation. Blend mode defines how the color of the annotation will be applied to its background. Default value is Normal

Declaration
BlendMode BlendMode { get; set; }
Property Value
Type Description
BlendMode
| Edit this page View Source

BoundingBox

Gets or sets the bounding box of the annotation within the page. It's necessary that this spans all visible points of the annotation, otherwise hit testing and other features may not work.

Declaration
IRectangle BoundingBox { get; set; }
Property Value
Type Description
IRectangle
| Edit this page View Source

CreatedAt

Gets or sets the date of the annotation creation.

Declaration
DateTimeOffset CreatedAt { get; }
Property Value
Type Description
DateTimeOffset
| Edit this page View Source

CreatorName

Gets or sets the name of the creator of the annotation. This is a general purpose string which can easily be spoofed and might not reflect the actual creator of the annotation.

Declaration
string CreatorName { get; set; }
Property Value
Type Description
string
| Edit this page View Source

CustomData

Gets or sets additional user-specified data. PSPDFKit does not use or evaluate CustomData in the UI directly. You have full control over this property. For a new annotation, this defaults to a null object.

Declaration
JObject CustomData { get; set; }
Property Value
Type Description
JObject
| Edit this page View Source

Id

Gets the unique identifier to describe the annotation.

Declaration
string Id { get; }
Property Value
Type Description
string
| Edit this page View Source

IsContentLocked

Gets or sets if the annotation content can be modified. Default value is false.

Declaration
bool IsContentLocked { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

IsLocked

Gets or sets if the annotation can be modified. Default value is false.

Declaration
bool IsLocked { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Name

Gets or sets name for annotation. This is an optional field that may be used to identify the annotation. By default, it is set that to the same value as the automatically generated Id.

Declaration
string Name { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Opacity

Gets or sets the opacity of the annotation, 0.0 - 1.0. Default value is 1.

Declaration
float Opacity { get; set; }
Property Value
Type Description
float
| Edit this page View Source

PDFObjectId

Gets or sets the identifier that was used in the PDF document. This ID is optional since newly created annotations won't have a PDFObjectId assigned.

Declaration
int? PDFObjectId { get; set; }
Property Value
Type Description
int?
| Edit this page View Source

PageIndex

Gets or sets the page index of the annotation in the document. It's important to notice that an annotation can only ever be on one page. If you create for example an ink annotation with lines on two pages, two annotation records will be created. It is a zero-based and has maximum value of totalPageCount - 1

Declaration
int PageIndex { get; set; }
Property Value
Type Description
int
| Edit this page View Source

ShouldPrint

Gets or sets if the annotation should be printed.

Declaration
bool ShouldPrint { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ShouldRender

Gets or sets if the annotation should be rendered in the UI. The annotation may still be part of the printed page, depending on the value of ShouldPrint

Declaration
bool ShouldRender { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

UpdatedAt

Gets the date of last annotation update.

Declaration
DateTimeOffset UpdatedAt { get; }
Property Value
Type Description
DateTimeOffset
| Edit this page View Source

Version

The Instant JSON spec version this annotation is compliant to.

Declaration
int Version { get; }
Property Value
Type Description
int

Events

| Edit this page View Source

Deselected

This event will fire whenever the annotation is being deselected.

Declaration
event Action Deselected
Event Type
Type Description
Action
| Edit this page View Source

Focused

This event will be emitted whenever the annotation is focused.

Declaration
event Action Focused
Event Type
Type Description
Action
| Edit this page View Source

Pressed

The event will be emitted whenever the annotation is pressed.

Declaration
event IAnnotation.PressedEventHandler Pressed
Event Type
Type Description
IAnnotation.PressedEventHandler
| Edit this page View Source

Selected

This event will fire whenever the annotation is being selected.

Declaration
event Action Selected
Event Type
Type Description
Action
| Edit this page View Source

Unfocused

This event will be emitted whenever the annotation loses focus.

Declaration
event Action Unfocused
Event Type
Type Description
Action