eclipsesource / tabris-js

Create native mobile apps in JavaScript or TypeScript.
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
1.4k stars 170 forks source link

When using the WebView, allow PDFs to be opened (works on iOS, but not Android) #2215

Open violuke opened 2 years ago

violuke commented 2 years ago

Feature description

Allow links to PDF documents within a WebView to work.

Proposed solution

Open the PDF and ideally also allow printing. Thanks.

cookieguru commented 2 years ago

Opening PDFs on Android can be...complicated. Does this happen with multiple devices? Or better yet: can you reproduce this on a "fresh" device e.g. the Android Emulator? It could be that the device in question (not sure what you're using since you removed that part from the issue template) has a PDF viewer that is crashing or there isn't one installed (oddly a native viewer is not bundled with the OS). Better Open With is a good tool for intercepting app links to ensure something is indeed happening. Lastly, logcat output can help pinpoint issues. And depending on your use case you could intercept the tap on the link to the PDF and open it in a PDFView