1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

HTML Help with PDF files

Discussion in 'Web Development' started by smfdadmin, Oct 13, 2008.

  1. smfdadmin

    smfdadmin New Member

    Website Link: www.stmarysfd.com/pressrelease

    I take the PDF file and put it in the pdf folder on my site...then I link to it as such:

    <a href="/Pdf/2007firepicture.pdf">


    yet it is not working. Can anyone help tell me what I am doing wrong :p
     
  2. smfdadmin

    smfdadmin New Member

  3. SpAz

    SpAz New Member

    What are you trying to display it as? a link? image?

    Right now you have it displayed as a link

    First off you're going to want to make sure your hosting provider allows PDF files. If not, then you're outta luck with that unless you can add file extensions yourself through a Cpanel.

    As far as I can see by clicking the link, you don't have the right directory chosen where the pdf file is located... hence the error page that comes up for 000webhost.com

    Make sure your file location and links are correct.
     
  4. smfdadmin

    smfdadmin New Member

    I am trying to display it as a link, so the resident can click on the pdf...open on their screen...and they can print as needed.

    I checked my directorys and the files on my server and it is all in the right spot. I'm not sure what is going. I'll check the host to see if the pdf files are allowed.
     
  5. smfdadmin

    smfdadmin New Member

    Checked with host and they support them.

    any ideas?
     
  6. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    <a href="/Pdf/2007firepicture.pdf"> "your code"

    try this code <a href="Pdf/2007firepicture.pdf">
    if not try <a href="../Pdf/2007firepicture.pdf">
    and is your spelling correct, check upper/lower case.

    If that doesn't work try adding this code to your page right before your file download code. It allows for any file name with a pdf extionsion.

    <?php
    header("Content-Type: application/pdf");
    header("Content-Disposition: attachment;");
    ?>