Just a thought - have you tried giving FOP more memory to use?
If you use the batch file, you can modify the line that invokes FOP to
include the -Xmx switch, so that it looks something like this:
java -Xmx512m -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop %1 %2 %3 %4
%5 %6 %7 %8 %9
That gives it a half gig to play with. I found that I had use the -Xmx
switch to be able to produce large documents, but now I can produce
1700-page documents (in particular, a data dictionary for a large data
warehouse).
Good luck.
Jay Bryant
Bryant Communication Services
Daniel Durgin <[EMAIL PROTECTED]>
01/03/2005 12:11 PM
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
Always on page 52 - > "No meaningful layout in block after many attempts.
"
Hi everyone,
I have been using FOP for about 9 months, off and on. I have never had
this
problem before. No matter what I do, FOP craps out at page 52. I can use
more white space or less white space (i.e. more/less records per a page),
doesn't matter.
There are not that many records, only about 2800. No graphics, just text.
I
have tried PDF and PS output, the same error each time. If I limit the
number of records (php script that creates xml file) so it won't make
enough
records for 52 pages, it works like a charm.
Output:
[DEBUG] Input mode:
[DEBUG] xslt transformation
[DEBUG] xml input file: StapleBook-2005-01-03.xml
[DEBUG] xslt stylesheet: StapleSheetPage.xsl
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: StapleSheet.pdf
[DEBUG] OPTIONS
[DEBUG] no user configuration file is used [default]
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] base directory: file:/home/shared/Dan/RenysScripts/XML/
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[INFO] [2]
[WARNING] Some static content could not fit in the area.
... (repeats for pages in between) ...
[WARNING] Some static content could not fit in the area.
[INFO] [52]
[INFO] [52]
[ERROR] org.apache.fop.apps.FOPException: No meaningful layout in block
after
many attempts. Infinite loop is assumed. Processing halted.
org.apache.fop.apps.FOPException: org.apache.fop.apps.FOPException: No
meaningful layout in block after many attempts. Infinite loop is assumed.
Processing halted.
at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111)
at org.apache.fop.apps.Fop.main(Fop.java:62)
Here is the XSL. Sorry about including the entire stylesheet, but I have
been
stumped for days, and not sure what is fouling things up. Yes I have
checked
google and the archive.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
version="1.0" >
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<fo:layout-master-set>
<fo:simple-page-master master-name="page1"
page-height="11in"
page-width="8.5in"
margin-top="0.5in"
margin-bottom="0.5in"
margin-left=".25in"
margin-right=".25in">
<fo:region-body
margin-top="0.60in"
margin-bottom="0.5in"
margin-left="0.25in"
margin-right="0.25in"
column-count="3" column-gap=".25in" />
<fo:region-before extent="0.5in"
background-color="#489838"/>
<fo:region-after extent="0.25in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="page2"
page-height="11in"
page-width="8.5in"
margin-top="0.5in"
margin-bottom=".5in"
margin-left=".25in"
margin-right=".25in">
<fo:region-body
margin-top="0.25in"
margin-bottom="0.5in"
margin-left="0.25in"
margin-right="0.25in"
column-count="2" column-gap=".25in" />
<fo:region-before extent="0.00in"/>
<fo:region-after extent="0.25in"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="document">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference page-position="first"
master-reference="page1"/>
<fo:conditional-page-master-reference page-position="rest"
master-reference="page2"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="xsl-region-before">
<fo:block
color="black"
font-size="18pt"
padding-after=".1in"
padding-top=".2in"
padding-right=".1in">
<fo:inline
font-size="10pt">Store:</fo:inline>
</fo:block>
<fo:block
font-size="12pt"
padding-after=".05in"
padding-top=".1in">
<fo:inline>Printed On: <xsl:value-of
select="../date"/></fo:inline>
   
<fo:inline
start-indent="4in">Store:____________________________:</fo:inline>
</fo:block>
<fo:block text-align="center">First
page.</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block
text-align="center">page - <fo:page-number/> of
<fo:page-number-citation
ref-id="last-page"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block
break-before="page">
<xsl:apply-templates select="reports/sku-list" />
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="sku-list" >
<xsl:variable name="sorted">
<xsl:for-each select="sku-item">
<!--<xsl:sort select="@mfrid" data-type="number" />-->
<xsl:sort select="mfr" data-type="text"
/>
<xsl:sort select="stock-num"
data-type="text" />
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="xalan:nodeset($sorted)/sku-item">
<!-- <xsl:apply-templates select="." />-->
<!-- <fo:block>
hello
</fo:block>-->
<xsl:variable name="bool" select="position() mod 5 = 0"/>
<xsl:variable name="pastMfr"
select="preceding-sibling::sku-item[1]/@mfrid"/>
<xsl:choose>
<xsl:when test="not($pastMfr)">
<fo:table
table-layout="fixed">
<fo:table-column
column-width="1.75in"/>
<fo:table-column column-width=".5in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell
number-columns-spanned="2">
<fo:block
text-align="center"
padding-bottom=".05in"
padding-top=".25in">
*** <xsl:value-of
select="mfr"/> ***
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:when>
<xsl:when test="mfr/@id != $pastMfr">
<fo:table
table-layout="fixed">
<fo:table-column column-width="1.75in"/>
<fo:table-column column-width=".5in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell
number-columns-spanned="2">
<fo:block
text-align="center"
padding-bottom=".05in"
padding-top=".25in">
*** <xsl:value-of
select="mfr"/> ***
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:when>
</xsl:choose>
<fo:table
table-layout="fixed"
border-color="black"
width="2.25in"
>
<fo:table-column column-width="1.75in"/>
<fo:table-column column-width=".5in"/>
<fo:table-header>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<xsl:choose>
<xsl:when test="$bool">
<fo:table-cell
background-color="#DAEFFF"
border-style="solid"
border-width="1px"
border-color="silver">
<fo:block
text-align="justify"
font-size="9pt">
<xsl:value-of
select="stock-num"/>
 
