|
<ejs-button ref="imageBtn" v-on:click.native="imageClicked">AddImage</ejs-button>
<ejs-pdfviewer id="pdfViewer" ref="pdfviewer" :serviceUrl="serviceUrl" :documentPath="documentPath" :documentLoad="documentLoad"> </ejs-pdfviewer>
var viewer;
export default {
name: 'app',
data () {
return {
documentPath:"PDF_Succinctly.pdf"
};
},
provide: {
PdfViewer: [Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, Annotation, ThumbnailView, Print, TextSelection, TextSearch]
},
methods: {
imageClicked: function (args) {
viewer.customStampSettings = { customStamps: [{ customStampImageSource: "base64string", customStampName: "image" }], isAddToMenu: true };
},
documentLoad: function (args) {
viewer = this.$refs.pdfviewer.ej2Instances;
},
}
}
|