diff --git a/qutebrowser/browser/webpage.py b/qutebrowser/browser/webpage.py index 816662ef1..1acf50884 100644 --- a/qutebrowser/browser/webpage.py +++ b/qutebrowser/browser/webpage.py @@ -309,8 +309,8 @@ class BrowserPage(QWebPage): elif mimetype in {'application/pdf', 'application/x-pdf'}: # Use pdf.js to display the page html_page = _generate_pdfjs(reply) - #url = reply.url() - url = QUrl('qute://pdfjs/web/viewer.js') + url = reply.url() + #url = QUrl('qute://pdfjs/web/viewer.js') self.mainFrame().setContent(html_page.encode('utf-8'), 'text/html', url) reply.deleteLater() diff --git a/qutebrowser/pdfjs/web/compressed.tracemonkey-pldi-09.pdf b/qutebrowser/pdfjs/web/compressed.tracemonkey-pldi-09.pdf deleted file mode 100644 index 65570184a..000000000 Binary files a/qutebrowser/pdfjs/web/compressed.tracemonkey-pldi-09.pdf and /dev/null differ diff --git a/qutebrowser/pdfjs/web/viewer.html b/qutebrowser/pdfjs/web/viewer.html index 4599ad8ec..d0ccb2c0e 100644 --- a/qutebrowser/pdfjs/web/viewer.html +++ b/qutebrowser/pdfjs/web/viewer.html @@ -1,4 +1,4 @@ - + - - - + + + - - + + diff --git a/qutebrowser/pdfjs/web/viewer.js b/qutebrowser/pdfjs/web/viewer.js index 4e51de074..19835f714 100644 --- a/qutebrowser/pdfjs/web/viewer.js +++ b/qutebrowser/pdfjs/web/viewer.js @@ -36,9 +36,9 @@ var SCALE_SELECT_PADDING = 22; var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; -PDFJS.imageResourcesPath = './images/'; - PDFJS.workerSrc = '../build/pdf.worker.js'; - PDFJS.cMapUrl = '../web/cmaps/'; +PDFJS.imageResourcesPath = 'qute://pdfjs/web/images/'; + PDFJS.workerSrc = 'qute://pdfjs/build/pdf.worker.js'; + PDFJS.cMapUrl = 'qute://pdfjs/web/cmaps/'; PDFJS.cMapPacked = true; var mozL10n = document.mozL10n || document.webL10n;