Pdfviewer - CustomStampText

30 Sep 20262 minutes to read

The CustomStampText module is used to define custom text stamp templates
that are displayed in the PDF Viewer Text Stamp menu.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Add your custom text stamp.
 viewer.customStampSettings = {
     customTextStamps: [
         {
             title: 'DRAFT',
             subtitle: '[By $author at] h:mm:ss a, MMMM D, YYYY',
             bold: true,
             textColor: '#000000',
             backgroundColor: '#FFFF00',
             italic: false,
             underline: false,
             strikeout: false
         }
     ]
 };
 viewer.appendTo("#pdfViewer");

Properties

backgroundColor string

Hex color (#RRGGBB) of the stamp background fill.
Falls back to #ADD8E6 if an invalid value is provided.

Defaults to ‘#ADD8E6’

bold boolean

Applies bold styling to the title.

Defaults to false

fontFamily string

Font family applied to the title and subtitle.

Defaults to ‘Helvetica’

italic boolean

Applies italic styling to the title.

Defaults to false

strikeout boolean

Applies strikeout styling to the title.

Defaults to false

subtitle string

Secondary text displayed below the title.
Supports a single [$ ... ] block (author/literal) and date/time format tokens outside.

Defaults to ’’

textColor string

Hex color (#RRGGBB) of the stamp text.
Falls back to #000000 if an invalid value is provided.

Defaults to ‘#000000’

title string

Main text displayed prominently on the stamp.

Defaults to ’’

underline boolean

Applies underline styling to the title.

Defaults to false