Class PdfAnnotation
Represents the attributes of the PDF annotation.
Inherited Members
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class PdfAnnotation : PdfAnnotationProperties
Constructors
PdfAnnotation()
Declaration
public PdfAnnotation()
Properties
AllowedInteractions
Gets or sets the allowed interactions for the locked area annotations. IsLock can be configured using area settings.
Declaration
[JsonPropertyName("allowedInteractions")]
public List<AllowedInteraction> AllowedInteractions { get; set; }
Property Value
| Type |
|---|
| List<AllowedInteraction> |
AnnotationMode
Gets the mode of annotation to be added in the PDF document. Three different modes are Drawn, Import and Existing.
Declaration
[JsonPropertyName("AnnotationAddMode")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public AnnotationMode AnnotationMode { get; set; }
Property Value
| Type |
|---|
| AnnotationMode |
AnnotationProperties
Gets or sets the redaction-specific information for this annotation.
Declaration
[JsonPropertyName("annotationProperties")]
public AnnotationProperties? AnnotationProperties { get; set; }
Property Value
| Type |
|---|
| AnnotationProperties |
Remarks
This property provides access to redaction-specific settings such as overlay text, text repetition, and marker appearance properties. It is only applicable for annotations of type Redaction.
Examples
PdfAnnotation annotation = new PdfAnnotation()
{
Id = "redaction_Annotation",
Type = AnnotationType.Redaction,
AnnotationProperties = new RedactionProperties
{
OverlayText = "Confidential",
IsRepeat = true,
MarkerFillColor = "#FF0000",
MarkerBorderColor = "#000000",
MarkerOpacity = 0.5
}
};
await SfPdfViewer2.AddAnnotationAsync(annotation);
AnnotationSettings
Gets the annotation settings.
Declaration
[JsonPropertyName("annotationSettings")]
public PdfViewerAnnotationSettings AnnotationSettings { get; set; }
Property Value
| Type |
|---|
| PdfViewerAnnotationSettings |
Bound
Gets or sets the bound of the PDF annotation.
Declaration
[JsonInclude]
public Bound Bound { get; set; }
Property Value
| Type |
|---|
| Bound |
Remarks
This property represents the boundary of the annotation in the SfPdfViewer. It is not applicable for text markup annotation.
Bounds
Gets or sets the bounds details of the text markup annotation.
Declaration
[JsonInclude]
public List<Bound> Bounds { get; set; }
Property Value
| Type |
|---|
| List<Bound> |
Remarks
This property represents the list of bounds associated with the text markup annotation in the SfPdfViewer.
Comments
Gets or sets the collection of comments details of the PDF annotation.
Declaration
[JsonPropertyName("comments")]
[JsonInclude]
public List<Comment> Comments { get; set; }
Property Value
| Type |
|---|
| List<Comment> |
Remarks
This property represents a collection of comments related to the PDF annotation in the SfPdfViewer.
CustomStampSource
Gets or sets the custom stamp source for the PDF annotation.
Declaration
[JsonPropertyName("customStampSource")]
public string CustomStampSource { get; set; }
Property Value
| Type |
|---|
| string |
Remarks
This property represents the image source of the custom stamp annotation in the SfPdfViewer. Note: It is applicable for custom stamp annotation.
Examples
PdfAnnotation annotation = new PdfAnnotation();
annotation.Type = AnnotationType.Image;
annotation.CustomStampSource = "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADJCAMAAABYMS1zAAAAllBMVEX///8rNXz2kh7b3OXQ0d8jLnlMU4wfK3hYXpH5+fvz8/bv7/SRlbYAAGyLj7GMkLBGToqdoLt4fKS1t8vIydoAGHEXJXUMHnP1hAD1jAD9483+9u7707L4sXSDh6s0PoL3oE76xpr4qV/97d/5vov96NYADW/2m0b7zaX2mTv4t3v5uYT83cL4rms+R4YAAGX2kjBubpsmc7m7AAAEKUlEQVR4nO3c6VbiQBAF4Dai7AiikCbIjuyK7/9ykziTCJLuVLUcu5O5938d8x2kUr0chEAQBEEQpBgJbD/A9RLMVnPbz3C1LHw5Gdh+iCtl7Xue3AxtP8ZVMpReGOlNC/DF2Xt/I+U295rlRHoxZ5ZzzXyWWELNZGn7eX6SYHdiidrA3vYT/SBT3zuPXNt+JOOsv1tCzSKnX5y9vLB4nr/N5TQw8NIwnjzksA3MV6mWqKnlrg0EM4UlmgbyNtu8KC2fs43tx2NlobFEnDzNNmst5bMN5EYzzLKEmlVOmtpgo/8n+/fFyUVTW6ob2ZlG5qCpBbpGdhbf/QXbjmoJNTvHZ5sp3ZI521S7oxY93biqwSga3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DynamicText
Gets default text of freetext annotaton.
Declaration
[JsonPropertyName("dynamicText")]
[JsonInclude]
public string DynamicText { get; set; }
Property Value
| Type |
|---|
| string |
EnableShapeLabel
Gets the value to check whether the label for the shape and measure annotation is enabled or not. By default it is false.
Declaration
[JsonPropertyName("enableShapeLabel")]
public bool EnableShapeLabel { get; set; }
Property Value
| Type |
|---|
| bool |
Id
Gets the unique Id for the annotation.
Declaration
[JsonPropertyName("Id")]
public string Id { get; set; }
Property Value
| Type |
|---|
| string |
IdCollection
Gets the Id's collection of the textmarkup annotation.
Declaration
[JsonPropertyName("annotNameCollection")]
public List<string> IdCollection { get; set; }
Property Value
| Type |
|---|
| List<string> |
Remarks
It is applicable only set EnableMultiPageAnnotation as true. This support has been provided only for Textmarkup annotation.
Indent
Gets the intent of the measure annotation.
Declaration
[JsonPropertyName("indent")]
public string Indent { get; set; }
Property Value
| Type |
|---|
| string |
Remarks
It is applicable only for measure annotation.
IsMultiSelect
Gets the value to check whether the textmarkup annotation added with multiple pages. By default it is false. If we add textmarkup annotation with multiple page region it will return true.
Declaration
[JsonPropertyName("isMultiSelect")]
[JsonInclude]
public bool IsMultiSelect { get; }
Property Value
| Type |
|---|
| bool |
Remarks
It is applicable only set EnableMultiPageAnnotation as true. This support has been provided only for Textmarkup annotation.
IsPrint
Gets or sets the value for the individual annotations are included or not in print actions.
Declaration
[JsonPropertyName("isPrint")]
public bool IsPrint { get; set; }
Property Value
| Type |
|---|
| bool |
Remarks
true if individual annotations are included in print actions; otherwise, false.
LabelBorderColor
Gets or sets border color for the shape and measure annotation label.
Declaration
[JsonPropertyName("labelBorderColor")]
public string LabelBorderColor { get; set; }
Property Value
| Type |
|---|
| string |
LabelBound
Gets bound for label text of shape and measure annotation.
Declaration
[JsonPropertyName("labelBounds")]
[JsonInclude]
public Bound LabelBound { get; }
Property Value
| Type |
|---|
| Bound |
LabelContent
Gets or sets content of the shape label.
Declaration
[JsonPropertyName("labelContent")]
public string LabelContent { get; set; }
Property Value
| Type |
|---|
| string |
LabelFillColor
Gets or sets fillcolor for the shape and measure annotation label.
Declaration
[JsonPropertyName("labelFillColor")]
public string LabelFillColor { get; set; }
Property Value
| Type |
|---|
| string |
LeaderLength
Gets or sets the leader length of the annotation.
Declaration
[JsonPropertyName("leaderLength")]
public int LeaderLength { get; set; }
Property Value
| Type |
|---|
| int |
LeaderLineExtension
Gets the leader line extension of the measure annotation.
Declaration
[JsonPropertyName("leaderLineExtension")]
public int LeaderLineExtension { get; set; }
Property Value
| Type |
|---|
| int |
LeaderLineOffset
Gets the leader line offset of the measure annotation.
Declaration
[JsonPropertyName("leaderLineOffset")]
public int LeaderLineOffset { get; set; }
Property Value
| Type |
|---|
| int |
Note
Gets the note of the annotation. It represents comment text added for this annotation.
Declaration
[JsonPropertyName("note")]
public string Note { get; set; }
Property Value
| Type |
|---|
| string |
PageNumber
Gets or sets the page number of the PDF annotation.
Declaration
[JsonPropertyName("pageNumber")]
[JsonInclude]
public int PageNumber { get; set; }
Property Value
| Type |
|---|
| int |
Remarks
This property represents the page number associated with the PDF annotation in the SfPdfViewer.
PageNumbers
Gets the page number collection of the textmarkup annotation.
Declaration
[JsonPropertyName("annotpageNumbers")]
public List<int> PageNumbers { get; set; }
Property Value
| Type |
|---|
| List<int> |
Remarks
It is applicable only set EnableMultiPageAnnotation as true. This support has been provided only for Textmarkup annotation.
Rect
Gets the rectangle of the textmarkup annotation.
Declaration
[JsonPropertyName("rect")]
public Rect Rect { get; set; }
Property Value
| Type |
|---|
| Rect |
Review
Gets or sets the review status details of the PDF annotation Comments.
Declaration
[JsonPropertyName("review")]
[JsonInclude]
public Review Review { get; set; }
Property Value
| Type |
|---|
| Review |
Remarks
This property represents information about the review status associated with the PDF annotation Comments in the SfPdfViewer.
UniqueKey
Gets or sets uniquekey for annotation.
Declaration
[JsonPropertyName("uniqueKey")]
public string UniqueKey { get; set; }
Property Value
| Type |
|---|
| string |
VertexPoints
Gets or sets the list of vertex points defining the annotation shape.
Declaration
[JsonPropertyName("vertexPoints")]
public List<VertexPoint> VertexPoints { get; set; }
Property Value
| Type |
|---|
| List<VertexPoint> |
Remarks
The VertexPoints property represents a collection of vertex points that define the shape of the annotation. Each VertexPoint specifies coordinates (X, Y) in the associated SfPdfViewer coordinate space. Note: It is applicable only to specific annotations such as Line, Arrow, Polygon, Distance, Perimeter, Area, and Volume within the SfPdfViewer.
Examples
VertexPoint vertexPoint1 = new VertexPoint();
vertexPoint1.X = 10;
vertexPoint1.Y = 10;
VertexPoint vertexPoint2 = new VertexPoint();
vertexPoint2.X = 110;
vertexPoint2.Y = 10;
PdfAnnotation annotation = new PdfAnnotation();
annotation.Type = AnnotationType.Line;
List<VertexPoint> vertexPoints =new List<VertexPoint>();
vertexPoints.Add(vertexPoint1);
vertexPoints.Add(vertexPoint2);
annotation.VertexPoints = vertexPoints;