xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lien, Patrick" <pl...@skandia.com>
Subject Page breaks and absolute positioned block-containers
Date Mon, 08 Mar 2004 03:31:39 GMT
I have 2 .fo files that I'm trying to integrate into a single XSL-FO
template that I hope to use to generate a 2-page PDF file.  Each .fo file
uses all absolutely positioned block containers.  They are, in fact, the
output from an FO editor (XSLFast).

I tried merging the .fo files and placing a break-before="page" in the 1st
block-container element that came from the second .fo file.  Since all the
block-containers are absolutely positioned, this element is not necessarily
the first element that would normally be encountered in the flow.

However, the page break does not work, and I end up with a 1 page PDF with
the contents of both pages overlaid on top of each other.

I've also tried:
* Using break-after="page"
* Nesting the entire contents of the 1st and second pages in a
block-container element, but that did not work either.

How can I get a 2-page PDF from my .fo files?

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xml [<!ENTITY copy "&#169;"> <!ENTITY trade "&#8482;"> <!ENTITY
deg "&#x00b0;"> <!ENTITY gt "&#62;"> <!ENTITY sup2 "&#x00b2;">
frac14 "&#x00bc;"> <!ENTITY quot "&#34;"> <!ENTITY frac12 "&#x00bd;">
<!ENTITY euro "&#x20ac;"> <!ENTITY Omega "&#937;"> ]> <!-- Document
generated with XSLfast v1.3 -->

<xsl:stylesheet xmlns:fox="http://xml.apache.org/fop/extensions"
.PrintElementFactory" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon print"

<xsl:variable name="currentDate" >01-03-2004 10:47:11</xsl:variable>
<xsl:variable name="IMAGEEXT">gif</xsl:variable>
<xsl:template match="xml">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
		<fo:simple-page-master master-name="pagemaster1"
page-height="792.0pt" page-width="612.0pt">
		  <fo:region-body margin-left="20pt" margin-top="8pt"
margin-bottom="8pt" margin-right="18pt"/>
		  <fo:region-before extent="8pt"/>
		  <fo:region-after extent="8pt" />
		  <fo:region-start extent="20pt" />
		  <fo:region-end extent="18pt" />
	<fo:page-sequence master-reference="pagemaster1">
		<fo:static-content flow-name="xsl-region-before" >
		<fo:static-content flow-name="xsl-region-after" >
		<fo:static-content flow-name="xsl-region-start" >
		<fo:static-content flow-name="xsl-region-end" >
		<fo:flow flow-name="xsl-region-body">

<xsl:template match="alphafactbookupdate">  
<!-- *** Page 1 content *** -->
	<fo:block-container position="absolute" top="183pt" left="390pt"
height="343.0pt" width="23.0pt" >
	   <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width = "8.0"
	    <svg:g style="stroke:#b3b9c9; stroke-width:1.0">
	     <svg:line x1="2.0pt" y1="2.0pt" x2="2.0pt" y2="322.0pt" />
	<!-- OFFSET = 1.0 -->
	<fo:block-container position="absolute" top="183pt" left="569pt"
height="343.0pt" width="23.0pt" >

	<fo:block-container position="absolute" top="578pt" left="5pt"
height="25.0pt" width="565.0pt" >
	<fo:block >
	<fo:external-graphic src="{$filename}" position="relative"
top="586pt" left="25pt"/>
<!-- ********** PAGE 2 ************* -->
<fo:block-container break-before="page" position="absolute" top="1pt"
left="392pt" height="225.0pt" width="180.0pt" >
<fo:block >
<xsl:variable name="filename"><xsl:value-of
<fo:external-graphic src="{$filename}" position="relative" top="9pt"
<!-- ********** END PAGE 2 ********* -->


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

View raw message