BlueDragon Blog
Here you'll find tips and information about making the most of BlueDragon, which offers several compelling implementation alternatives for your CFML applications. This blog was created originally by Charlie Arehart, who was New Atlanta CTO from 2003-2006.,He has since moved on to become an independent consultant but continues to answer comments raised in existing blog entries. BlueDragon continues, and you should look to the newer BlueDragon blog, from New Atlanta president, Vince Bonfanti, for more updated information.

Jump to a PDF page or section via a URL request

posted Sunday, 14 March 2004

Here's something pretty cool. Did you know you can cause a URL request for a PDF to go right to a specific page, or even a specific section of the document? Just use the format for HTML anchors, as in #page=nn, to tell the PDF to be loaded on page nn. Use #sectionname to go to a section name instead.

For example, the following would jump to page 29 of the BlueDragon Compatibility Guide:

http://www.newatlanta.com/products/bluedragon/self_help/docs/6_1/BlueDragon_61_CFML_Compatibility_Guide.pdf#page=29

Or, to go to the section on our available CFIMAP tag (a section titled, specifically "4.5.7 CFIMAP"), use:

http://www.newatlanta.com/products/bluedragon/self_help/docs/6_1/BlueDragon_61_CFML_Compatibility_Guide.pdf#4.5.7%20CFIMAP

Note the space between the section number and title (4.5.7 and CFIMAP) which I've indicated here as %20, the standard character code for URLs to represent a space.

In our case, the PDF was created from a Word document, but fortunately the conversion process we use has caused each section name to be a "named section" as far as PDF is concerned, so we can use it as the anchor in the URL.

The only drawback to this approach is of course if the document is changed. Page numbers, or section names that use numbers, would become incorrect on any revision. One solution, if this benefit justifies it, is to change the document to use non-numeric section names.

Another trick might be to determine how the Word/PDF conversion process creates what PDF considers "named sections" for this linking ability, and then perhaps you could create a hidden field/heading in the document that is not visible but holds the desired non-numeric name for the section.

Anyway, you can learn more about this feature of linking into PDFs via a URL at:

http://www.adobe.com/support/techdocs/a17e.htm

The above link appears to be broken. Consider these instead:

http://www.adobe.com/support/techdocs/317300.html

http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf




1. Danilo left...
Sunday, 14 March 2004 5:45 pm

There is actually a lot more that you can do with linking into a PDF. YOU can also specify whether or not to show bookmarks when the PDF is loaded, and can also specify zomming.

http://www.rdpslides.com/psfaq/FAQ00050.htm

I also made a Dreamweaver extension that allows for an easy way to specify several of the ways to link into a PDF file: Link To PDF (commercial $5).


2. Charlie Arehart left...
Monday, 15 March 2004 2:38 pm

Great points. Thanks, Danilo.

And let me also point out to folks that I failed to clarify something: as discussed in the Adobe technote I linked you to, these features only work in IE and (it says) Netscape. Be aware that users of other browsers (Safari, Opera, etc.) won't enjoy these benefits (though perhaps that will change in time).


3. Danilo left...
Monday, 15 March 2004 3:22 pm

One additional point, Charlie, in my testing IE only worked with this type of linking if the file was being viewed through a server, and not when accessed via the file system. So that limits it's usefullness a bit, but it's still a great little tidbit to be aware of.


4. Charlie Arehart left...
Tuesday, 16 March 2004 11:04 am

Yep, that's another point made in the technote (and perhaps that's where you saw it). Sorry I didn't think to bring it up, but I'm glad you did. I guess I'll recommend that everyone interested in this do take a moment to look at that technote to appreciate any other subtleties. But it's ok to bring up more here, if you think they're important for people to note.


5. Danilo left...
Tuesday, 16 March 2004 11:13 am

Charlie,

I had done searching at Adobe after finding the rdpslides.com page, but never found a good page at Adobe that described how the linking worked, so the technote you linked to was new to me. I had to find out about IE not working offline out on my own.

I do have a question about how you got the section names in Word to be converted into named destinations in the PDF. Do you use something within Distiller, or another program to perform the conversion?


6. Charlie Arehart left...
Wednesday, 17 March 2004 3:45 pm

Danilo, we just use Acrobat, in particular the feature where it creates a button within Word to create PDFs.


7. Maria Praca left...
Wednesday, 16 November 2005 4:01 am :: http:/nowe.tivi.pl

more informationon in adobe www-site: http://www.adobe.com/products/acrobat/pdfs/pdfaccess.pdf