Skip to content

Issue when pdfjs is not stored in server root #122

Answered by Gramok
Gramok asked this question in Q&A
Discussion options

You must be logged in to vote

Update: issue seems to be this code in QPdfviewer.js:

    __renderIFramePDFJS (h) {
      return h('iframe', {
        staticClass: 'q-pdfviewer__iframe',
        attrs: {
          src: 'pdfjs/web/viewer.html?file=' + encodeURIComponent(this.src),
          width: '100%',
          height: '100%'
        }
      }, [
        // iframe not supported either, give user a link to download
        this.__renderText(h)
      ])
    },

Fixed it for me when changing src:

    __renderIFramePDFJS (h) {
      return h('iframe', {
        staticClass: 'q-pdfviewer__iframe',
        attrs: {
          src: './pdfjs/web/viewer.html?file=' + encodeURIComponent(this.src),
          width: '100%',

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gramok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant