Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Webviewer({
- initialDoc: ...,
- path: '/lib',
- }, document.getElementById('viewer')).then(instance => {
- const { Annotations, docViewer, Actions } = instance
- const rect = new Annotations.Rect(10,10,10,10)
- const link = new Annotations.Link({ rect: rect})
- link.setWidth(200)
- link.setHeight(200)
- link.PageNumber = 1
- const destination = new Actions.GoTo.Dest({ page: 4})
- const goToAction = new Actions.GoTo({dest: destination})
- link.addAction('U', goToAction);
- const annotManager = docViewer.getAnnotationManager()
- annotManager.addAnnotation(link)
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement