diff --git a/qutebrowser/browser/pdfjs.py b/qutebrowser/browser/pdfjs.py index 5d5e8aa00..0aadac377 100644 --- a/qutebrowser/browser/pdfjs.py +++ b/qutebrowser/browser/pdfjs.py @@ -55,9 +55,7 @@ def _generate_pdfjs_script(url): url: The url of the pdf page as QUrl. """ return ( - 'PDFJS.getDocument("{url}").then(function(pdf) {{\n' - ' PDFView.load(pdf);\n' - '}});' + 'PDFView.open("{url}");\n' ).format(url=webelem.javascript_escape(url.toString()))