How to disable pop-out option in PDF viewer using google doc iframe?

I am using the following code to display pdf using google with iframe .. It works fine. But I want to disable the "pop-out" option (which, after clicking the open PDF file button on a new tab with google documents) is displayed in the upper right corner next to the zoomin parameter on my web page. Is it possible?

I am currently using the following code -

<iframe src="http://docs.google.com/gview?url=http://example.com/files/myfile.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0">

+4
source share
2 answers

Run this javascript (sample with jQuery) on your page (I assume the class is the same for all clients)

$('.ndfHFb-c4YZDc-Wrql6b').remove();
0
source

. iframe. iframe.

var head = $("#iframe").contents().find("head");
var css = '<style type="text/css">' +
          '.ndfHFb-c4YZDc-Wrql6b{display:none}; ' +
          '</style>';
$(head).append(css);
0

All Articles