Juraj
Juraj

Reputation: 141

Disable/Hide download button in iframe on default PDF Viewer

i am using #toolbar=0&navpanes=0&scrollbar=0 in iframe url for disabling toolbar but in Mozzila it doesn't work. I tryed to import javascript into iframe, but the same result.... iframe:

<iframe ?wmode="transparent" type="application/pdf" id="iframe" src="'.$url.'#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="685"></iframe>

used js:

jQuery('#iframe').load(function(){
    jQuery('#iframe').contents().find("#toolbarViewerRight").hide();
});

Any idea, how can i disable/remove/hide this toolbar or only download button?

Upvotes: 14

Views: 77972

Answers (3)

Vijay Lathiya
Vijay Lathiya

Reputation: 1227

Use #toolbar=0 after your .pdf file name in src

<iframe src="your-pdf-name.pdf#toolbar=0"></iframe>

Upvotes: 37

user8565193
user8565193

Reputation: 67

Try using embed tag instead iframe tag, like this:

<embed src="http://host/yourpdf.pdf#toolbar=0" style="width:600px; height:500px;">

Upvotes: 3

kenneth
kenneth

Reputation: 49

Try the following:

<iframe src="kd/kd.pdf?page=hsn#toolbar=0" width="100%" height="1000" id="iframe11">
</iframe>

Upvotes: 4

Related Questions