Direct linking to pages in PDF files
JimD (2617 points) | Wed, 2005-02-23 16:48I'm not sure how useful you may find this Adobe Acrobat bit, but I've had a reason to use it recently and thought I would share it.
Say you have a large multi-page PDF document stored on your Web site. And lets say you want to link to a specific page in that PDF file right from your Web page. You could split the specific page out of the file, or you could force your reader to scroll to a specific page, but this is a more elegant solution.
It's really quite simple. First upload a PDF file to your Web server, I'll use a sample PDF called "cb_sample_PDF.pdf" for which I want you to see page 3. Then, in your HTML editor of choice (I like using Adobe GoLive), set the link to the page as follows:
Start with your domain name:
http://www.yourdomain.com
Then add the name of the PDF document:
http://www.yourdomain.com
Now add the page number by using the "#page=" tag:http://www.yourdomain.com/cb_sample_PDF.pdf #page=3
Of course you must include the standard HTML link tags at the beginning and end, but the end result is a text link on your Web page that looks like this and links to (in the case of our sample) page 3 of the PDF file. Of course the effect of this ability is greater when your visitors have the ability to view PDF files right in their Web browser.
-----------
Visit The Graphic Mac for graphics and Mac OS tips, reviews, tutorials and discussion.
Commenting on this Blog entry is closed.
Nice! Would this work with any document that has an html anchor? Maybe a Word document?
Hmmmm... It looked promising, but if Preview is the default application in Mac OS X, it does not obey the page target. Opens on first.
Can Preview work in the Web browser itself?
True, the tip does not work with Preview, but we're talking about a very small audience when we're talking about Preview. The vast majority of business will be using Acrobat Reader.
I'm not sure if it would work with a Word file, I haven't tried it.
For Mac folk, linking to PDF pages in HTML works with the PDF browser plugin at:
http://www.schubert-it.com/pluginpdf/
and the new plugin installed by Acrobat 7 Pro (yeah, Adobe finally made us a plug in - but its *dog* slow)
You can also link to named anchors in a PDF, BTW - allowing you to link to specific content *within* a specific page....
Ivan... if you haven't installed it already - I would highly recommend the Schubert-IT plug in - it's super sleek and super fast....
Personally, I would not rely on the ability to display PDF files in the browser. There are too many ways for it to not work correctly.
Also, there are people like me who hate loading PDF files in the web browser. It's clunky, slow, and it makes the documents even harder to read that most PDF files already are. First thing I do when setting up a new machine is disable that plugin.
Jim Royal
I coincidentally just found reason to use this tip (here [pdf]). Thanks very much!
We were just talking yesterday about how much we wanted this functionality! Sadly, however, it doesn't seem to work in Opera 7, probably because a separate instance of Acrobat Reader is spawned instead of displaying the doc in the browser. IE, of course, worked fine :(.
Hi, Is there any similar mechanism for linking to a specific booked spot within a pdf document from a webpage? Thanks!
It's really quite simple. First upload a PDF file to your Web server, I'll use a sample PDF called "cb_sample_PDF.pdf" for which I want you to see page 3. Then, in your HTML editor of choice (I like using Adobe GoLive), set the link to the page as follows:
boediger