xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Leeds <cle...@medata.com>
Subject Re: suppress sign in header on last page
Date Wed, 05 Feb 2003 17:01:17 GMT
ZieseniƟ, Markus wrote:
> Hello,
> 
> I have a floating text (1..n pages) and need a sign for our inserter
> (enveloping machine), which appears on all pages except the last. I tried to
> put the inserter-sign in the header, but this sign is also printed on the
> last page. Then I tried to overwrite this sign by a white-bitmap graphic,
> but this also does not work. Can anybody help me?
> 
> Thanks in advance
> Markus 

I do something similar, except I add "Continued on next page..." in the 
footer of every page (except the last one, of course! ;-).

How do I do it?

In the flow "xsl-region-body", I place this:

<fo:flow flow-name="xsl-region-body">
   <fo:block xsl:use-attribute-sets="attNormal">
     <xsl:call-template name="tmpBody"/>
     <fo:block padding="0pt" font-size="1pt">
       <fo:marker marker-class-name="table-continued"/>
     </fo:block>
   </fo:block>
</fo:flow>

Then in the footer (region-after) I place an <fo:retrieve-marker ...> at 
the top of the template which builds the footer. You would place this in 
your region-before so it would be in the header.

<xsl:template name="tmpFooter">
   <fo:block padding-left="18pt">
     <fo:table border="0pt" padding-bottom="0pt" padding-right="0pt" 
padding-before="4pt" table-layout="fixed">
       <fo:table-column column-width="19.8cm"/>
       <fo:table-body>
         <fo:table-row>
           <fo:table-cell text-align="left" padding-left="6pt">
             <fo:block text-align="left" font-weight="bold">
               <fo:retrieve-marker retrieve-class-name="table-continued" 
retrieve-position="last-starting-within-page" retrieve-boundary="page"/>
             </fo:block>
           </fo:table-cell>
         </fo:table-row>
       </fo:table-body>
     </fo:table>
   </fo:block>
   ...
</xsl:template>

Then in the tmpBody (which is what makes up the content region-body 
section), I place an fo:marker which corresponds to the marker.

<xsl:template name="tmpBody">
   <fo:block padding="0pt" text-align="left">
     ...
     <fo:block padding="0pt" font-size="1pt">
       <fo:marker marker-class-name="table-continued"/>
       <fo:block id="endofdoc"/>
     </fo:block>
   </fo:block>
</xsl:template>

(OT: Notice <fo:block id="endofdoc"> which I use for "Page 1 of n"? ;-)

Finally, everywhere which might cause a continued page-break, I place 
the text & style of the marker I want to display on every page except 
the last.

       <fo:table-row padding="1pt">
         <fo:table-cell/>
         <fo:table-cell number-columns-spanned="4" padding-left="10pt" 
padding-top="3pt" display-align="center">
           <fo:block font-size="7pt" line-height="110%" 
padding-top="0pt" padding-bottom="0pt" display-align="before">
             <fo:inline font-weight="bold" font-style="italic">
               <fo:marker marker-class-name="table-continued">Continued 
on next page...</fo:marker>
             </fo:inline>
           </fo:block>
         </fo:table-cell>
       </fo:table-row>
     </fo:table-body>
   </fo:table>
</xsl:template>

This took me a while to get working. If anyone has improvements to this 
solution, I'd be happy to hear it. In addition, I'd be happy to work 
with someone to get this into the EXAMPLES for FOP. I don't know what 
would be required beyond what I've included, but I'd be happy to do stuff.

Web Maestro Clay

-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message