PDF Open Parameters

This chapter contains information taken from a technical note from Adobe "Parameters For Opening PDF Documents".

 

Adobe defines parameters that allow you to open a PDF document with a command or URL that specifies exactly what to display (a named destination or specific page), and how to display it (using such characteristics as a specific view, scrollbars, bookmarks, annotations, or highlighting).

 

The PDF Open parameters for URLs, described in the table below, are supported through the Netscape and Internet Explorer browsers, and can also be used when opening PDF documents programmatically:

  1. When opening a PDF document from a command shell, you can pass the parameters to the open command using the /A switch using the following syntax: "path to Acrobat" /A "open parameter=OpenActions" "path to PDF file".
    For example: Acrobat.exe /A "zoom=1000=OpenActions" "C:\example.pdf"
  2. When refering to a PDF document in HTML link: <a href="http://www.example.pdf#page=2"> 
  3. When opening a document using "Open a web page" action in links and bookmarks: myexample.pdf#nameddest=overview 
 

PDF Open Parameters

 

The following table lists and describes the available PDF open parameters. Italics indicate user-specified variables.

 

Syntax definition Description
nameddest=name Specifies a named destination in the PDF.
For example:
mydoc.pdf#nameddest=chapter1
where chapter1 is a named destionation
page=pagenum Specifies a numbered page in the document, using an integer value. The document’s first page has a pagenum value of 1.
comment=commentID Specifies a comment on a given page in the PDF. Use the page command before this command; for example: #page=1&comment=452fde0e-fd22-457c-84aa-2cf5bed5a349
zoom=scale
zoom=scale,left,top
Sets the zoom and scroll factors, using float or integer values. For example, a scale value of 100 indicates a zoom value of 100%. Scroll values left and top are in a coordinate system where 0,0 represents the top left corner of the visible page, regardless of document rotation.
view=Fit
view=FitH
view=FitH,top
view=FitV
view=FitV,left
view=FitB
view=FitBH
view=FitBH,top
view=FitBV
view=FitBV,left
Set the view of the displayed page, using the keyword values defined in the PDF language specification. See the PDF Reference. Scroll values left and top are floats or integers in a coordinate system where 0,0 represents the top left corner of the visible page, regardless of document rotation. Use the page command before this command.
NOTE:Not supported on the command line.
viewrect=left,top,wd,ht Sets the view rectangle using float or integer values in a coordinate system where 0,0 represents the top left corner of the visible page, regardless of document rotation. Use the page command before this command. NOTE:Not supported on the command line.
pagemode=bookmarks
pagemode=thumbs
pagemode=none (default)
Displays bookmarks or thumbnails.
scrollbar=1|0 Turns scrollbars on or off.
search=wordList Opens the Search UI and performs a search for the specified word list in the document. Matching words are highlighted in the document. The words must be enclosed in quotes and separated by spaces; for example: #search=”word1 word2”
statusbar=1|0 Turns the status bar on or off.
messages=1|0 Turns the document message bar on or off.
navpanes=1|0 Turns the navigation panes and tabs on or off.
highlight=lt,rt,top,btm Highlights a specified rectangle on the displayed page. (Use the page command before this command.) The rectangle values are integers in a coordinate system where 0,0 represents the top left corner of the visible page, regardless of document rotation.
help=index|contents|search Used only when opening a file from the command line or an Apple Event. Opens the document in the Help window, with the specified navigation panel selected.
fdf=URL Specifies an FDF file to be used to populate form fields in the PDF file being opened.
For example: #fdf=http://example.org/doc.fdf
NOTE:The fdf parameter should be specifed last in the URL.
collab=setting Sets the collaboration store to be used to supply and store comments for the document. This overrides the default comment server for the review or the default preference. setting is of the form store_type@location, where valid values for store_type are:
?DAVFDF (webDAV)
?FSFDF (Network store)
?DB (ADBC) For example: #collab=DAVFDF@http://review_server/Collab/user1 For more information, see Acrobat Online Collaboration: Administration and Setup.

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

URL Limitations

?Only one digit following a decimal point is retained for float values.
?Individual parameters, together with their values (separated by & or #), can be no greater then 32 characters in length.
?You cannot use the reserved characters =, #, and &. There is no way to escape these special characters.
?If you turn bookmarks off using a URL parameter when a document had previously been saved with bookmarks on, the bookmark scrollbars are displayed at first, and only disappear once Acrobat obtains enough streamed information to render the full page.