Pdfviewer - CalloutSettings

18 Nov 20263 minutes to read

The CalloutSettings module is used to provide the properties to callout annotation.
A callout is a free text annotation augmented with a leader-line and an arrowhead
anchored to a fixed point on the page (PDF 32000-1:2008 § 12.5.6.6).

 let viewer: PdfViewer = new PdfViewer();
 // Change the callout annotation settings.
 viewer.calloutSettings = {
     offset: { x: 0, y: 0 },
     pageNumber: 1,
     opacity: 1,
     borderColor: '#000000',
     borderWidth: 1,
     borderStyle: 'solid',
     author: 'Guest',
     calloutLines: null,
     lineEndingStyle: 'Open',
     subject: 'Callout'
 };
 viewer.appendTo("#pdfViewer");

Properties

allowEditTextOnly boolean

specifies the allow text only action of the callout text annotation.

Defaults to false

allowedInteractions AllowedInteraction[]

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

Defaults to [‘None’]

annotationSelectorSettings AnnotationSelectorSettingsModel

specifies the annotation selector settings of the annotation.

author string

specifies the author of the annotation.

Defaults to ‘Guest’

borderColor string

specifies the border color of the annotation.

Defaults to ‘#000000’

borderDashArray number[]

Specifies the border dash array of the callout annotation when rendered with a
dashed border style. Inherited from FreeTextSettings because callouts are

Defaults to []

borderStyle string

specifies the border style of the annotation.

Defaults to ‘solid’

borderWidth number

specifies the border width of the annotation.

Defaults to 1

calloutLines IPoint[]|null

Three-point geometry of the callout leader line:
[origin, knee, target]. When null the viewer auto-computes the geometry
from the click offset supplied to addAnnotation('Callout', options).

Defaults to null

cloudIntensity number

Specifies the cloud intensity of the callout annotation when rendered with a
cloud border style. The minimum allowed value is 1, and the maximum allowed value is 2.
Inherited from FreeTextSettings because callouts are

Defaults to 1

customData object

specifies the custom data of the annotation.

Defaults to null

defaultText string

setting the default text for annotation.

Defaults to ‘Type Here’

enableAutoFit boolean

Enable or disable auto fit mode for callout annotation in the Pdfviewer. FALSE by default.

Defaults to false

fillColor string

specifies the background fill color of the annotation.

Defaults to ‘#ffffff00’

fontColor string

specifies the text box font color of the annotation.

Defaults to ‘#000’

fontFamily string

specifies the text box font family of the annotation.

Defaults to ‘Helvetica’

fontSize number

specifies the text box font size of the annotation.

Defaults to 16

fontStyle FontStyle

applying the font styles for the text.

Defaults to ‘None’

height number

specifies the height of the annotation.

Defaults to 24.6

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

isReadonly boolean

Enables or disables text editing for the annotation. FALSE, by default.

Defaults to false

lineEndingStyle LineHeadStyle

Specifies the line-ending style rendered at the leader origin (arrowhead).
Reuses the existing LineHeadStyle enum.

Defaults to ‘Open’

maxHeight number

specifies the maxHeight of the annotation.

Defaults to 2000

maxWidth number

specifies the maxWidth of the annotation.

Defaults to 2000

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

subject string

specifies the subject of the annotation.

Defaults to ‘Callout’

textAlignment TextAlignment

Aligning the text in the annotation.

Defaults to ‘Left’

width number

specifies the width of the annotation.

Defaults to 151