[MPPDF-62] New property maven.pdf.generateTOC to specify the position of the Table of Contents.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@671139 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2008-06-24 11:36:36 +00:00
parent 8b71d56274
commit 474f876a68
5 changed files with 30 additions and 2 deletions

View File

@ -102,6 +102,7 @@ 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.pdf.generateTOC = [${maven.pdf.generateTOC}]
maven.jar.jimi = [${maven.jar.jimi}]
maven.jar.jaicore = [${maven.jar.jaicore}]
maven.jar.jaicodec = [${maven.jar.jaicodec}]
@ -170,6 +171,12 @@ plugin.currentVersion = [${plugin.currentVersion}]
<arg value="confidential"/>
<arg value="${_confidential}"/>
</j:if>
<j:set var="_generateTOC" value="${maven.pdf.generateTOC}"/>
<j:if test="${not empty(_generateTOC)}">
<arg value="-PARAM"/>
<arg value="generateTOC"/>
<arg value="${_generateTOC}"/>
</j:if>
<j:set var="_paperType" value="${maven.pdf.paperType}"/>
<j:if test="${not empty(_paperType)}">
<arg value="-PARAM"/>

View File

@ -21,6 +21,8 @@
# PDF plugin.
# -------------------------------------------------------------------
maven.pdf.confidential=false
# generateTOC: may be 'start', 'end' or 'none'
maven.pdf.generateTOC=start
maven.pdf.paperType=A4
maven.pdf.companyIncName=${pom.organization.name}
#maven.pdf.copyrightYear=Not defined by default

View File

@ -43,6 +43,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="generateTOC">start</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>
@ -70,8 +71,13 @@
</xsl:template>
<xsl:template match="project/body">
<xsl:call-template name="fo-cover"/>
<xsl:call-template name="fo-toc"/>
<xsl:if test="$generateTOC = 'start'">
<xsl:call-template name="fo-toc"/>
</xsl:if>
<xsl:apply-templates/>
<xsl:if test="$generateTOC = 'end'">
<xsl:call-template name="fo-toc"/>
</xsl:if>
</xsl:template>
<xsl:template match="project/body/menu">
<xsl:apply-templates/>

View File

@ -26,8 +26,11 @@
</properties>
<body>
<release version="2.5.2-SNAPSHOT" date="in SVN">
<action dev="ltheussl" type="add" issue="MPPDF-62">New property
<code>maven.pdf.generateTOC</code>to specify the position of the Table of Contents. This can be used to work around some memory problems with large files.
</action>
<action dev="ltheussl" type="fix" issue="MPPDF-56">Add support for <code><![CDATA[<font>]]></code> and <code><![CDATA[<samp>]]></code> tags.</action>
<action dev="ltheussl" type="fix" issue="MPPDF-61">PDF generates content for <code><![CDATA[<script>]]>.</action>
<action dev="ltheussl" type="fix" issue="MPPDF-61">PDF generates content for <code><![CDATA[<script>]]></code> .</action>
</release>
<release version="2.5.1" date="2007-03-28">
<action dev="ltheussl" type="fix" issue="MPPDF-57">Unable to remove cover type and version.</action>

View File

@ -88,6 +88,16 @@
<td width="10%">Yes</td>
<td><code>false</code></td>
</tr>
<tr>
<td width="25%">maven.pdf.generateTOC</td>
<td>
If/Where to generate the Table of Contents. Possible values are '<code>start</code>' (default), '<code>end</code>' and '<code>none</code>'.
Use this in particular if you experience memory problems with large documents: moving the Table of Contents to the end of the file,
or excluding it, greatly reduces memory consumption.
</td>
<td width="10%">Yes</td>
<td><code>start</code></td>
</tr>
<tr>
<td width="25%">maven.pdf.navigationFile</td>
<td>Filename for the navigation file used to generate the