Thursday, May 5, 2011

Display a PDF File in a HTML Web Page

How to Display a PDF File in a HTML Web Pagethumbnail 

Just because you create a web page in HTML doesn't mean that you only have to display information in HTML. Using hyperlinks on your web page you can easily display Word documents, images, flash movies and even PDF documents. In this tutorial, you will learn how to quickly and easily use simple HTML code to links to a PDF document. Although this tutorial is specific to the PDF document, you can use the same logic to create links to other types of documents on your website. Another option for displaying a PDF on an HTML web page is to embed the document.

 

1. Save the PDF you wish to link to on a local drive on your computer. It's good practice to save all the documents you make available on your website in one location in case you ever have to upload or locate information quickly.

2. Upload the PDF to your web host. How this is done depends on your host. If you have any problems, check your host's FAQ or customer service. Before moving on to the next step, take note of the path of the file.

3. To have the PDF open in another window, type this following code: <a target=\"_blank\" href=\"NAME OF FILE.pdf\" title=\"\">NAME OF LINK AS YOU WANT IT TO APPEAR </a>. If you do not wish for the PDF to open in another window, then the command is <a href=\"NAME OF FILE.pdf\" title=>NAME OF LINK AS YOU WANT IT TO APPEAR</a>. Document usually open in separate windows. This is where the basic HTML skills will come in handy. The example shows a file that is on the same level as the page. If the file is save in another folder, then you will type FOLDER NAME\\NAME OF FILE.pdf. The further away the document is from the page, the

4.If you'd rather embed the PDF in the HTML window, you will have to point the page to a document and then specify the height and width of the PDF so the HTML window is the correct size. The command is <embed src=\"NAME OF FILE.pdf\" width=\"500\" height=\"375\">.

No comments:

Post a Comment