PDA

View Full Version : Qt 5.15.0 WebEngineView not displaying PDF



youngw
5th June 2020, 03:33
I was using Qt 5.14.2 to display local PDF files successfully using WebEngineView. (I'm on CentOS 7)

Then I updated to Qt 5.15.0 and my WebEngineView showed a blank gray screen.
Then I ran an example of WebEngineView provided by Qt 5.15.0 and I got the same blank gray screen. However I got half a dozen error messages like the following one:

"GET chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-error-screen.js net::ERR_FILE_NOT_FOUND"

Am I missing something?

ChrisW67
5th June 2020, 22:07
Have you turned on loading plugins and the PDF viewer?
https://doc.qt.io/qt-5/qtwebengine-features.html#pdf-file-viewing

youngw
6th June 2020, 17:34
Yes I have.
I did a quick test. I ran the qt example quicknanobrowser with qt 15.4 and it displayed PDF fine. Then I ran the same example with 15.5 and I got blank gray screen.

ChrisW67
8th June 2020, 12:23
Same here if I use the binaries distributed by the online installer.
My best guess is that the package is missing the resource files that provide the Javascript for the PDF viewer, or that the behaviour is the result of the deprecation warned of in the 5.14.2 version:

js: HTML Imports is deprecated and will be removed in M80, around February 2020. Please use ES modules instead. See https://www.chromestatus.com/features/5144752345317376 and https://developers.google.com/web/updates/2019/07/web-components-time-to-upgrade for more details.