-
Hi - I'm trying to use qpdfviewer/pdfjs with a SPA which is hosted in a subfolder (e.g. https://test.local/myspa) When opening a Pdf file with type=pdfjs it tries to load Can this be set in Quasar or qpdfviewer? |
Beta Was this translation helpful? Give feedback.
Answered by
Gramok
Oct 19, 2022
Replies: 1 comment
-
Update: issue seems to be this code in __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 __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)
])
}, Not sure if this will break the extension in other scenarios - but my prod is now working like my dev. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Gramok
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: issue seems to be this code in
QPdfviewer.js
:Fixed it for me when changing
src
: