Linking in html to a .pdf file

Posted on 2004-11-05
Last Modified: 2010-04-17
We have an Intranet and I am trying to create a link of the main page in html to a .pdf file.  I am using the syntax: scheme://host.domain/path/filename.  I have stored the pdf on a NAS, the web server and my machine but it will give a 404 error when the link is clicked.  Examples include <a href="file://earth.dwma./shares_SNAP1/IT/MUTCD/mutcd_03.pdf">MUTCD </a> for a network server and href="file://mars.dwma./c:/mutcd_03.pdf">MUTCD </a>  for the web server.  Any assitance offered would be greatly appreciated.  
Question by:regsamp
    LVL 48

    Expert Comment

    the path is wrong

    Author Comment

    What is wrong with the path if that is the exact location?
    LVL 1

    Accepted Solution

    If the file is on a network share, link to it with:
    <a href="\\earth\shares_SNAP1\IT\MUTCD\mutcd_03.pdf">MUTCD</a>

    If the file is on the web server, place it in the same folder as the html file and link to it with:
    <a href="mutcd_03.pdf">MUTCD</a>

    You won't be able to link to it from your machine unless you set your machine up as a network share.

    Hope this helps!

    Author Comment

    The network share helped.  Thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Title # Comments Views Activity
    has22 challenge 11 56
    scoreUp challenge 14 40
    WPF - External data binding to controls inside a UserControl 2 35
    strDist challenge 35 69
    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now