rakk92
rakk92

Reputation: 67

IFrame issue using google docs viewer

I am trying to embed a PDF document using google docs viewer:

<iframe src="http://docs.google.com/gview?url=MY_FILE_URL&amp;embedded=true" style="border: none;" height="900" width="100%"></iframe>

and Its working fine, but when I try to refresh the page multiple times.. sometimes IFrame content does show up and some other times It doesn't,and I get an empty head and body inside "IFrame " tag

nothing seems to solve my problem..

Upvotes: 1

Views: 4173

Answers (1)

DigitalDesigner
DigitalDesigner

Reputation: 284

you are not accessing the https version is the issue. I had the same issue

change:

 <iframe src="http://docs.google.com/gview?url=MY_FILE_URL&amp;embedded=true" style="border: none;" height="900" width="100%"></iframe>

to

 <iframe src="https://docs.google.com/gview?url=MY_FILE_URL&=embedded=true" style="border: none;" height="900" width="100%"></iframe>

hope that helps :)

Upvotes: 2

Related Questions