Creating PDF Bookmarks Using FOSI
You can create bookmarks using markup illustrated in the following example in your stylesheet.
You can open the PDF to the first page, open the bookmark panel, and scale the page to fit in the window by placing the following anywhere in a document (or in a FOSI that places it anywhere in the document) using the following atidmd:DocView example:
<atidmd:DocumentMetaData source="atend">
<atidmd:DocView bookmarks="auto" mode="bookmarks"
fit="fitPage" destination="">
</atidmd:DocView>
</atidmd:DocumentMetaData>
The destination attribute defaults to the page on which the atidmd:DocView tag appears. If a valid named destination name is placed in the destination attribute, the document will open at the page on which the named destination appears. A named destination can be created by inserting a link target at the desired point in the document, or adding an ID to a tag at that location.
|
If DocView is specified in the stylesheet, it takes priority over the destination attribute value.
|
You can also generate an atidmd:DocumentMetaData node at the beginning of a document with a source=”atend” attribute, and also an atidmd:DocumentMetaData node at the end of the root node content. Have the FOSI produce the following at beginning of the document, which has the effect of disabling automatic bookmarks:
<atidmd:DocumentMetaData source="atend">
<atidmd:DocView mode="bookmarks" fit="fitPage" destination="">
</atidmd:DocView></para>
</atidmd:DocumentMetaData>
Then have the FOSI produce the following at the end of document:
<atidmd:DocumentMetaData>
<atidmd:Outline>
<atidmd:Bookmark>
<atidmd:Title>Book title</atidmd:Title>
<atidmd:Bookmark>
<atidmd:Title>Chapter 1 Title</atidmd:Title>
</atidmd:Bookmark>
<atidmd:Bookmark>
<atidmd:Title>Chapter 2 Title</atidmd:Title>
</atidmd:Bookmark>
</atidmd:Bookmark>
<atidmd:Bookmark state="closed">
<atidmd:Title>List of Figures</atidmd:Title>
<atidmd:Bookmark>
<atidmd:Title>Figure 1</atidmd:Title>
</atidmd:Bookmark>
<atidmd:Bookmark>
<atidmd:Title>Figure 2</atidmd:Title>
</atidmd:Bookmark>
</atidmd:Bookmark>
</atidmd:Outline>
</atidmd:DocumentMetaData>
The text variables used for links (such as bookmarks.txt in the following example) must be declared hotlinks to provide the bookmark destination using the _gtlink PI.
<stringdecl textid="docinfo.txt">
<stringdecl textid="chapter-bookmarks.txt" hotlink="1">
<stringdecl textid="book-title.txt">
<stringdecl textid="bookmarks.txt" hotlink="1">
<stringdecl textid="figures.bookmark.txt" hotlink="1">
Book eic:
<usetext source='!<atidmd:DocumentMetaData source="atend"></atidmd:DocumentMetaData>!'
placemnt="before"></usetext>
<savetext textid="chapter-bookmarks.txt" placemnt="before" conrule="\\">
<savetext textid="bookmarks.txt" placemnt="after"
conrule='!<atidmd:Bookmark><atidmd:Title>!,book-title.txt,!</atidmd:Title>!,
chapter-bookmarks.txt,!</atidmd:Bookmark>!'>
<usetext source='!<atidmd:DocumentMetaData><atidmd:DocInfo>!,docinfo.txt,!</atidmd:DocInfo>
<atidmd:Outline>!,bookmarks.txt,
!<atidmd:Bookmark state="closed"><atidmd:Title>List of Figures</atidmd:Title>!,figures.bookmark.txt,
!</atidmd:Bookmark></atidmd:Outline></atidmd:DocumentMetaData>!'
placemnt="after"></usetext>
|
The Arbortext Document Metadata namespace description is available from the Arbortext web site:
The Arbortext XSL FO Extensions namespace description is available from the Arbortext web site:
|
Related topics