Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove the default border and toolbar while showing a doc in google docs viewer

I am working on an android app which should be able to show pdfs in the app. I am using google docs viewer to show pdf. But the problem I face while using google docs viewer is, it is showing a thick border around the document and also a toolbar which has zoom and other controls on it. Is there any way to remove the border and the tool bar such that all the screen space is occupied by only the pdf doc.

Thanks..

like image 883
Sampath Pasupunuri Avatar asked Oct 23 '25 15:10

Sampath Pasupunuri


1 Answers

The answer could be found in this link to a similar Stack Overflow issue. If you are using a Web View to present the URL to the pdf file, then you should check the following:

  • Google Docs viewer before your URL: https://docs.google.com/viewer?url=
  • Embedded parameter: embedded=true

So, if the URL to the .pdf file is http://my.urlto.pdf then, in order to be previewed using Google Docs Viewer via the Web View component, you should have the following:

https://docs.google.com/viewer?embedded=true&url=http://my.urlto.pdf

This way you can preview the file without the toolbar.

like image 140
Thunderlight Avatar answered Oct 27 '25 00:10

Thunderlight



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!