StampSettings

6 Jul 20265 minutes to read

The stampSettings module is used to provide the properties to stamp annotation.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the stamp annotation settings.
 viewer.stampSettings = {
     offset: { x:0, y:0 },
     pageNumber: 1,
     width: 150,
     height: 50,
     opacity: 1,
     author: 'Guest',
     annotationSelectorSettings: {
         selectionBorderColor: '',
         resizerBorderColor: 'red',
         resizerFillColor: '#FF4081',
         resizerSize: 8,
         selectionBorderThickness: 5,
         resizerShape: 'Circle',
         selectorLineDashArray: [],
         resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges,
         resizerCursorType: null
     },
     minHeight: 0,
     minWidth: 0,
     maxWidth: 0,
     maxHeight: 0,
     isLock: false,
     customData: null,
     dynamicStamps: [
         DynamicStampItem.Revised,
         DynamicStampItem.Reviewed,
         DynamicStampItem.Received,
         DynamicStampItem.Confidential,
         DynamicStampItem.Approved,
         DynamicStampItem.NotApproved
     ],
     signStamps: [
         SignStampItem.Witness,
         SignStampItem.InitialHere,
         SignStampItem.SignHere,
         SignStampItem.Accepted,
         SignStampItem.Rejected
     ],
     standardBusinessStamps: [
         StandardBusinessStampItem.Approved,
         StandardBusinessStampItem.NotApproved,
         StandardBusinessStampItem.Draft,
         StandardBusinessStampItem.Final,
         StandardBusinessStampItem.Completed,
         StandardBusinessStampItem.Confidential,
         StandardBusinessStampItem.ForPublicRelease,
         StandardBusinessStampItem.NotForPublicRelease,
         StandardBusinessStampItem.ForComment,
         StandardBusinessStampItem.Void,
         StandardBusinessStampItem.PreliminaryResults,
         StandardBusinessStampItem.InformationOnly
     ],
     allowedInteractions: ['None'],
     isPrint: true,
     subject: ''
 };
 viewer.appendTo("#pdfViewer");

Properties

allowedInteractions AllowedInteraction[]

Gets or sets the allowed interactions for the locked stamp annotations.
IsLock can be configured using stamp settings.

Defaults to [‘None’]

annotationSelectorSettings AnnotationSelectorSettingsModel

specifies the annotation selector settings of the annotation.

Defaults to ’’

author string

specifies the author of the annotation.

Defaults to ‘Guest’

customData object

specifies the custom data of the annotation.

Defaults to null

dynamicStamps DynamicStampItem[]

Provide option to define the required dynamic stamp items to be displayed in annotation toolbar menu.

Defaults to []

height number

specifies the height of the annotation.
The final rendered size preserves the base aspect ratio and is scaled
to fit within the requested width × height.

  • If only height is provided, height is computed from the aspect ratio.
  • If both width and height are provided, the smaller limiting dimension
    is used so the annotation fits entirely within the container.

Defaults to 50

isLock boolean

specifies the locked action of the annotation.

Defaults to false

isPrint boolean

specifies whether the individual annotations are included or not in print actions.

Defaults to true

maxHeight number

specifies the maxHeight of the annotation.

Defaults to 0

maxWidth number

specifies the maxWidth of the annotation.

Defaults to 0

minHeight number

specifies the minHeight of the annotation.

Defaults to 0

minWidth number

specifies the minWidth of the annotation.

Defaults to 0

offset IPoint

Get or set offset of the annotation.

Defaults to { x: 0, y: 0}

opacity number

specifies the opacity of the annotation.

Defaults to 1

pageNumber number

Get or set page number of the annotation.

Defaults to 1

signStamps SignStampItem[]

Provide option to define the required sign stamp items to be displayed in annotation toolbar menu.

Defaults to []

standardBusinessStamps StandardBusinessStampItem[]

Provide option to define the required standard business stamp items to be displayed in annotation toolbar menu.

Defaults to []

subject string

specifies the subject of the annotation.

Defaults to ’’

width number

specifies the width of the annotation.
The final rendered size preserves the base aspect ratio and is scaled
to fit within the requested width × height.

  • If only width is provided, height is computed from the aspect ratio.
  • If both width and height are provided, the smaller limiting dimension
    is used so the annotation fits entirely within the container.

Defaults to 150