You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/03/21 13:37:27 UTC
svn commit: r1459267 - in /manifoldcf/trunk/site: build.xml
pdf/helper-footerinfo.xsl
Author: kwright
Date: Thu Mar 21 12:37:27 2013
New Revision: 1459267
URL: http://svn.apache.org/r1459267
Log:
Fix the PDF footer to include trademark info.
Added:
manifoldcf/trunk/site/pdf/helper-footerinfo.xsl (with props)
Modified:
manifoldcf/trunk/site/build.xml
Modified: manifoldcf/trunk/site/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/build.xml?rev=1459267&r1=1459266&r2=1459267&view=diff
==============================================================================
--- manifoldcf/trunk/site/build.xml (original)
+++ manifoldcf/trunk/site/build.xml Thu Mar 21 12:37:27 2013
@@ -91,6 +91,12 @@
<include name="document-to-fo.xsl"/>
</fileset>
</copy>
+ <delete file="tmp/forrest/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-footerinfo.xsl"/>
+ <copy todir="tmp/forrest/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets">
+ <fileset dir="pdf">
+ <include name="helper-footerinfo.xsl"/>
+ </fileset>
+ </copy>
</target>
<target name="build-dejavu-fonts" depends="dejavu-check" if="dejavuAvailable">
Added: manifoldcf/trunk/site/pdf/helper-footerinfo.xsl
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/pdf/helper-footerinfo.xsl?rev=1459267&view=auto
==============================================================================
--- manifoldcf/trunk/site/pdf/helper-footerinfo.xsl (added)
+++ manifoldcf/trunk/site/pdf/helper-footerinfo.xsl Thu Mar 21 12:37:27 2013
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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">
+<!--
+Named template to generate a short message in the PDF footer, from text in
+skinconf.xml. By default, the message is a copyright statement. If a credit
+with @role='pdf' is present, that is used instead. Eg:
+
+<credit role="pdf">
+ <name>Generated by Apache FOP 1.0-dev</name>
+ <url>http://xml.apache.org/fop/dev/</url>
+</credit>
+-->
+ <xsl:template name="info">
+ <xsl:variable name="disable-copyright-footer" select="//skinconfig/pdf/disable-copyright-footer"/>
+ <xsl:variable name="disable-trademark-statement" select="//skinconfig/pdf/disable-trademark-statement"/>
+ <xsl:variable name="pdfcredit" select="//skinconfig/credits/credit[@role = 'pdf']"/>
+ <xsl:variable name="text">
+ <xsl:if test="$pdfcredit">
+ <xsl:value-of select="$pdfcredit/name"/>
+ </xsl:if>
+ <xsl:if test="not($pdfcredit) and not($disable-copyright-footer = 'true')">
+<xsl:text>Copyright © </xsl:text>
+ <xsl:value-of select="//skinconfig/year"/> <xsl:value-of
+ select="//skinconfig/vendor"/>
+<xsl:text> All rights reserved.</xsl:text>
+ </xsl:if>
+ <xsl:if test="not($pdfcredit) and not($disable-trademark-statement = 'true')">
+ <xsl:value-of select="//skinconfig/trademark-statement"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="url" select="$pdfcredit/url"/>
+ <fo:block-container font-style="italic" absolute-position="absolute"
+ left="0pt" bottom="150pt" height="20pt"
+ font-size="8pt">
+<!-- move copyright down if there is a legal notice
+ (thus keeping it on same line as line number) -->
+ <xsl:attribute
+ name="top">
+ <xsl:choose>
+ <xsl:when
+ test="/site/document/footer/legal">22</xsl:when>
+ <xsl:otherwise>6</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:if test="not($url)">
+ <fo:block text-align="center" color="lightgrey">
+ <xsl:value-of select="$text"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="$url">
+ <fo:block text-align="center">
+ <fo:basic-link color="lightgrey"
+ external-destination="{$url}">
+ <xsl:value-of select="$text"/>
+ </fo:basic-link>
+ </fo:block>
+ <fo:block text-align="center">
+ <fo:basic-link color="lightgrey"
+ external-destination="{$url}">
+ <xsl:value-of select="$url"/>
+ </fo:basic-link>
+ </fo:block>
+ </xsl:if>
+ </fo:block-container>
+ </xsl:template>
+</xsl:stylesheet>
Propchange: manifoldcf/trunk/site/pdf/helper-footerinfo.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: manifoldcf/trunk/site/pdf/helper-footerinfo.xsl
------------------------------------------------------------------------------
svn:keywords = Id