eHow launches Android app: Get the best of eHow on the go.

How To

How to Display a PDF File in a HTML Web Page

Contributor
By Heather U.
eHow Contributing Writer
(13 Ratings)

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.

Difficulty: Moderately Easy
Instructions
  1. Step 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. Step 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. Step 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. Step 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">.

Tips & Warnings
  • Embedding the PDF isn't the best way to display it if the document is going to be viewed by people using different browsers because it may not look as you intended it to.

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics