Stamp annotations in Blazor PDF Viewer Component

17 Jan 20221 minute to read

The PDF Viewer control provides options to add, edit, delete and rotate the following stamp annotation in the PDF documents:

  • Dynamic
  • Sign Here
  • Standard Business
  • Custom Stamp

Stamp Annotation in Blazor PDFViewer

Adding stamp annotations to the PDF document

The stamp annotations can be added to the PDF document using the annotation toolbar.

  • Click the Edit Annotation button in the PDF Viewer toolbar. A toolbar appears below it.
  • Click the Stamp Annotation dropdown button. A dropdown pop-up will appear and shows the stamp annotations to be added.

Adding Stamp in Blazor PDFViewer Toolbar

  • Select the annotation type to be added to the page in the pop-up.

Selecting Annotation from Stamp Popup in Blazor PDFViewer

  • You can add the annotation over the pages of the PDF document.

In the pan mode, if the stamp annotation mode is entered, the PDF Viewer control will switch to text select mode.

Adding custom stamp to the PDF document

  • Click the Edit Annotation button in the PDF Viewer toolbar. A toolbar appears below it.
  • Click the Stamp Annotation dropdown button. A dropdown pop-up will appear and shows the stamp annotations to be added.
  • Click the Custom Stamp button.

Custom Stamp in Blazor PDFViewer

  • The file explorer dialog will appear, choose the image and then add the image in the PDF page.

The JPG and JPEG image format are only supported in custom stamp annotations.

Setting default properties during control initialization

The properties of the stamp annotation can be set before creating the control using StampSettings.

After editing the default opacity using the Edit Opacity tool, they will be changed to the selected values.

@using Syncfusion.Blazor
@using Syncfusion.Blazor.PdfViewerServer

<SfPdfViewerServer @ref="@viewer" DocumentPath="@DocumentPath" StampSettings="@StampSettings" >
</SfPdfViewerServer>

@code{
    SfPdfViewerServer viewer;
    private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf";
    PdfViewerStampSettings StampSettings = new PdfViewerStampSettings {Opacity=0.3,Author="Blazor" };

}

You can refer to the Blazor PDF Viewer feature tour page for its groundbreaking feature representations. You can also explore the Blazor PDF Viewer example to understand how to explain core features of PDF Viewer.