SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: PDF files

  1. #1
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question PDF files

    Hi All,
    Got a quick question, Can someone give me the HTML markup, so that my visitors can download/print a PDF fille?
    For sake of argument, call the file Old Tony PDF,
    (well I am old)
    Tony

  2. #2
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You just create a link to the pdf file, like any other link...their browser will handle the rest.

    Code:
    <a href="/files/old-tony-pdf.pdf">Old Tony PDF</a>
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches

  3. #3
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Possibility
    <a href="/files/QES-application-pdf.pdf">QES Membership Application</a>
    The mark-up is in my HTML FILE for the page,(as above), The PDF file is in a new folder called files. So it has been treated in the same way as an image file. The site is not live still buildind, no CSS yet, but clicking my new link does not open the PDF file.
    Sorry to be a pest.
    Tony
    PS A question in ignorance: Do I have tocreate a blank HTML file to display the PDF file?
    Last edited by tonyjs2902; Aug 7, 2008 at 09:06. Reason: Additional question

  4. #4
    SitePoint Zealot c.t.c.'s Avatar
    Join Date
    Apr 2007
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you running a web server on your local machine? If not, you'll need to use a relative path to point to the PDF file. If the PDF file is in the same directory as the HTML file, just use the filename of the PDF file as the path.

    Code HTML4Strict:
    <a href="old-tony-pdf.pdf">Old Tony PDF</a>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •