nhn / gpm.unity

A brand of NHN providing free services required for game development.

Home Page:https://gameplatform.nhncloud.com/en/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

@taehyeon-nhn

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

  1. The file gets downloaded directly into the file systems instead of rendering on the WebView.
  2. Or the WebView gives a 404 - Not Found error. ( using url - link )