forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perry Molendijk" <>
Subject [patch] PDF Bookmarks - FOP Extension
Date Mon, 02 Dec 2002 05:26:05 GMT

I have added the FOP extension templates for building the PDF bookmarks to
common/document2fo.xsl in my Forrest install. It adds the bookmarks for the
top of the document and each section tag in the lefthand pane of Acrobat
Reader, very handy for larger documents.


There are 2 files in the zip file:


save both to: skins\common\xslt\fo

pdfoutline.xsl is included in document2fo.xsl

Changes to document2fo.xsl:

added the line: <xsl:include href="pdfoutline.xsl"/>

added this line in the root template: <xsl:apply-templates
select="/document" mode="outline"/> after the </fo:layout-master-set>
closing tag.

added 'id="{generate-id()}' attribute to document template:
<fo:block padding-before="24pt" padding-after="24pt" font-size="24pt"
font-weight="bold" id="{generate-id()}">

added 'id="{generate-id()}' attribute to section template:
<fo:block font-family="serif" font-size="{$size}pt" font-weight="bold"
space-before="12pt" id="{generate-id()}">

That's it.

Perry Molendijk

View raw message