OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Footer on Title Page - PDF


The FOP error message indicates the graphic is taking up more space than the
area allotted to the footer text.  FOP will not automatically scale an image
to fit an area, and it doesn't handle viewports well, so you the graphic is
being omitted because it doesn't fit.  Perhaps if you made the
$region.after.extent parameter larger than the default 0.4in then it would
fit, or scale the graphic down.

But then I don't see why replacing the fo:external-graphic with text
wouldn't work with the default extent.  Do you get the same FOP error
message with text?  Does the text get into your FO file?

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Phil Weston" <phil700@xmsg.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, July 13, 2004 1:24 PM
Subject: [docbook-apps] Footer on Title Page - PDF


> My FO knowledge is a bit rubbish (but getting better ;o) ) - Can anyone
see where I've gone wrong here?
>
> I've added a new Parameter (docbooklogo) to my FO customisation layer to
allow me to switch between adding an image to the Footer of my PDF's Title
Page.
>
> I've edited <xsl:template name="footer.table"> so my logic looks like:
>
>   <!-- Really output a footer? -->
>   <xsl:choose>
>     <xsl:when test="$pageclass='titlepage' and $gentext-key='book' and
$sequence='first'">
>       <xsl:choose>
>         <xsl:when test="$docbooklogo = '1'">  <!-- My New Parameter -->
>           <xsl:copy-of select="$my.titlepage.candidate"/>
>         </xsl:when>
>         <xsl:otherwise><!-- no, book titlepages have no footers at
all --></xsl:otherwise>
>       </xsl:choose>
>     </xsl:when>
>     <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages =
0"><!-- no output --></xsl:when>
>     <xsl:otherwise><xsl:copy-of select="$candidate"/></xsl:otherwise>
>   </xsl:choose>
>
> The logic seems to work and outputs $my.titlepage.candidate into my FO.
The variable is created using code stolen from the $candidate variable in
the same template - And this is where I'm having trouble, the image doesn't
appear in the PDF when requested. Here's the code:
>
>   <xsl:variable name="my.titlepage.candidate">
>     <fo:table table-layout="fixed" width="100%">
>       <xsl:call-template name="foot.sep.rule">
>         <xsl:with-param name="pageclass" select="$pageclass"/>
>         <xsl:with-param name="sequence" select="$sequence"/>
>         <xsl:with-param name="gentext-key" select="$gentext-key"/>
>       </xsl:call-template>
>       <fo:table-column column-number="1"
column-width="proportional-column-width(1)"/>
>       <fo:table-body>
>         <fo:table-row height="14pt">
>           <fo:table-cell text-align="center" display-align="after">
>             <xsl:if test="$fop.extensions = 0">
>               <xsl:attribute
name="relative-align">baseline</xsl:attribute>
>             </xsl:if>
>             <fo:block>
>               <fo:external-graphic src="figures\cwdbdocbook.png"/>
>             </fo:block>
>           </fo:table-cell>
>         </fo:table-row>
>       </fo:table-body>
>     </fo:table>
>   </xsl:variable>
>
> The PNG exists.
> FOP gives out a "[WARNING] Some static content could not fit in the area".
> Replacing <fo:external-graphic... with plain text doesn't produce anything
either :o(
>
> TIA.
>
> P.
>
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]