Hi guys,
is it possible to view a pdf (stored in a server) in a WebView?
like this for example:
<Panel>
<NativeViewHost>
<WebView Url="http://www.domain.com/pdf/example.pdf"/>
</NativeViewHost>
</Panel>
Hi guys,
is it possible to view a pdf (stored in a server) in a WebView?
like this for example:
<Panel>
<NativeViewHost>
<WebView Url="http://www.domain.com/pdf/example.pdf"/>
</NativeViewHost>
</Panel>
Hi guys. I need a solution. Anyone can help? Thanks
If you are accessing it online and google services are available to your audience you can use Google’s PDF viewer. Something like the below will render the pdf:
<Panel>
<NativeViewHost>
<WebView Url="https://docs.google.com/gview?embedded=true&url=http://www.domain.com/pdf/example.pdf"/>
</NativeViewHost>
</Panel>
If you are trying to view a local PDF it is bit more tricky, you can use LaunchUri
and inform the user they need to have a PDF viewer on their device.
Hi skezo.
The google pdf viewer works. But like that you have the possibility to save the pdf, and i dont want that…
Any solutions?
Why the webview cant display a pdf?
Why the webview cant display a pdf?
Because, as far as I know, the webviews provided by Apple and Google for iOS and Android don’t have PDF-support. Fuse simply provides an abstraction for using the resources made available by the underlying platform.
If you check stackoverflow and other sites it seems like this is a quite common complaint when it comes to WebViews. There are some suggested workarounds (from using docs as mentioned above, to using PDF-plugins written entirely in HTML & JS). My best advice is to check around and see if any of those will let you do what you want.
I checked around and tons of people have the same problem :\