LINK

Here is my link I'm keeping my pdf file (path.pdf) in the resources folder and am trying to click this link to open the pdf. When I click it while running local the error is " Your file was not found It may have been moved or deleted."

It's clearly there. ive checked, spell checked, and tried changing the location of the pdf file. HTML pages link just fine.

Thanks

5

2 Answers

Since you have not clarified for us whether you are using a local host or just viewing the text file in the browser I will assume the latter.

In this case, you would have your anchor tag and in the href attribute put the location of the file

<a href="C:\Users\Shannon Myers\Documents\Biology-DNA\teen_time_report.pdf">ok</a> 

In the above example I started from my C: drive and went from there. Also you could do it as follows:

<a href="Resources\teen_time_report.pdf">ok</a> 

This should link to the pdf file that you have in mind, as long as the resources folder and html file are in the same folder.

If you use local host you can use

<a href="./pdfFile.pdf" target="blank">PdfFile</a> 

it will open new tab in you brower and starts to download the file.

If you hosting like netlify

<a href="./pdfFile.pdf" target="blank">PdfFile</a> 

It will open a new tab showing your pdf file.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy