pdfjs: use PDFView.open instead of PDFView.load

Now we get a nice loading bar at the top of the page.
This commit is contained in:
Daniel Schadt 2015-11-24 14:19:49 +01:00
parent c3f2cb02c8
commit 8e4ca1fc23

View File

@ -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()))