Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want Google Docs embeddable PDF viewer not to display "open external" link

I am making a pdf viewer using google doc viewer. I am facing an issue. I don't want the user to download the pdf. If user clicks open external button, an external application is opened and pdf can be viewed. I don't want that button. What can I do?

Please see the attached image.

enter image description here

like image 555
Ali Zia Avatar asked Sep 01 '16 11:09

Ali Zia


People also ask

Can a PDF be embedded in a Google Doc?

Once you have your PDF converted to an image, you can simply insert it in Google Docs like any other image.

How do I preview a PDF in Google Drive?

You'll see the new preview automatically if you open a photo, video, or PDF. To see a preview of a Google document, right-click on the file name and select “preview.” Once the preview window is open, you can click on the arrows on either side to flip to other files.


1 Answers

Add rm=minimal to the URL and you will scale of features from your viewer.

Here is an example with rm=minimal in the URL: https://docs.google.com/spreadsheets/d/1byEvnxDkjQ49GNqRldHJyBrptlibFVItO_eneLypWic/edit?rm=minimal#gid=0

enter image description here

And here is an example without rm=minimal in the URL: https://docs.google.com/spreadsheets/d/1byEvnxDkjQ49GNqRldHJyBrptlibFVItO_eneLypWic/edit#gid=0

enter image description here

I think that what you can´t remove with rm=minimal can´t be removed unfortunately.

Update
If rm-minimal can´t scale of what you want you could try to remove the element by jQuery with: $(".ndfHFb-c4YZDc-Wrql6b-SmKAyb").remove(); or by CSS: .css('display','none')

like image 82
Rashwan L Avatar answered Nov 11 '22 19:11

Rashwan L