@@ -16,25 +16,48 @@ import Vue from 'vue';
16
16
import { PdfViewerPlugin , Toolbar , Magnification , Navigation , LinkAnnotation ,
17
17
BookmarkView , ThumbnailView , Print , TextSelection , TextSearch ,
18
18
Annotation , FormDesigner , FormFields } from ' @syncfusion/ej2-vue-pdfviewer' ;
19
+ import { ComboBox } from " @syncfusion/ej2-dropdowns" ;
20
+ import { TextBox } from " @syncfusion/ej2-inputs" ;
19
21
Vue .use (PdfViewerPlugin);
20
22
var viewer;
21
23
export default {
22
24
name: ' app' ,
23
25
data () {
24
26
// Move the toolItem declaration inside the data function
25
- var toolItem = {
27
+ var toolItem1 = {
26
28
prefixIcon: ' e-icons e-paste' ,
27
29
id: ' print' ,
28
30
tooltipText: ' Custom toolbar item' ,
29
31
align: ' left'
30
32
};
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
+ }
32
56
return {
33
57
documentPath: " https://cdn.syncfusion.com/content/pdf/form-designer.pdf" ,
34
58
resourceUrl: " https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib" ,
35
- toolItem: toolItem,
36
59
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' ]
38
61
}
39
62
};
40
63
},
@@ -55,7 +78,7 @@ export default {
55
78
else if (args .item && args .item .id === ' download' ) {
56
79
viewer .download ();
57
80
}
58
- }
81
+ },
59
82
}
60
83
}
61
84
</script >
0 commit comments