1- import { PdfViewer , Toolbar , Magnification , Navigation , Annotation , LinkAnnotation , ThumbnailView , BookmarkView , TextSelection , TextSearch , FormFields , FormDesigner , Print } from '@syncfusion/ej2-pdfviewer' ;
1+ import { PdfViewer , Toolbar , Magnification , Navigation , Annotation , LinkAnnotation , ThumbnailView , BookmarkView , TextSelection , TextSearch , FormFields , FormDesigner } from '@syncfusion/ej2-pdfviewer' ;
22
3- PdfViewer . Inject ( Toolbar , Magnification , Navigation , Annotation , LinkAnnotation , ThumbnailView , BookmarkView , TextSelection , TextSearch , FormFields , FormDesigner , Print ) ;
3+ PdfViewer . Inject ( Toolbar , Magnification , Navigation , Annotation , LinkAnnotation , ThumbnailView , BookmarkView , TextSelection , TextSearch , FormFields , FormDesigner ) ;
44
55let pdfviewer : PdfViewer = new PdfViewer ( ) ;
66pdfviewer . documentPath = "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" ;
7- pdfviewer . resourceUrl = "https://cdn.syncfusion.com/ej2/27 .1.48 /dist/ej2-pdfviewer-lib" ;
8- pdfviewer . printScaleFactor = 0.5 ;
7+ pdfviewer . resourceUrl = "https://cdn.syncfusion.com/ej2/23 .1.43 /dist/ej2-pdfviewer-lib" ;
8+
99pdfviewer . appendTo ( '#PdfViewer' ) ;
10+ document . getElementById ( 'openBookmark' ) . addEventListener ( 'click' , ( ) => {
11+ // Open Bookmark pane
12+ pdfviewer . bookmarkViewModule . openBookmarkPane ( ) ;
13+ } ) ;
14+
15+ document . getElementById ( 'closeBookmark' ) . addEventListener ( 'click' , ( ) => {
16+ // close Bookmark pane
17+ pdfviewer . bookmarkViewModule . closeBookmarkPane ( ) ;
18+ } ) ;
0 commit comments