Pdfviewer - WebLinkSettings

30 Sep 20261 minute to read

The WebLinkSettings module is used to provide the properties to Web link annotation.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the webLink annotation settings.
 viewer.webLinkSettings = {
     offset: { x:0, y:0 },
     pageNumber: 1,
     width: 100,
     height: 50,
     strokeColor: '#0A7EE4',
     thickness: 1,
     subject: '',
     url: ''
 };
 viewer.appendTo("#pdfViewer");

Properties

height number

Defines the height of the web link annotation.

Defaults to 50

offset IPoint

Defines the position of the web link annotation on the page.

Defaults to { x: 0, y: 0 }

pageNumber number

Defines the page number on which the web link annotation is added.

Defaults to 1

strokeColor string

Defines the stroke color of the web link annotation.

Defaults to ‘#0A7EE4’

subject string

Defines the subject of the web link annotation.

Defaults to ’’

thickness number

Defines the border thickness of the web link annotation.

Defaults to 1

url string

Defines the destination URL that is opened when the web link annotation is clicked.

Defaults to ’’

width number

Defines the width of the web link annotation.

Defaults to 100