Embed pdf in Iframe is not working in IE and Edge browser.

Direct pdf embed approach is not working fine in IE and Edge browsers due to some browser specific security issues.
So we can use below alternative approach to embed the pdf link in Iframe.

<iframe src="https://docs.google.com/gview?url=your-pdf-link/&embedded=true"></iframe>

Example Code:
<iframe src="https://docs.google.com/gview?url=http://frontendevelopmenttutorial.com/samplePDF.pdf&embedded=true"></iframe>

In the above syntax, just replace the actual PDF link in your-pdf-link position.

This method will work fine.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *