Creativebits.org

an All Creative World site
JimD's picture
2617 pencils

Direct linking to pages in PDF files

I'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/cb_sample_PDF.pdf

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.

Ivan's picture

Nice! Would this work with any document that has an html anchor? Maybe a Word document?

David Gómez Rosado's picture

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.

Ivan's picture

Can Preview work in the Web browser itself?

Jim's picture

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.

ben's picture

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....

Anonymous's picture

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

Sarah's picture

I coincidentally just found reason to use this tip (here [pdf]). Thanks very much!

Kimbol's picture

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 :(.

Anonymous's picture

Hi, Is there any similar mechanism for linking to a specific booked spot within a pdf document from a webpage? Thanks!

Anonymous's picture

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

Creativebits is a blog about creativity, design and Macs. We also have a critique section where you can post your work to get opinions and a forum to discuss any design related topics.

Recommend us on Google

Latest critique

Do you need a great new logo?

If you need a logo for your company or product you can get it done with us.
In our logo store you can pick from over 28,000 pre-made logos that will be customized to your name for free or you can post a contest for us for just $250 and our designers from all over the world will submit dozens of logo design suggestions to your specific needs.

Marketplace