Add PDF bookmarks. Thanks to Greg Ludington.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@353832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl committed 2005-12-04 08:06:18 +00:00
1 parent 7879275946
commit 2b594b50e4
6 files changed
+56

No files matched your search

+4
View File
@@ -99,6 +99,7 @@ maven.pdf.cover.version = [${maven.pdf.cover.version}]
maven.pdf.cover.date = [${maven.pdf.cover.date}]
maven.pdf.projectLogo = [${maven.pdf.projectLogo}]
maven.pdf.companyLogo = [${maven.pdf.companyLogo}]
maven.pdf.createBookmarks = [${maven.pdf.createBookmarks}]
maven.jar.jimi = [${maven.jar.jimi}]
maven.jar.jaicore = [${maven.jar.jaicore}]
maven.jar.jaicodec = [${maven.jar.jaicodec}]
@@ -212,6 +213,9 @@ plugin.currentVersion = [${plugin.currentVersion}]
<arg value="debug"/>
<arg value="${maven.pdf.debug}"/>
<arg value="-PARAM"/>
<arg value="createBookmarks"/>
<arg value="${maven.pdf.createBookmarks}"/>
<arg value="-PARAM"/>
<arg value="header_Height"/>
<arg value="${maven.pdf.cover.headerHeight}"/>
<arg value="-PARAM"/>
+1
View File
@@ -25,6 +25,7 @@ maven.pdf.companyIncName=${pom.organization.name}
#maven.pdf.copyrightYear=Not defined by default
maven.pdf.imageDpi=75
maven.pdf.debug=false
maven.pdf.createBookmarks=false
maven.pdf.navigationFile=navigation.xml
maven.pdf.navigationFilePath=${maven.xdoc.src}
maven.pdf.pdfName=${pom.artifactId}.pdf
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" xmlns:fox="http://xml.apache.org/fop/extensions">
<!-- Templates for handling the outline -->
<xsl:template name="fo-outline">
<xsl:apply-templates mode="outline"/>
</xsl:template>
<xsl:template match="project/body" mode="outline">
<xsl:apply-templates mode="outline"/>
</xsl:template>
<xsl:template match="menu | menu/item | menu/item/item | menu/item/item/item" mode="outline">
<!-- use the apache FOP outline extension to recursively create bookmark block -->
<fox:outline internal-destination="{@href}{generate-id()}">
<fox:label><xsl:value-of select="@name"/></fox:label>
<xsl:apply-templates mode="outline"/>
</fox:outline>
</xsl:template>
</xsl:stylesheet>
+5
View File
@@ -20,6 +20,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/TR/2001/REC-SVG-20010904" version="1.0">
<xsl:include href="fo-styles.xslt"/>
<xsl:include href="fo-layouts.xslt"/>
<xsl:include href="fo-outline.xslt"/>
<xsl:include href="fo-cover.xslt"/>
<xsl:include href="fo-toc.xslt"/>
<xsl:include href="fo-body.xslt"/>
@@ -41,6 +42,7 @@
<xsl:param name="header_Height">0.5</xsl:param>
<xsl:param name="footer_Height">0.3</xsl:param>
<xsl:param name="debug">false</xsl:param>
<xsl:param name="createBookmarks"/>
<!-- These next two variables are used in cheap-and-cheerful case conversions -->
<xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
<xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
@@ -58,6 +60,9 @@
</xsl:template>
<xsl:template match="project">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:if test="$createBookmarks = 'true'">
<xsl:call-template name="fo-outline"/>
</xsl:if>
<xsl:call-template name="fo-layouts"/>
<xsl:apply-templates/>
</fo:root>
+1
View File
@@ -25,6 +25,7 @@
</properties>
<body>
<release version="2.5-SNAPSHOT" date="in SVN">
<action dev="ltheussl" type="add" due-to="Greg Ludington">New property <code>maven.pdf.createBookmarks</code> to create PDF bookmarks.</action>
<action dev="ltheussl" type="fix" issue="MPPDF-53">Title and dates are incorrect when used with Maven 1.0.2.</action>
<action dev="ltheussl" type="fix" issue="MPPDF-54">Identical ids in tables in different documents caused a build failure.</action>
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
+6
View File
@@ -81,6 +81,12 @@
<code>75</code>
</td>
</tr>
<tr>
<td width="25%">maven.pdf.createBookmarks</td>
<td>Add PDF bookmarks.</td>
<td width="10%">Yes</td>
<td><code>false</code></td>
</tr>
<tr>
<td width="25%">maven.pdf.navigationFile</td>
<td>Filename for the navigation file used to generate the