Display PDF file or link from WebView (Android)
unobatbayar opened this issue · comments
Hello!
Thank you for great package and clean code. Is it possible to add pdf
support for WebView
?
Service
- WebView
Hello. @unobatbayar.
Thank you for using GPM.
In iOS, PDF is displayed.
Android will be downloaded if you have permissions.
I will let you know the contents after discussing it internally.
Thank you.
Hello. @unobatbayar.
We couldn't find a way to officially support it in Android WebView.
You can display the PDF in the following way.
GpmWebView.ShowUrl("https://docs.google.com/gview?embedded=true&url=pdf url", ...)
If you have any other ideas, please let us know.
If you have any questions, please feel free to contact us.
Thank you.
I highly value your time. It works!
Hello. @unobatbayar.
We couldn't find a way to officially support it in Android WebView. You can display the PDF in the following way.
GpmWebView.ShowUrl("https://docs.google.com/gview?embedded=true&url=pdf url", ...)If you have any other ideas, please let us know.
If you have any questions, please feel free to contact us. Thank you.
I have tried out this method using a pdf url. There are two observations here
- The file gets downloaded directly into the file systems instead of rendering on the WebView.
- Or the WebView gives a 404 - Not Found error. ( using url - link )