@@ -16,25 +16,48 @@ import Vue from 'vue';
1616import { PdfViewerPlugin , Toolbar , Magnification , Navigation , LinkAnnotation ,
1717 BookmarkView , ThumbnailView , Print , TextSelection , TextSearch ,
1818 Annotation , FormDesigner , FormFields } from ' @syncfusion/ej2-vue-pdfviewer' ;
19+ import { ComboBox } from " @syncfusion/ej2-dropdowns" ;
20+ import { TextBox } from " @syncfusion/ej2-inputs" ;
1921Vue .use (PdfViewerPlugin);
2022var viewer;
2123export default {
2224 name: ' app' ,
2325 data () {
2426 // Move the toolItem declaration inside the data function
25- var toolItem = {
27+ var toolItem1 = {
2628 prefixIcon: ' e-icons e-paste' ,
2729 id: ' print' ,
2830 tooltipText: ' Custom toolbar item' ,
2931 align: ' left'
3032 };
31-
33+ var toolItem2 = {
34+ id: ' download' ,
35+ text: ' Save' ,
36+ tooltipText: ' Custom toolbar item' ,
37+ align: ' right'
38+ };
39+ var LanguageList = [' Typescript' , ' Javascript' , ' Angular' , ' C#' , ' C' , ' Python' ];
40+ var toolItem3 = {
41+ type: ' Input' ,
42+ tooltipText: ' Language List' ,
43+ cssClass: ' percentage' ,
44+ align: ' Left' ,
45+ id: ' dropdown' ,
46+ template: new ComboBox ({ width: 100 , value: ' TypeScript' , dataSource: LanguageList, popupWidth: 85 , showClearButton: false , readonly: false })
47+ };
48+ var toolItem4 = {
49+ type: ' Input' ,
50+ tooltipText: ' Text' ,
51+ align: ' Right' ,
52+ cssClass: ' find' ,
53+ id: ' textbox' ,
54+ template: new TextBox ({ width: 125 , placeholder: ' Type Here' })
55+ }
3256 return {
3357 documentPath: " https://cdn.syncfusion.com/content/pdf/form-designer.pdf" ,
3458 resourceUrl: " https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib" ,
35- toolItem: toolItem,
3659 toolbarSettings: {
37- toolbarItems: [toolItem, ' OpenOption' , ' PageNavigationTool' , ' MagnificationTool' , ' PanTool' , ' SelectionTool' , ' SearchOption' , ' PrintOption' , ' DownloadOption' , ' UndoRedoTool' , ' AnnotationEditTool' , ' FormDesignerEditTool' , ' CommentTool' , ' SubmitForm' ]
60+ toolbarItems: [toolItem1, toolItem2, ' OpenOption' , ' PageNavigationTool' , ' MagnificationTool' , toolItem3, ' PanTool' , ' SelectionTool' , ' SearchOption' , ' PrintOption' , ' DownloadOption' , ' UndoRedoTool' , ' AnnotationEditTool' , ' FormDesignerEditTool' , toolItem4 , ' CommentTool' , ' SubmitForm' ]
3861 }
3962 };
4063 },
@@ -55,7 +78,7 @@ export default {
5578 else if (args .item && args .item .id === ' download' ) {
5679 viewer .download ();
5780 }
58- }
81+ },
5982 }
6083}
6184 </script >
0 commit comments