develtar / qt-pdf-viewer-library

The qt-pdf-viewer-library is a qml wrapper of pdf.js library which allows you to render PDF files in a WebView. This library also works on Android devices, and it uses WebSocketServer, WebSocketTransport and WebChannel to exchange data between qml and the browser environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web page not available

ElHadjiAlyKane opened this issue · comments

I compiled the example available with your project. The application compiles and runs on the Android device. The problem is that the web view reports that the web page cannot be loaded: file:///data/user/0/it.ltdev.qt.pdfviewer/files/libs/pdfjs/viewer.html.
At the web page of Qt Creator, the application reports : I chromium: [INFO:CONSOLE(1)] "Uncaught ReferenceError: loadDocument is not defined", source: chrome-error://chromewebdata/ (1)

Hi @ElHadjiAlyKane, the problem is the same of issue #6

It is related to the latest changes in the android SDK: since API level 30 the native Android WebView has the file access disabled by default.

Duplicate of #6