Can i know how to i view my PDF using webview? I am loading local html file with hyperlink that links to local pdf file which i uploaded into media. when i click the hyperlink nothing happened.
Below is my attached AIA file.
PDFWebview.aia (170.3 KB)
A WebView component is not a "full" browser, there are many things it can't handle and PDF is one of them.
However, there is an advanced WebView extension which might work with PDF:
Download latest version here
1.Introduction
It is an extended version of web viewer with more customization and flexibility. Its customization and additional features make it different and much more better than Web Viewer from the perspective of App Developer as well as User.
Note: CustomWebView can work only on devices running on at least Android 5.0
Latest Version : 12
Required Api : 21
Released: 2020-05-12T18:30:00Z (UTC)
Last Updated: 2023-03-08T18:30:00Z (UTC)
2.Features
More cus…
Thanks for the advice. However, i cant find any read PDF extension in it.
TIMAI2
January 14, 2023, 2:26pm
4
There are several pdf reader extensions for local pdfs
Search here:
patel
January 15, 2023, 8:22am
5
Extension or ActivityStarter ? Which do you prefer ?
Either way is fine. Which one is most preferred way ?
That's the tricky bit. The extensions/Activity Starter want to load the PDF directly, not via an HTML hyperlink. Also, the PDF cannot be stored in the App Assets, it would have to be in the shared directory 'Documents' or it's own ASD.
Try:
Works on Android 10 and below. I think an extension may be required if you need to use Android 11+
Thanks for the guide. If I have a lot of pdf to view, would that make it alot of block?
Nope - just list them in a List Block
Do you want to select them from a Pick List?
PDFWebview.aia (170.3 KB)
The Sample Project assumes you have the PDF files in '/Documents'