DISCOVER
×

How to Display a PDF File in an HTML Web Page

Video transcription

Hi, my name's Dave Andrews. Today I'm going to show you how to display a PDF in an HTML web page. Let's go to the computer and on my desktop, I have a file here portfolio.pdf which is my portfolio. Also have mypage.htm. If I open up mypage.htm with notepad, you can see the HTML code that makes up this web page. I have a basic HTML with a body in it and I've inserted inside of here a iframe and the source of that iframe is portfolio.pdf. Its width and height are set to 50% so it will cover one half of the screen width-wise and one half of the screen height-wise. Now I've also just below that put in an anchor pointing to my portfolio actually on my web page which is DaveAndrews.org/portfolio.pdf. Now let's open up that page. And as you can see, covering half of the screen height-wise as well as half of the screen width-wise is this PDF file that is my professional portfolio. Directly below that is a link to my portfolio on the web. When I click that link, its opening up the PDF and displaying it full screen within the web browser. My name is Dave Andrews and I've showed you how to display a PDF within an HTML web page.

Loading ...