tags:

views:

552

answers:

1

I've seen a few apps load up pdf files as the documentation but at a certain point within the pdf file. How were they doing this?

+5  A: 

Setting a page parameter or named destination on the URL. See the docs on open parameters:

Specifying PDF Open Parameters in a URL

You can specify multiple PDF Open parameters in a single URL. Each parameter is separated from the others with either an ampersand (&) or a pound (#) character. Actions are processed and executed from left to right as they appear on the URL command line. Because all specified actions are executed, it is possible that later actions will override the effects of previous actions, so it is important to be aware of the order. For example, page actions should appear before zoom actions. Commands are not case sensitive (except for the value of a named destination). There can be no spaces in the URL line.

URL Examples

http://example.org/doc.pdf#nameddest=Chapter6
http://example.org/doc.pdf#page=3
http://example.org/doc.pdf#page=3&zoom=200,250,100
http://example.org/doc.pdf#zoom=50
http://example.org/doc.pdf#page=72&view=fitH,100
http://example.org/doc.pdf#view=fitb&nameddest=Chapter3
http://example.org/doc.pdf#pagemode=none
http://example.org/doc.pdf#pagemode=bookmarks&page=2
http://example.org/doc.pdf#page=3&pagemode=thumbs
http://example.org/doc.pdf#collab=DAVFDF@http://review_server/Collab/user1
http://example.org/doc.pdf#page=1&comment=452fde0e-fd22-457c-84aa-2cf5bed5a349
http://example.org/doc.pdf#fdf=http://example.org/doc.fdf
tvanfosson
Thanks that docs is what I was looking for. I thought it would require a whole api rather than just command line params. I think I may be able to find a use for the url mode too.
Tim Matthews
This doesn't work at all for me - for example http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#page=3 just opens to page 1.
Herb Caudill
@Herb -- just tried your link and it works fine for me. Opens to the preface. Which version of Acrobat/Reader do you have? I have Acrobat Pro 8 installed.
tvanfosson
@tvanfosson - I tried it again, and it worked. I then navigated to the first page, closed the PDF, and opened the URL again - this time it went to the first page. So here's my conclusion: If the user has already opened a document in this session, Acrobat Reader gives priority the user's last settings, including things like which page was open and what the zoom level was. If the document hasn't been opened recently, then the open parameters are respected.
Herb Caudill
@Herb -- sounds just like something Adobe would do. "We know better than you what you want." We have issues with their products also not obeying the print queue settings (for color, etc.) but deciding on their own how the document should be printed.
tvanfosson