Set disableCreateObjectURL for PDF.js
We can't use blob URLs or we'll get a renderer crash: https://bugreports.qt.io/browse/QTBUG-70420 Thankfully, we can tell PDF.js to use data: URLs instead.
This commit is contained in:
parent
bbcb87e434
commit
c40ddf37b7
@ -69,6 +69,7 @@ def _generate_pdfjs_script(url):
|
||||
"""
|
||||
return (
|
||||
'document.addEventListener("DOMContentLoaded", function() {{\n'
|
||||
' PDFJS.disableCreateObjectURL = true;\n'
|
||||
' PDFJS.verbosity = PDFJS.VERBOSITY_LEVELS.info;\n'
|
||||
' (window.PDFView || window.PDFViewerApplication).open("{url}");\n'
|
||||
'}});\n'
|
||||
|
Loading…
Reference in New Issue
Block a user