Pdfviewer - DocumentLinkSettings

30 Sep 20261 minute to read

The DocumentLinkSettings module is used to provide the properties to Document link annotation.

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

Properties

destinationLocation IPoint

Defines the destination location within the target page.

Defaults to { x: 0, y: 0}

destinationPageIndex number

Defines the destination page index to which the document link navigates.

Defaults to 0

height number

Defines the height of the document link annotation.

Defaults to 50

offset IPoint

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

Defaults to { x: 0, y: 0 }

pageNumber number

Defines the page number where the document link annotation is added.

Defaults to 1

strokeColor string

Defines the border color of the document link annotation.

Defaults to ‘#0A7EE4’

subject string

Defines the subject of the document link annotation.

Defaults to ’’

thickness number

Defines the border thickness of the document link annotation.

Defaults to 1

width number

Defines the width of the document link annotation.

Defaults to 100

zoomValue number

Defines the zoom level applied when navigating through the document link.

Defaults to 0