How can I programmatically open a pdf at a certain point?

后端 未结 1 495
一生所求
一生所求 2020-12-08 17:21

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?

相关标签:
1条回答
  • 2020-12-08 17:51

    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
    
    0 讨论(0)
提交回复
热议问题