Add the custom stamp based on the free text bounds

4 Apr 20231 minute to read

To add a custom stamp in the Syncfusion PDF viewer based on the free text bounds, obtain the value of the bound for the free text in the Pixel in the annotationAdd event while adding the free text. However, when a custom stamp is added programmatically, the offset values are set in points. So, you must convert the value of the bound for the free text into a point to add the custom stamp to the free text bounds position.

Here is an example of how you can add the custom stamp based on the free text bounds:

  public annotationAdd(args) {
    if (args.annotationType === 'FreeText') {
      this.x = (args.annotationBound.left * 72) / 96;
      this.y = (args.annotationBound.top * 72) / 96;
      console.log(args);
    }
  }

Find the sample how to add the custom stamp based on the free text bounds.