Linking to pdf documents

liunx

Guest
I have some links to a pdf document in an html page. Now, I wonder if it is possible to have my links point to particular pages within the pdf document or even to particular sections. <br />
I'll appreciate your help.<!--content-->OK, I found the way to do it. It is to add #page=pagenum to the link. But the problem is that this is not working. I get something like "page can not be displayed" when I add the page number. Why could this be happening?<br />
I am having a hard time with this, so I'll appreciate your help very much.<!--content-->Hi Alex<br />
I am new to this forum and am very interested in your problem. I too am trying to post a pdf on a website, but I don't know where to begin. Could you explain the process? What code will render the document on the website? <br />
Thanks<!--content-->A browser does not natively view PDF it requires a helper application such as Adobe Acrobat to view the file itself.<!--content-->Thanks Robert. From my question I suppose you can tell I am a TRUE NOVICE learning fast. I appreciate your input!!<!--content-->Mikeytoo:<br />
You link to a pdf file the same way you link to an html file. If you have the pdf file in the same directory as the html file that links to it, you don't need to specify a path. In Frontpage or dreamweaver, select the text that you want to convert in a link, right click, and in the context menu that appears, choose "Make link" or something similar and browse to the pdf file you want to link to. If you are using notepad or other text editor, just make the following tag:<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"myfile.pdf"> My File </a> <br />
(I hope I got the syntax right). <br />
Most people have Adobe Acrobat already installed in their computer. When they click on the link, Acrobat opens (often inside the browser window) and displays the pdf document. If they don't have Acrobat, they get a message prompting them to Download <!--more--> it from the web. You can make it easier for you visitors by including a button on page that takes them to the Adobe Acrobat Download <!--more--> site. <br />
Probably you know that when you link to an html page, you can make the link to open that page at a particular place, which is specially useful if the page is very long. I wanted to do the same when linking to a pdf file, and I found the code to do that, as I posted before. The problem is that that code didn't work for me. <br />
I was hoping someone would be able to help me. Maybe Robert knows something about this. <br />
-Alex-<!--content-->http://www.xhtmlcoder.com/worthvalley/wvyfc11.php as you can tell it is good to add the MIME type="application/pdf" to help your browser.<br />
<br />
As for fragment indentation on PDF files I haven't ever bothered to test PDF Open Parameters before: <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.somewhere.com/file.pdf#page=3">Click</a> works but only in the Mozilla Browser because M$ Explorer is pathetic when it comes to standards support.<br />
<br />
As I've just tested it in Opera, M$ IE and Firefox; I know it only works correctly in Mozilla.<br />
<br />
<!-- m --><a class="postlink" href="http://www.watersprings.org/pub/id/draft-zilles-pdf-00.txt">http://www.watersprings.org/pub/id/draf ... pdf-00.txt</a><!-- m --><!--content-->I'd suggest simply making a separate PDF for each particular page you're referencing.<!--content-->Thanks to all of you for your input into this problem. I sure appreciate all the help I can get!<br />
I can not seem to get a pdf converted file to show on the web site I am working on, so I tried a new approach. I had the document converted to html. Well, I can't get that to show on the site either. I received the html conversion in a zip. I unzipped it and linked the html document to my site. I used FTP to transfer the html and the accompanying folder that came in the zip. (By the way, everything works just fine on my PC.) When I view the site from IE, it says something like the URL can't be found on this server. The site is <!-- w --><a class="postlink" href="http://www.aok4d.com">www.aok4d.com</a><!-- w --> From the home page>schedule>then click the link on the March 7 jackpot . Is it something in the transfer or the server I am using? Why would it work on my PC and not "out there?" I'm sure one of you guys knows the answer!<br />
<br />
Thanks!!!<!--content-->Most likely the links are looking for files on your local network, which would not be found on the server. Check all image and URL links to ensure directory paths are correct.<!--content-->The page you have the link set for "resultsmarch7.htm" is a frameset which is calling for three other html files: resultsmarch7_1.htm, resultsmarch7_nav.htm, and resultsmarch7_index.htm<br />
<br />
Check to see that those three .htm files are in the htdocs directory of the server. They may be in a sub-directory which the link is not pointing to. Or those files may not have been uploaded.<!--content-->Orginally I uploaded the folder that came with the html in the zipped file. So, after your advise, I took those files:resultsmarch7_htm, resultsmarch7_nav.htm, and resultsmarch7-index.htm out of the CCS file and pasted them in the folder I store all that web site documents in. So, they were out of the folder and appear as seperate pages on my disk. Then, I uploaded all those to the server and it still doesn't work. <br />
<br />
When you say "subfolder" what do you mean? How do you get the march7results.htm to point to that subfolder?<br />
<br />
Thanks so much for you help!!<!--content-->Originally posted by mickeytoo <br />
Orginally I uploaded the folder that came with the html in the zipped file. So, after your advise, I took those files:resultsmarch7_htm, resultsmarch7_nav.htm, and resultsmarch7-index.htm out of the CCS file and pasted them in the folder I store all that web site documents in. So, they were out of the folder and appear as seperate pages on my disk. Then, I uploaded all those to the server and it still doesn't work. <br />
<br />
When you say "subfolder" what do you mean? How do you get the march7results.htm to point to that subfolder?<br />
<br />
Thanks so much for you help!! <br />
<br />
When I say "sub-directory" I'm referring to the directories within the "htdocs" or main directory on your server account. (The main directory is the one your index.html file is located in. Usually it's called "htdocs.")<br />
<br />
The link you have pointed to "resultsmarch7.htm" is in that same directory. That file appears to be correctly placed. However, the individual frame pages associated with resultsmarch7.htm are not there.<br />
<br />
I looked at the source of your frameset file (resultsmarch7.htm):<br />
//<!--<br />
var gsCSSPath = "./resultsmarch7/css/";<br />
var gsNN4Path = "./resultsmarch7/css/";<br />
var gsFramePath;<br />
<br />
if(document.all)<br />
gsFramePath = gsCSSPath;<br />
else<br />
gsFramePath = gsNN4Path;<br />
<br />
document.writeln('<frameset rows="29,*" frameborder="no" framespacing=0>');<br />
document.write(' <frame name="nav" src=http://www.webdeveloper.com/forum/archive/index.php/"' + gsFramePath + 'resultsmarch7_nav.htm" scrolling="no" marginheight=0 marginwidth=0>');<br />
document.writeln(' <frameset cols="130,*" frameborder="yes" framespacing=2>');<br />
document.write(' <frame name="contents" src=http://www.webdeveloper.com/forum/archive/index.php/"' + gsFramePath + 'resultsmarch7_index.htm" scrolling="auto">');<br />
document.write(' <frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"' + gsFramePath + 'resultsmarch7_1.htm">');<br />
document.write(' </frameset>');<br />
document.writeln('</frameset>');<br />
//--><br />
<br />
You can see the frame pages in bold above. Those files need to be placed in the same directory (folder) as your index.html and resultsmarch7.htm files.<!--content-->Thanks Robert and Heavy for your advice. The PDF files I am using have been created by someone else, and being very large, I don't think it would be practical to split them in separate files. I have decided to also forget about linking to a particular page. I'll let the user scroll down to the desired place in the page. <br />
Thanks again for your advice. It helped me understand what can be done and what can't be done.<!--content-->I looked at the files on the server where my index.html is (that folder is the www folder on my server) and all the files we are talking about are in that same folder. I uploaded them when you explained that they need to be in the same folder on the server. I just checked and they appear in the list along with all the html docs, gifs and jpgs it takes to display that web site. I am going to look "study" what you said and look at the instruction manual I use to see what else it could be. I am sure appreciative of all your suggestions and open for more if you have them!!<br />
Thanks a million!!!<!--content-->That's basically it. When files don't load and you know you uploaded them, it comes down to the simplest things: spelling errors or directory paths.<br />
<br />
Hope you get it working!<!--content-->
 
Back
Top