How to display PDF file in HTML?

vivek picture vivek · Jul 22, 2013 · Viewed 594.2k times · Source

I have an auto generated PDF file by itext and I need to display that PDF file in HTML. My question is: How to display a local PDF file in HTML using pdf.js? Should that PDF file be generated by some standards?

Answer

Gofilord picture Gofilord · Mar 21, 2014

Implementation of a PDF file in your HTML web-page is very easy.

<embed src="file_name.pdf" width="800px" height="2100px" />

Make sure to change the width and height for your needs. Good luck!