Some test text!


Creating stamp annotations using JavaScript

Stamp annotations can be created from an image as a data URI. The key property for stamps is ImageData which you set with the value of your data URI. For example:

  .then(instance => {
    const { Annotations, annotManager, docViewer } = instance;

    docViewer.on('documentLoaded', () => {
      const stampAnnot = new Annotations.StampAnnotation();
      stampAnnot.PageNumber = 1;
      stampAnnot.X = 100;
      stampAnnot.Y = 250;
      stampAnnot.Width = 275;
      stampAnnot.Height = 40;
      const keepAsSVG = false;
      stampAnnot.setImageData('image data (URL or base64) goes here', keepAsSVG);
      stampAnnot.Author = annotManager.getCurrentUser();



Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.