Alex Rivera | Logout

How to embed a PDF file in a web site?

Asked 2010-11-02T22:29:25.720
10

I simply want to embed a PDF file in a web site.

The best solution I've found is Google Docs Viewer (http://docs.google.com/viewer), but it does not work for IE and obviously that is not going to work for me.

Anyone have a clean, easy solution to this?

Update: I should add that one of the benefits of embedding the PDF file the Google viewer way is that as the PDF file I link to gets updated (and it could without notice to me), my site would automatically be holding the same PDF file (provided the full pathname doesn't change, which it does not). For this reason converting the file to an image is not preferred while.

Edit
Report

2 Answers

5

If you do stick with the pdf embedded option, Byron is right although embedded pdf files don't look so great on a webpage. Anyway, be sure to be strict about the coding. Hence:

<iframe src="path/to/pdf" width=500 height = 700>

Should be

<iframe src="path/to/pdf" width="500" height="700">

Small alteration.

answered 2010-11-03T04:07:22.567
1

I just ftp mine, I do not use Google or any other s/w

you must have some need other than a PDF file sitting in a directory, what is it?

Also, why would you convert the image (and reduce PDF resolution and clarity) ?

Response to Comments

That is the ugliest thing I have seen since my last trip to Africa. You are not seriously thinking of posting that much information on a single page, are you. No one can read it, and I tried every magnification.

For that amount of info, you need to take an architectural approach.

  1. Put a few controls on the front page, and feed the user a small amount of manageable info, about the area that they chose. Only.

    Get the info from the source website/database and feed it into your website/database. Only needs to change when the source data changes. The whole linkage can be automated.

    Then you just create nice clean pages, with a reasonable quantity of info, in a readable form, on each page.

  2. This is a 20th Century Timetable. Note, not a 21st century timetable (look at Berlin or München for one of those). You really can't just scan an intense doc and provide it as an embedded PDF.

    • Note that you do not need the elaborate controls of CityRail. you can have just a few to allow select of the line and timetable.
    • then produce a page that is a simple form of the CityRail page.
    • or (the absolute minimum) one fully viewable, full size PDF per web page.
      .
  3. Like this simple viewable PDF. That example could be served up in one PDF for page 1 and 4 separate PDF pages for the rest; PDFs already have basic navigation, so I

answered 2010-12-12T13:35:50.400

Your Answer