AppendPDF and AppendPDF Pro XML Extra Elements

Introduction

The element <extras> specifies additional attributes you may want to define for the output file. You can specify:

  • Open mode — whether Acrobat will show the navigation pane with bookmarks, thumbnails, or not at all.
  • Bookmark mode — how bookmarks will be displayed in the Bookmark pane.
  • View mode — the zoom level at which Acrobat opens the document.
  • Open to page — the page number to which you want the document to open.
  • Stamp file — a stamp file to stamp any optional text or images onto the body of the document. (AppendPDF Pro only)
  • Display Mode — the display properties of the Acrobat window when a document is opened.
  • Layout mode — The screen layout at which Acrobat will display the document.

The table below describes the elements of <extras>.

Contents of the <extras> Element

Element Level Pro Required Content
<appendparam version=”1.0″> Top Topmost element, contains entire parameter spec
⇔ <extras> 2 Specifies how a document should open
<openmode> 3 Specifies navigation mode in which file should open
OR <showbookmarks> 4 Empty: Specifies that bookmarks should show
OR <showthumbnails> 4 Empty: Specifies that thumbnails should show
OR <shownone> 4 Empty: Specifies only the document should show
OR <fullscreen> 4 Empty: File opens in full screen mode
<opentopage> 3 Text: Specifies page at which the file should open
<stampfile> 3 Pro Text: Name and path of stampfile to use
<viewmode> 3 Specifies the view that the file should open in
OR <actualsize> 4 Empty: File opens actual size
OR <fitheight> 4 Empty: File opens so window fits full height
OR <fitpage> 4 Empty: File opens so window fits full page
OR <fitvisible> 4 Empty: File opens so visible area fits the window
OR <fitwidth> 4 Empty: File opens to fit full width of window
<bookmarkmode> 3 Specifies the initial state of bookmarks
OR <openbookmarks> 4 Empty: Show all bookmarks
OR <closebookmarks> 4 Empty: Collapse all bookmarks
OR <openlevel> 4 Specifies number of bookmark levels shown
<layoutmode> 3 Specifies the initial display layout mode
OR <single> 4 Empty: One page at a time
OR <onecolumn> 4 Empty: Pages in a continuous vertical column
OR <twocolleft> 4 Empty: Two pages side by side, first page left
OR <twocolright> 4 Empty: Two pages side by side, first page right
<displaymode> 3 Specifies the initial window display mode
OR <hidetoolbar> 4 Empty: File opens with tool bar hidden
OR <hidemenubar> 4 Empty: File opens with menu bar hidden
OR <hidewinui> 4 Empty: File opens without window controls
OR <fitwin> 4 Empty: Window opens resized to fit the first page
OR <centerwin> 4 Empty: Centers document window on screen
OR <showtitle> 4 Empty: Displays document title on title bar

XML Code Sample

<appendparam version="1.0">
 <!-- . Indicates skipped sections -->
 <!-- . -->
 <!-- . -->
   <extras>
      <stampfile>
         /fullpath/stampfile.txt
      </stampfile>
      <opentopage>
         5
      </opentopage>
      <openmode>
 <!-- Choose only one of the 4 options -->
         <showbookmarks/>
         <showthumbnails/>
         <shownone/>
         <fullscreen/>
      </openmode>
      <bookmarkmode>
 <!-- Choose only one of the 3 options -->
         <openbookmarks/>
         <closebookmarks/>
         <openlevel/>
      </bookmarkmode>
      <viewmode>
 <!-- Choose only one of the 5 options -->
         <actualsize/>
         <fitheight/>
         <fitpage/>
         <fitvisible/>
         <fitwidth/>
      </viewmode>
      <layoutmode>
 <!-- Choose only one of the 4 options -->
         <single/>
         <onecolumn/>
         <twocolleft/>
         <twocolright/>
      </layoutmode>
      <displaymode>
 <!-- Choose one or more of the 6 options -->
         <hidetoolbar/>
         <hidemenubar/>
         <hidewinui/>
         <fitwin/>
         <centerwin/>
         <showtitle/>
      </displaymode>
   </extras>
</appendparam>

Elements of <extras>

opentopage

The page number at which to open the document.

stampfile (AppendPDF Pro only)

Specifies the path and filename of a stamp file for the appended document. These stamps will not be added to the cover page or the Table of Contents.

viewmode

Specifies the zoom level when the document opens.

actualsize

The document opens at actual size.

fitheight

The document opens so the full height of the page fits into the document window.

fitpage

The document opens so the full page fits into the document window.

fitvisible

The document opens so the visible area of the page fits into the document window.

fitwidth

The document opens so the full width of the page fits into the document window.

bookmarkmode

Specifies the initial state of the document’s bookmarks in the navigation pane.

openbookmarks

Expands the bookmark list to show all bookmarks in the navigation pane when the document is opened.

closebookmarks

Collapses the bookmark list to show only the top level bookmarks in the navigation pane when the document is opened.

openlevel

Expands the bookmark list through level n. For example, for n=3, all bookmarks up to and including the third level are shown. The fourth and higher level bookmarks are collapsed.

layoutmode

Specifies the display page layout when the document opens.

single

Displays one page at a time.

onecolumn

Arranges the pages in a continuous vertical column.

twocolleft

Arranges two pages side by side, the first page on the left.

twocolright

Arranges two pages side by side, the first page on the right.

displaymode

Specifies the window display mode when the document opens. You can specify more than one option.

hidetoolbar

Specifies that the Acrobat tool bar will not be displayed when the document opens.

hidemenubar

Specifies that the Acrobat menu bar will not be displayed when the document opens.

hidewinui

Specifies that the Acrobat window controls will not be displayed when the document opens.

fitwin

Resizes the document window to fit the first page when the document opens.

centerwin

Centers the document window on the screen when the document opens.

showtitle

Displays the document title, rather than the file name, on the title bar and the Windows menu.

Usage notes for the elements of <extras>

Cover pages, Table of Contents pages and body pages each use an independent stamp file. Stamps listed in the Extras section are applied only to the body pages, and will not affect the cover or the TOC pages of the output PDF.

Example

The example specifies using extrasstamp.txt as the stampfile; opentopage is page 7; viewmode as fit the full document width to the window; openmode set to show bookmarks and bookmarkmode displaying 3 levels of bookmarks. displaymode will be set to center the window on screen and show the document title in the title bar.

   <extras>
      <stampfile>
         /fullpath/extrasstamp.txt
      </stampfile>
      <opentopage>
         7
      </opentopage>
      <viewmode>
         <fitwidth/>
      </viewmode>
      <openmode>
         <showbookmarks/>
      </openmode>
      <bookmarkmode>
         <openlevel>
            3
         </openlevel>
      </bookmarkmode>
      <displaymode>
         <centerwin/>
         <showtitle/>
      </displaymode>
   </extras