-1

I needed to Hide the 'Open in New Window' button from the google viewer while i open my page using Iframe. (Button as extreme right side on top) for ex. https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true

actualy I dont want user to download the actual pdf file.

Isthere any way to acheive this? Many Thanks in advance

Ashok Gupta
  • 2,247
  • 5
  • 28
  • 34
  • The answer is already [here](http://stackoverflow.com/questions/7319528/google-doc-reader-remove-the-option-open-in-new-window). You can use it. – Bertram Gilfoyle Mar 29 '17 at 19:24

3 Answers3

1

It's very simple! just click on OPEN IN NEW WINDOW and in the new windows click on file and click of "prevent viewers from downloading". You must logged on your google account.

1

If that's the sample URL that you're opening from YOUR site in iframe (in other words, if you're framing a page from external site), there is NO way to do what you want. It will NOT be possible to access that frame's content from your page (security issues).

Google controls the content on their site, and there's nothing you can do beyond hosting your PDF's somewhere else and controlling the file-download (you still won't be able to show PDF content and prevent the user from copying it to their disk).

I wonder what your concern/reason is for preventing the user from saving the file to their disk...

-1

Copy and paste this line of code into your address bar and hit enter:

javascript:function a() {document.getElementById('openInViewerButtonIcon').style.display = 'none';} a();

It hides the button via JavaScript, setting the display css attribute to none. You could try to load the page in a Frame, making it possible to inject your on javascript.

Grrbrr404
  • 1,809
  • 15
  • 17