I must have missed the last message in this thread. I've come back to
this issue after a long break.
To review, my use case is that I want to have a static body of text
printed on every even page. It will be a set of Terms and Conditions
that is to appear on the back of each packing slip when they are duplex
printed. So I'm trying to prevent any flow text from appearing on even
pages but cannot find a way.
Vincent's last response seems to indicate that it is possible to
prevent flow text from appearing on a page using margins. That's been my
approach so far, but I've been unsuccessful. You will notice from the
attached PDF that one line is written to page 2 even though the margins
should not allow this. I've tried several different combinations but
have always had at least one line written to that page.
I've attached all the relevant files.
Thanks for any input!
Dave
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Hi David, 
Can you please send your FO file (directly to me if it’s big or
confidential)? I tried on a simple file and by setting margins on the
region-body to make it empty I could get the content to be typeset only
on odd pages. 
Thanks, Vincent 
David Gerdt wrote: 
You remembered correctly. 
java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to
the
region-body in page-master 'front'. FOP presently does not support
this. 
Thanks for the help anyway. 
"Amick, Eric" <[email protected]> 11/16/2009 3:18 PM >>> 

In standard FO, you should be able to just give the region-body a
different
region-name and have static-content write to the region-body. FOP might
not like
that, unfortunately, if I remember correctly. 
Eric Amick Systems Engineer II Legislative Computer Systems 
From:David Gerdt [mailto:[email protected]] Sent: Monday, November 16,
2009 15:11 To: [email protected] Subject: page master with
no flow text in region-body 
Is it possible to create a page-master where the region-body will not
allow any
of the flow text to come in? I want to create a document that will be
duplex
printed where the front of the page (odd pages) will be dynamic and the
back of
the page (even pages) will be a static body of text, the same on every
even
page. 
My thought was to use conditional-page-masters for odd and even pages
where the
margins of the even page would not allow any text to be written in the
region-body and use the region-before to include my static text. For
instance, I
supposed that if the region-body area were only 1mm, no dynamic text
would fit
and only the static content would be displayed. 
This apparently doesn't work. The region-body seems to always contain
at least
one line of text. 
I know I could probably use the IF to do this, but does anyone know of
a way to
do this in straight XSL-FO? 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional
commands, e-mail: [email protected] 

Attachment: outfile.fo
Description: Binary data

Attachment: outfile.pdf
Description: Adobe PDF document

