chore: debug
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
|
||||
<script>
|
||||
import * as Vue from 'vue'
|
||||
import * as PDF from 'pdfjs-dist/es5/build/pdf.js'
|
||||
import PDFWorker from 'pdfjs-dist/es5/build/pdf.worker.js'
|
||||
import * as PDF from 'pdfjs-dist/legacy/build/pdf.js'
|
||||
import PDFWorker from 'pdfjs-dist/legacy/build/pdf.worker.js'
|
||||
import IFrameV3 from '../IFrame/IFrameV3'
|
||||
import IFrame from '../IFrame/IFrame.vue'
|
||||
import throttle from '../../utils/throttle'
|
||||
@@ -260,12 +260,12 @@ export default {
|
||||
const filename = PDF.getFilenameFromUrl(this.source)
|
||||
this.$emit('update:filename', filename)
|
||||
|
||||
const documentLoadingTask = PDF.getDocument(this.source)
|
||||
// const documentLoadingTask = PDF.getDocument({
|
||||
// url: this.source,
|
||||
// cMapPacked: true,
|
||||
// cMapUrl: 'https://unpkg.com/browse/pdfjs-dist@2.2.228/cmaps/',
|
||||
// })
|
||||
// const documentLoadingTask = PDF.getDocument(this.source)
|
||||
const documentLoadingTask = PDF.getDocument({
|
||||
url: this.source,
|
||||
cMapPacked: true,
|
||||
cMapUrl: 'https://unpkg.com/browse/pdfjs-dist@2.2.228/cmaps/',
|
||||
})
|
||||
documentLoadingTask.onPassword = (callback, reason) => {
|
||||
const retry = reason === PDF.PasswordResponses.INCORRECT_PASSWORD
|
||||
this.$emit('password-requested', {
|
||||
|
||||
Reference in New Issue
Block a user