I am loading the pdf documents in WebView through appending the pdf url to google doc api
http://docs.google.com/gview?embedded=true&url=myurl
Pdf is loading just fine but the webpage displays two options - Zoom-in
and Pop-Out
. Is there any way to disable/hide pop-out option by sending some param? Any help would be appreciated.Thanks in advance!
You can add this callback and in a result "pop-out" button will be removed.
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
mWebView.loadUrl("javascript:(function() { " +
"document.querySelector('[role=\"toolbar\"]').remove();})()");
}
Note: If you want to now show this button at all, make your web view visible after applying last javascript code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With