Class PdfViewerAnnotationSettings
Represents the annotation settings for a PDF viewer component in Blazor applications.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class PdfViewerAnnotationSettings : SfBaseComponent
Remarks
This class provides functionality to manage and initialize annotation settings for a PDF viewer, such as author details, custom data, interaction settings, and restrictions on download or printing. It ensures that the settings are initialized and updated whenever parameters are set.
Examples
Below is an example of how to use PdfViewerAnnotationSettings in a Blazor component:
@code {
private object customData = "{'customerID':'0001'}";
private List<AllowedInteraction> allowedInterations = new List<AllowedInteraction> { AllowedInteraction.Resize };
}
Constructors
PdfViewerAnnotationSettings()
Declaration
public PdfViewerAnnotationSettings()
Properties
AllowedInteractions
Gets or sets the allowed interactions for the locked area annotations. IsLock can be configured using area settings.
Declaration
[Parameter]
[JsonPropertyName("allowedInteractions")]
public List<AllowedInteraction> AllowedInteractions { get; set; }
Property Value
| Type |
|---|
| List<AllowedInteraction> |
Author
Specifies the author's name to add annotation or review the PDF document. By default it is Guest.
Declaration
[Parameter]
[JsonPropertyName("author")]
public string Author { get; set; }
Property Value
| Type |
|---|
| string |
ChildContent
Gets or sets the child content to render within this settings component.
Declaration
[Parameter]
[JsonIgnore]
public RenderFragment ChildContent { get; set; }
Property Value
| Type |
|---|
| RenderFragment |
CustomData
Specifies the user's defined information related to the annotations. By default it is null.
Declaration
[Parameter]
[JsonPropertyName("customData")]
public object CustomData { get; set; }
Property Value
| Type |
|---|
| object |
IsLock
If it is set as true, can't interact with annotation. Otherwise can interact the annotations. By default it is false.
Declaration
[Parameter]
[JsonPropertyName("isLock")]
public bool IsLock { get; set; }
Property Value
| Type |
|---|
| bool |
IsPrint
Gets or sets the value for the individual annotations are included or not in print actions.
Declaration
[Parameter]
[JsonPropertyName("isPrint")]
public bool IsPrint { get; set; }
Property Value
| Type |
|---|
| bool |
JsNamespace
Gets or sets the JavaScript namespace used for interop mapping.
Declaration
protected virtual string JsNamespace { get; set; }
Property Value
| Type |
|---|
| string |
MaxHeight
Sets the maximum height of annotations. It prevents the height of the annotation becoming larger than the values provided in MaxHeight.By default it is 0.
Declaration
[Parameter]
[JsonPropertyName("maxHeight")]
public int MaxHeight { get; set; }
Property Value
| Type |
|---|
| int |
Remarks
This property not applicable for Textmarkup and Sticky notes annotation.
MaxWidth
Sets the maximum width of annotations. It prevents the width of the annotation becoming larger than values provided in MaxWidth.By default it is 0.
Declaration
[Parameter]
[JsonPropertyName("maxWidth")]
public int MaxWidth { get; set; }
Property Value
| Type |
|---|
| int |
Remarks
This property not applicable for Textmarkup and Sticky notes annotation.
MinHeight
Sets the minimum height of annotations. It prevents the height of the annotation becoming smaller than values provided in MinHeight.By default it is 0.
Declaration
[Parameter]
[JsonPropertyName("minHeight")]
public int MinHeight { get; set; }
Property Value
| Type |
|---|
| int |
Remarks
This property not applicable for Textmarkup and Sticky notes annotation.
MinWidth
Sets the minimum width of annotations. It prevents the width of the annotation becoming smaller than values provided in MinWidth.By default it is 0.
Declaration
[Parameter]
[JsonPropertyName("minWidth")]
public int MinWidth { get; set; }
Property Value
| Type |
|---|
| int |
Remarks
This property not applicable for Textmarkup and Sticky notes annotation.
SfTagIndex
Gets or sets the tag index used for internal component identification.
Declaration
protected virtual int SfTagIndex { get; set; }
Property Value
| Type |
|---|
| int |
SkipDownload
If it is set as true, newly added annotations won't be included in downloaded file. By default it is false.
Declaration
[Parameter]
[JsonPropertyName("skipDownload")]
public bool SkipDownload { get; set; }
Property Value
| Type |
|---|
| bool |
SkipPrint
If it is set as true, newly added annotations won't be included in printing. By default it is false.
Declaration
[Parameter]
[JsonPropertyName("skipPrint")]
public bool SkipPrint { get; set; }
Property Value
| Type |
|---|
| bool |
jsProperty
Gets or sets the computed JS property name for interop.
Declaration
protected string jsProperty { get; set; }
Property Value
| Type |
|---|
| string |
mainParent
Gets or sets the main parent component reference.
Declaration
protected SfBaseComponent mainParent { get; set; }
Property Value
| Type |
|---|
| SfBaseComponent |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
OnInitializedAsync()
Performs async initialization and sets up state and JS namespace.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |
OnParametersSetAsync()
Applies parameter changes and updates child properties when needed.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |