javascriptiframegoogle-docsgoogle-docs-apigoogle-document-viewer

Google Doc - how to remove the header while using it in iframe?


How to remove or hide this header section: (zoom in , out, page number, back, next, popup)

enter image description here

while using this method:

<iframe src="http://docs.google.com/gview?url=http://www.webiste.com/pdffiles.pdf&embedded=true" 
style="width:750px; height:5190px;" frameborder="0"></iframe>   

Solution

  • you have to target each element in javascript and hide them.

    function hideelements() {
         document.getElementById('element id which you want to hide').style.dispaly = 'none';
    }
    

    This is javascript code which will help you. you have to call function on loading event so it will hide your elemenets.