We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e43ad0 + e818b6a commit bb65b6aCopy full SHA for bb65b6a
src/VuePdfEditor.vue
@@ -282,6 +282,10 @@ export default {
282
type: String,
283
default: '',
284
},
285
+ initFile: {
286
+ type: [File, Blob, ArrayBuffer],
287
+ default: null,
288
+ },
289
initFileName: {
290
291
@@ -371,12 +375,13 @@ export default {
371
375
this.scale = parseFloat((this.scale - 0.1).toFixed(1))
372
376
373
377
async init() {
374
- if (!this.initFileSrc) {
378
+ const file = this.initFile || this.initFileSrc
379
+ if (!file) {
380
console.log('init file is not exist')
381
return
382
}
383
try {
- await this.addPDF(this.initFileSrc)
384
+ await this.addPDF(file)
385
this.selectedPageIndex = 0
386
fetchFont(this.currentFont)
387
this.narrowEnlargeShow = true
0 commit comments