ShapeLabelSettings
6 Jul 20261 minute to read
The ShapeLabelSettings module is used to provide the properties to rectangle annotation.
<div id="pdfViewer" style="height: 100%;width: 100%;"></div> let viewer: PdfViewer = new PdfViewer();
// Change the shape label settings.
viewer.shapeLabelSettings = {
opacity: 1,
fillColor: '#9c2592',
fontColor: '#000',
fontSize: 16,
fontFamily: 'Helvetica'
labelContent: 'Label',
notes: ''
};
viewer.appendTo("#pdfViewer");Properties
fillColor string
specifies the fill color of the label.
Defaults to ‘#ffffff00’
fontColor string
specifies the font color of the label.
Defaults to ‘#000’
fontFamily string
specifies the font family of the label.
Defaults to ‘Helvetica’
fontSize number
specifies the font size of the label.
Defaults to 16
labelContent string
Specifies the default content of the label.
Defaults to ‘Label’
notes string
specifies the default content of the label.
Defaults to ’’
opacity number
specifies the opacity of the label.
Defaults to 1