Skip to content

Commit 9cf82b8

Browse files
committed
906190: UGDocumentation
1 parent b5afd32 commit 9cf82b8

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
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

55
let pdfviewer: PdfViewer = new PdfViewer();
66
pdfviewer.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+
99
pdfviewer.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+
});

How to/Open and Close bookmark pane/src/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
</head>
1313

1414
<body>
15-
<div style="margin-top: 70px;"></div>
15+
<button id="openBookmark">Open Bookmark Pane</button>
16+
<button id="closeBookmark">Close Bookmark Pane</button>
1617
<!--Element which will render as PDF Viewer -->
1718
<div id="PdfViewer"></div>
1819
</body>

0 commit comments

Comments
 (0)