Resizing Custom Stamp Annotation Image

Hi,

I am using following code to drop custom stamp on the PDF. Image height and width need to be resized while dropping it into the pdf doc but the size is not changing from its actual size.

Here is the code sample:

            const tool = documentViewer.getTool('AnnotationCreateRubberStamp');
            
            const stampImage ='my_large_image_in_base64';

            const stampAnnot = new Annotations.StampAnnotation();
            stampAnnot.ImageData = stampImage;
            stampAnnot.Width = 190;
            stampAnnot.Height = 80;


            documentViewer.setToolMode(tool);

            await tool.setRubberStamp(stampAnnot, 'Initials');
            tool.showPreview();

Could you please confirm which exact SDK/product you are using. Is it our WebViewer SDK?

I am using Webviewer’s webviewer.min.js

Hi zihad,

The preview of the image is just the image, not an annotation therefore we don’t have an API at the moment to adjust the width/height of the preview. If you place the annotation it will be the size you set it to though.

I will add this as a feature request for our product team to review.

Best regards,
Tyler Gordon