var doc = docViewer.GetDocument();
var pageIndex = 0;
var point1 = doc.GetPDFCoordinates(pageIndex, 0, 0);
var point2 = doc.GetPDFCoordinates(pageIndex, 100, 100);
var pageLinks = doc.GetLinks(pageIndex);
// creates an external link
var externalLink = new CoreControls.Hyperlink([point1.x, point1.y, point2.x, point2.y], "http://www.pdftron.com");
pageLinks.push(externalLink);
// creates an internal link to page 5 in the document with offset (0, 0)
var internalLink = new CoreControls.Link([point1.x, point1.y, point2.x, point2.y], 5, 0, 0);
pageLinks.push(internalLink);
docViewer.UpdateView();