<source>
	<item type="Line 001" />
	<item type="Line 002" />
	<item type="Line 003" />
	<item type="Line 004" />
	<item type="Line 005" />
	<item type="Line 006" />
	<item type="Line 007" />
	<item type="Line 008" />
	<item type="Line 009" />
	<item type="Line 010" />
	<item type="Line 011" />
	<item type="Line 012" />
	<item type="Line 013" />
	<item type="Line 014" />
	<item type="Line 015" />
	<item type="Line 016" />
	<item type="Line 017" />
	<item type="Line 018" />
	<item type="Line 019" />
	<item type="Line 020" />
	<item type="Line 021" />
	<item type="Line 022" />
	<item type="Line 023" />
	<item type="Line 024" />
	<item type="Line 025" />
	<item type="Line 026" />
	<item type="Line 027" />
	<item type="Line 028" />
	<item type="Line 029" />
	<item type="Line 030" />
	<item type="Line 031" />
	<item type="Line 032" />
	<item type="Line 033" />
	<item type="Line 034" />
	<item type="Line 035" />
	<item type="Line 036" />
	<item type="Line 037" />
	<item type="Line 038" />
	<item type="Line 039" />
	<item type="Line 040" />
	<item type="Line 041" />
	<item type="Line 042" />
	<item type="Line 043" />
	<item type="Line 044" />
	<item type="Line 045" />
	<item type="Line 046" />
	<item type="Line 047" />
	<item type="Line 048" />
	<item type="Line 049" />
	<item type="Line 050" />
	<item type="Line 051" />
	<item type="Line 052" />
	<item type="Line 053" />
	<item type="Line 054" />
	<item type="Line 055" />
	<item type="Line 056" />
	<item type="Line 057" />
	<item type="Line 058" />
	<item type="Line 059" />
	<item type="Line 060" />
	<item type="Line 061" />
	<item type="Line 062" />
	<item type="Line 063" />
	<item type="Line 064" />
	<item type="Line 065" />
	<item type="Line 066" />
	<item type="Line 067" />
	<item type="Line 068" />
	<item type="Line 069" />
	<item type="Line 070" />
	<item type="Line 071" />
	<item type="Line 072" />
	<item type="Line 073" />
	<item type="Line 074" />
	<item type="Line 075" />
	<item type="Line 076" />
	<item type="Line 077" />
	<item type="Line 078" />
	<item type="Line 079" />
	<item type="Line 080" />
	<item type="Line 081" />
	<item type="Line 082" />
	<item type="Line 083" />
	<item type="Line 084" />
	<item type="Line 085" />
	<item type="Line 086" />
	<item type="Line 087" />
	<item type="Line 088" />
	<item type="Line 089" />
	<item type="Line 090" />
	<item type="Line 091" />
	<item type="Line 092" />
	<item type="Line 093" />
	<item type="Line 094" />
	<item type="Line 095" />
	<item type="Line 096" />
	<item type="Line 097" />
	<item type="Line 098" />
	<item type="Line 099" />
	<item type="Line 100" />
	<item type="Line 101" />
	<item type="Line 102" />
	<item type="Line 103" />
	<item type="Line 104" />
	<item type="Line 105" />
	<item type="Line 106" />
	<item type="Line 107" />
	<item type="Line 108" />
	<item type="Line 109" />
	<item type="Line 110" />
	<item type="Line 111" />
	<item type="Line 112" />
	<item type="Line 113" />
	<item type="Line 114" />
	<item type="Line 115" />
	<item type="Line 116" />
	<item type="Line 117" />
	<item type="Line 118" />
	<item type="Line 119" />
	<item type="Line 120" />
	<item type="Line 121" />
	<item type="Line 122" />
	<item type="Line 123" />
	<item type="Line 124" />
	<item type="Line 125" />
	<item type="Line 126" />
</source>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
                              xmlns:fo="http://www.w3.org/1999/XSL/Format";
                              xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl";
                              xmlns:ps="http://xmlgraphics.apache.org/fop/postscript"; 
                              xmlns:exslt="http://exslt.org/common";>
                              
    <xsl:output method="xml" indent="no" />
    
    <xsl:template match="/">
    	<xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="source">
    	<fo:root>
    		<fo:layout-master-set>
    	    	<fo:simple-page-master master-name="front"
                    page-width="8.5in"
                    page-height="11in"
                    margin-left=".5in"
                    margin-right=".5in"
                    margin-top=".7in"
                    margin-bottom=".7in">
                    <fo:region-body />
                </fo:simple-page-master>
    	    	<fo:simple-page-master master-name="back"
                    page-width="8.5in"
                    page-height="11in"
                    margin-left=".5in"
                    margin-right=".5in"
                    margin-top="0in"
                    margin-bottom="0in">
                    <fo:region-body background-color="#999999" margin-top="5.5in" margin-bottom="5.5in" />
                    <fo:region-before region-name="terms" />
                </fo:simple-page-master>
                
                <fo:page-sequence-master master-name="main">
	        		<fo:repeatable-page-master-alternatives>
	        			<fo:conditional-page-master-reference odd-or-even="odd" master-reference="front" />
	        			<fo:conditional-page-master-reference odd-or-even="even" master-reference="back" />
	        		</fo:repeatable-page-master-alternatives>
	        	</fo:page-sequence-master>
        	</fo:layout-master-set>

        	<fo:page-sequence master-reference="main" initial-page-number="1" force-page-count="end-on-even">
        		<fo:static-content flow-name="terms">
        			<fo:block>TERMS AND CONDITIONS</fo:block>
        		</fo:static-content>
        		<fo:flow flow-name="xsl-region-body">
        			<xsl:for-each select="item">
        				<fo:block><xsl:value-of select="@type" /></fo:block>
        			</xsl:for-each>
        		</fo:flow>
        	</fo:page-sequence>
    	</fo:root>
    </xsl:template>

</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to