This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for chapter and part bookmarks to show up in PDFusing FOP



When generating PDF using Apache FOP from the .fo file generated by docbook-xsl, bookmarks for chapters and parts do not always work. The cause of this is the same cause as the bug mentioned at http://lists.oasis-open.org/archives/docbook-apps/200101/msg00063.html , where chapters and parts do not have page numbers in the TOC. Norman Walsh mentions that this isn't going to be fixed in the stylesheets (since, legitimately, it is a bug in FOP).


The following patch, when executed against version 1.58.1 of the docbook stylesheets, will make the booksmarks and page numbers correctly show up in the resulting PDF:

diff -Naur docbook-xsl/fo/component.xsl docbook-xsl-1.58.1/fo/component.xsl
--- docbook-xsl/fo/component.xsl Thu Mar 13 17:14:35 2003
+++ docbook-xsl-1.58.1/fo/component.xsl Thu Nov 14 08:34:05 2002
@@ -37,7 +37,7 @@
</fotex:bookmark>
</xsl:if>


- <fo:block id='{$id}' keep-with-next.within-column="always"
+ <fo:block keep-with-next.within-column="always"
hyphenate="false">
<xsl:if test="$pagewide != 0">
<xsl:attribute name="span">all</xsl:attribute>
diff -Naur docbook-xsl/fo/division.xsl docbook-xsl-1.58.1/fo/division.xsl
--- docbook-xsl/fo/division.xsl Thu Mar 13 17:22:43 2003
+++ docbook-xsl-1.58.1/fo/division.xsl Thu Sep 5 12:24:32 2002
@@ -34,7 +34,7 @@
</fotex:bookmark>
</xsl:if>


-  <fo:block id="{$id}" keep-with-next.within-column="always"
+  <fo:block keep-with-next.within-column="always"
             hyphenate="false">
     <xsl:copy-of select="$title"/>
   </fo:block>

--
Marc Prud'hommeaux      marc at solarmetric dot com
SolarMetric Inc.                  http://www.solarmetric.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]