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:
parent
c3f2cb02c8
commit
8e4ca1fc23
@ -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()))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user