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.
Apache License 2.0
41 stars 9 forks source link

Web page not available #7

Closed ElHadjiAlyKane closed 9 months ago

ElHadjiAlyKane commented 9 months ago

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)

develtar commented 9 months ago

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.

develtar commented 9 months ago

Duplicate of #6