Class PdfViewerCustomStamp
Represents the settings for custom stamps in a PDF viewer component in Blazor applications.
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class PdfViewerCustomStamp : SfBaseComponent
Remarks
This class provides functionality to manage and initialize custom stamp settings for the PDF viewer, such as defining the custom stamp's name and image source. The settings are initialized and updated during the component lifecycle to ensure the custom stamps are available when needed.
Examples
Below is an example of how to use PdfViewerCustomStamp in a Blazor component:
@code {
public List<PdfViewerCustomStamp> pdfViewerCustomStamps = new List<PdfViewerCustomStamp>()
{
new PdfViewerCustomStamp()
{
CustomStampName = "Stamp",
// Replace the 'ImageBase64' with the actual base64 string of the image.
CustomStampImageSource ="ImageBase64"
}
};
}
Constructors
PdfViewerCustomStamp()
Declaration
public PdfViewerCustomStamp()
Properties
ChildContent
Gets or sets the child content to be rendered inside the custom stamp component.
Declaration
[Parameter]
[JsonIgnore]
public RenderFragment ChildContent { get; set; }
Property Value
| Type |
|---|
| RenderFragment |
CustomStampImageSource
Defines the custom stamp images source to be added in stamp menu of the PDF Viewer toolbar.
Declaration
[Parameter]
[JsonPropertyName("customStampImageSource")]
public string CustomStampImageSource { get; set; }
Property Value
| Type |
|---|
| string |
CustomStampName
Defines the custom stamp name to be added in stamp menu of the PDF Viewer toolbar.
Declaration
[Parameter]
[JsonPropertyName("customStampName")]
public string CustomStampName { get; set; }
Property Value
| Type |
|---|
| string |
jsProperty
The JS interop property name used internally.
Declaration
protected string jsProperty { get; set; }
Property Value
| Type |
|---|
| string |
mainParent
Reference to the parent base component in the hierarchy.
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 |