<xsl:value-of select="price"/>
</fo:block>
<fo:block
hyphenate="true"
language="en"
hyphenation-push-character-count="2"
padding=".1in"
font-size="9pt"
font-family="Helvetica"
wrap-option="wrap"
>
<xsl:value-of select="desc"/>
</fo:block>
<fo:block
font-size="9pt">
<xsl:value-of select="@num"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
background-color="#DAEFFF"
border-style="solid"
border-width="1px"
border-color="silver">
</fo:table-cell>
</xsl:when>
<xsl:otherwise>
<fo:table-cell
border-style="solid"
border-width="1px"
border-color="silver">
<fo:block
text-align="justify"
font-size="9pt">
<xsl:value-of
select="stock-num"/>
 
<xsl:value-of select="price"/>
   
</fo:block>
<fo:block
hyphenate="true"
language="en"
hyphenation-push-character-count="2"
font-size="9pt"
wrap-option="wrap">
<xsl:value-of select="desc"/>
</fo:block>
<fo:block
font-size="9pt">
<xsl:value-of select="@num"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
border-style="solid"
border-width="1px"
border-color="silver">
</fo:table-cell>
</xsl:otherwise>
</xsl:choose>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:for-each>
<fo:block id="last-page"/>
</xsl:template>
<xsl:template match="mfr">
<fo:table-row>
<fo:table-cell
number-columns-spanned="2">
<fo:block
text-align="center"
padding-bottom=".05in"
padding-top=".25in">
*** <xsl:value-of
select="mfr"/> ***
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
<xsl:template match="sku-item">
<fo:block>
hello
</fo:block>
<fo:table
table-layout="fixed"
border-color="black"
width="2.5in"
>
<fo:table-column column-width="1.75in"/>
<fo:table-column column-width=".5in"/>
<fo:table-header>
</fo:table-header>
<fo:table-body>
<xsl:variable name="bool" select="position() mod 5 = 0"/>
<xsl:variable name="pastMfr"
select="preceding-sibling::sku-item[1]/@mfrid"/>
<xsl:choose>
<xsl:when test="not($pastMfr)">
<fo:table-row>
<fo:table-cell
number-columns-spanned="2">
<fo:block
text-align="center"
padding-bottom=".05in"
padding-top=".25in">
*** <xsl:value-of
select="mfr"/> ***
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:when>
<xsl:when test="mfr/@id != $pastMfr">
<fo:table-row>
<fo:table-cell
number-columns-spanned="2">
<fo:block
text-align="center"
padding-bottom=".05in"
padding-top=".25in">
*** <xsl:value-of
select="mfr"/> ***
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:when>
</xsl:choose>
<fo:table-row>
<xsl:choose>
<xsl:when test="$bool">
<fo:table-cell
background-color="#DAEFFF"
border-style="solid"
border-width="1px"
border-color="silver">
<fo:block
text-align="justify"
font-size="9pt">
<xsl:value-of
select="stock-num"/>
 
<xsl:value-of select="price"/>
</fo:block>
<fo:block
hyphenate="true"
language="en"
hyphenation-push-character-count="2"
padding=".1in"
font-size="9pt"
font-family="Helvetica"
wrap-option="wrap"
>
<xsl:value-of select="desc"/>
</fo:block>
<fo:block
font-size="9pt">
<xsl:value-of select="@num"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
background-color="#DAEFFF"
border-style="solid"
border-width="1px"
border-color="silver">
</fo:table-cell>
</xsl:when>
<xsl:otherwise>
<fo:table-cell
border-style="solid"
border-width="1px"
border-color="silver">
<fo:block
text-align="justify"
font-size="9pt">
<xsl:value-of
select="stock-num"/>
 
<xsl:value-of select="price"/>
   
</fo:block>
<fo:block
hyphenate="true"
language="en"
hyphenation-push-character-count="2">
<fo:inline
font-size="9pt"
wrap-option="wrap">
<xsl:value-of select="desc"/>
</fo:inline>
</fo:block>
<fo:block
font-size="9pt">
<xsl:value-of select="@num"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
border-style="solid"
border-width="1px"
border-color="silver">
</fo:table-cell>
</xsl:otherwise>
</xsl:choose>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]