Page-Sequence optimization! Well I am not really sure how to do that. I 
have tried to reduce the number of tables and font specifications in 
table-cells. But if you could throw a pointer as to how I can achieve the 
page-sequence optimization, that'd be really helpful.
I have pasted the xsl file here. (It's big one though). Let me know if you 
can deduce something from this which could help me in doing the 
optimization.

<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:vc="http://localhost";>

        <xsl:import href="ProcessName.xsl"/>
        <xsl:import href="ProcessCodePdf.xsl"/>
        <xsl:import href="set_ICD_Dec_pt.xsl"/>
        <xsl:import href="formatDate.xsl"/>
        <xsl:param name="UserId"/>
        <xsl:param name="Date"/>
        <xsl:param name="firstName"/>
        <xsl:param name="middleName"/>
        <xsl:param name="lastName"/>
        <xsl:param name="parentTag"/>
        <xsl:param name="valueTag"/>
        <xsl:param name="imageName"/>
        <xsl:param name="noOfGroups"/>

        <xsl:function name="vc:tokenize">
                <xsl:param name="icd_code"/>
            <xsl:choose>
              <xsl:when test="contains($icd_code, ',')">
                <xsl:value-of 
select="vc:set_ICD_Dec_pt(substring-before($icd_code,','))"/>, 
<xsl:value-of select="vc:tokenize(substring-after($icd_code,','))"/>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="vc:set_ICD_Dec_pt($icd_code)"/>
              </xsl:otherwise>
            </xsl:choose>
        </xsl:function>

<xsl:template match="ERROR_DETAIL_EXCEL_ROOT" priority="10">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:fox="http://xml.apache.org/fop/extensions";>
 
        <fo:layout-master-set>
 
        <fo:page-sequence-master master-name="chapter-master">
          <fo:repeatable-page-master-alternatives>
            <fo:conditional-page-master-reference page-position="any" 
odd-or-even="any" master-name="any-page"/>
          </fo:repeatable-page-master-alternatives>
        </fo:page-sequence-master>

 
        <fo:simple-page-master
            margin-left="0.5in"
            margin-right="0.5in"
            margin-bottom="0.4in"
            margin-top="0.4in"
            page-width="11.0in"
            page-height="8.5in"
 
            page-master-name="any-page">
            <fo:region-before extent="2.00in" 
region-name="rest-region-before-odd"/>
                        <fo:region-after extent="0.25in"/>
            <!--<fo:region-after extent="0.25in" 
region-name="rest-region-after-odd"/>-->
                  <fo:region-body margin-top="1.25in" 
margin-bottom="0.5in" />
        </fo:simple-page-master>
      </fo:layout-master-set>


                <fox:outline internal-destination="Report">
                    <fox:label font-family="Helvetica" 
font-size="8px">Report</fox:label>
                </fox:outline>
                <fox:outline 
internal-destination="selectedFilterCriteria">
                    <fox:label font-family="Helvetica" 
font-size="8px">Selected Filter Criteria</fox:label>
                </fox:outline>
 
 
      <fo:page-sequence master-name="chapter-master">


      <fo:static-content flow-name="xsl-region-after">
        <fo:table table-layout="fixed">
                <fo:table-column />
                        <fo:table-column />
                <fo:table-column />
 
                        <fo:table-body >
                                <fo:table-row font-weight="bold">
                                    <fo:table-cell text-align="left" 
padding-left="1mm">
                                      <fo:block font-size="8px" 
font-weight="normal" margin-left="0.2cm"><xsl:value-of 
select="$Date"/></fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell text-align="center" 
padding-left="1mm">
                                      <fo:block font-size="8px" 
font-weight="normal" margin-left="0.0cm"><fo:page-number/></fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell text-align="right" 
padding-left="1mm">
                                      <fo:block font-size="8px" 
font-weight="normal" margin-left="0.0cm">Prepared By: <xsl:value-of 
select="$UserId"/></fo:block>
                                    </fo:table-cell>
                                  </fo:table-row>
                        </fo:table-body >
        </fo:table>
        </fo:static-content> 
 
 
                <fo:static-content flow-name="rest-region-before-odd">
                        <!--<fo:block   line-height="50pt" 
font-size="30px" break-after="line">-->
                        <fo:block   line-height="50pt" font-size="30px">
                                <fo:external-graphic 
vertical-align="bottom" height="26pt" src="{$imageName}" /> 
                                <fo:inline  vertical-align="top" 
font-size="15px">&#x2122; </fo:inline><fo:inline vertical-align="bottom" 
font-size="25px" >Claim Scrubber</fo:inline>
                        </fo:block>
                        <fo:table>
                                <fo:table-column />
                                <fo:table-body >
                                        <fo:table-row>
                                                <fo:table-cell 
text-align="left">
                                                        <fo:block 
border-bottom-color="#ffffff" border-bottom-style="double" 
border-bottom-width="2pt" line-height="20pt" background-color="#cee3de" 
margin-left="0.0cm" padding-left="0.2cm"  font-weight="bold" 
margin-top="1.0in">
 <fo:retrieve-marker retrieve-class-name="page-header" 
retrieve-position="first-starting-within-page"/>
                                                                <fo:block 
border-bottom-color="#ffffff" border-bottom-style="double" 
border-bottom-width="2pt" line-height="20pt" background-color="#cee3de" 
margin-left="0.0cm" padding-left="0.2cm"  font-weight="bold" 
margin-top="1.0in">
 <fo:retrieve-marker retrieve-class-name="line-labels" 
retrieve-position="first-starting-within-page"/>
 </fo:block>
                                                        </fo:block>
                                                </fo:table-cell>
                                        </fo:table-row>
                                </fo:table-body >
                        </fo:table>
                </fo:static-content>
 



   <fo:flow flow-name="xsl-region-body">
                <fo:marker 
marker-class-name="continued">tocont</fo:marker>
 
                 <!--<xsl:for-each 
select="REPORT_BY_GROUPS/GROUP_DETAIL">-->
                        <xsl:variable name="groupNo">
                                <xsl:number value="position()"/>
                        </xsl:variable>
                        <xsl:variable name="breakPage">
                                <xsl:if 
test="$groupNo!='1'"><xsl:text>page</xsl:text></xsl:if>
                        </xsl:variable>
                        <fo:block >
                                <fo:marker marker-class-name="line-labels" 
position="relative">
                 <fo:table vertical-align="middle" table-layout="fixed" 
font-family="Helvetica" background-color="#cee3de" >
                                <fo:table-column/>
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-body >
 
 
 
                                        <fo:table-row line-height="20pt" 
font-size="10px" color="#000000" margin-left="0.2cm"  font-weight="bold">
                                        </fo:table-row>
 
 <fo:table-row line-height="20pt" font-size="10px" color="#000000" 
margin-left="0.2cm" font-weight="bold">
 <fo:table-cell text-align="left">
        <fo:block  >
                Line
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="2" text-align="left">
        <fo:block >
                CPT/HCPCS
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="4" text-align="left">
        <fo:block >
                Diagnosis Codes
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="3" text-align="left">
        <fo:block >
                Modifiers
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="2" text-align="left">
        <fo:block >
                $ Amount
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="2" text-align="left">
        <fo:block >
                From
        </fo:block>
 </fo:table-cell>
 <fo:table-cell  number-columns-spanned="2" text-align="left">
        <fo:block>
                Thru
        </fo:block>
 </fo:table-cell>
 </fo:table-row> 
                                </fo:table-body>
                        </fo:table>
                        </fo:marker>
                        </fo:block>
                <fo:table table-layout="fixed"  font-family="Helvetica" 
id="Report">
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-column />
                        <fo:table-body > 
 
                                <xsl:for-each select="BILL_HEADER">
                                        <fo:table-row 
vertical-align="middle">
                                            <fo:table-cell 
border-color="#ffffff" border-style="double" border-width="3pt" 
number-columns-spanned="4"   background-color="#ffffff" text-align="left">
                                                        <fo:block>
                                                                <fo:marker 
marker-class-name="page-header" position="relative">
 Error Detail Report - No Group Selected
 </fo:marker>
                                                        </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row 
vertical-align="middle">
                                            <fo:table-cell 
border-color="#ffffff" border-style="double" border-width="3pt" 
number-columns-spanned="4"   background-color="#ffffff" text-align="left">
                                                        <fo:block>
                                                                <fo:marker 
marker-class-name="new-header" position="relative">
 Line Report - 
 </fo:marker>
                                                        </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <!--<fo:table-row 
break-before="line"  vertical-align="middle">-->
                                        <fo:table-row 
vertical-align="middle">
                                            <fo:table-cell 
border-color="#ffffff" border-style="double" border-width="3pt" 
number-columns-spanned="16"   background-color="#ffffff" 
text-align="left">
                                              <fo:block line-height="20pt" 
text-decoration="none" font-size="10px" font-weight="bold" 
margin-left="0.2cm">
                                                Claim Information for 
<xsl:value-of select="CLAIM_ID"/>
                                              </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
 
 <fo:table-row line-height="16pt" font-size="10px" margin-left="0.2cm" 
table-layout="fixed"  font-family="Helvetica"  background-color="#ffffff" 
border-color="#ffffff" border-style="double" border-width="1pt" 
text-align="left">
 <fo:table-cell number-columns-spanned="4">
 <fo:block  >
 <!--Template: <xsl:value-of select="INS_PGM_ID"/>: <xsl:value-of 
select="INSURANCE_NAME"/>                               -->
 Template: <xsl:value-of 
select="BILL_HEADER/descendant::INSURANCE_NAME[position()=1]"/>     
 </fo:block>
 </fo:table-cell>
 <fo:table-cell number-columns-spanned="4">
 <fo:block  >
 Batch Id: <xsl:value-of select="BATCH_ID"/>   
 </fo:block>
 </fo:table-cell>
 <fo:table-cell number-columns-spanned="4">
 <fo:block  >
 Batch Run Date: <xsl:value-of select="vc:format-date(BILL_BEG_DOS)"/>     
 
 </fo:block>
 </fo:table-cell>
 <fo:table-cell number-columns-spanned="4">
 <fo:block  >
 Payer Id: <xsl:value-of select="Line_Item[position()=1]/PRI_PAY_ID"/>     
 
 </fo:block>
 </fo:table-cell>
 </fo:table-row>
 <fo:table-row line-height="16pt" font-size="10px" margin-left="0.2cm" 
table-layout="fixed"  font-family="Helvetica"  background-color="#ffffff" 
border-color="#ffffff" border-style="double" border-width="1pt">
 <fo:table-cell number-columns-spanned="16">
 <fo:block >
 Claim Charge: <xsl:value-of select="TOTAL_CHARGE"/>
 </fo:block>
 </fo:table-cell> 
 </fo:table-row>
 <fo:table-row line-height="16pt" font-size="10px" margin-left="0.2cm" 
table-layout="fixed"  font-family="Helvetica"  background-color="#ffffff" 
border-color="#ffffff" border-style="double" border-width="1pt">
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Patient: 
 <xsl:call-template name="ProcessName">
        <xsl:with-param name="firstName">
                <xsl:value-of select="PATIENT_FIRST_NAME"/>
        </xsl:with-param>
        <xsl:with-param name="middleName">
                <xsl:value-of select="PATIENT_MIDDLE_NAME"/>
        </xsl:with-param>
        <xsl:with-param name="lastName">
                <xsl:value-of select="PATIENT_LAST_NAME"/>
        </xsl:with-param>
 </xsl:call-template> 

 </fo:block>
 </fo:table-cell> 
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Patient Id: <xsl:value-of select="PATIENT_ID"/>
 </fo:block>
 </fo:table-cell> 
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Patient DOB: <xsl:value-of select="vc:format-date(PATIENT_DOB)"/>
 </fo:block>
 </fo:table-cell> 
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Patient Gender: <xsl:value-of select="PATIENT_GENDER"/>
 </fo:block>
 </fo:table-cell> 
 </fo:table-row>
 <fo:table-row line-height="16pt" font-size="10px" margin-left="0.2cm" 
table-layout="fixed"  font-family="Helvetica"  background-color="#ffffff" 
border-color="#ffffff" border-style="double" border-width="1pt">
 <xsl:for-each-group  select="Line_Item" group-by="SRVC_PRV_ID">
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Physician: 
 <xsl:call-template name="ProcessName">
        <xsl:with-param name="firstName">
                <xsl:value-of select="SRVC_PRV_FNAME"/>
        </xsl:with-param>
        <xsl:with-param name="middleName">
                <xsl:value-of select="SRVC_PRV_MNAME"/>
        </xsl:with-param>
        <xsl:with-param name="lastName">
                <xsl:value-of select="SRVC_PRV_LNAME"/>
        </xsl:with-param>
 </xsl:call-template> 
 </fo:block>
 </fo:table-cell> 
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Physician Id: <xsl:value-of select="SRVC_PRV_ID"/>
 </fo:block>
 </fo:table-cell> 
 </xsl:for-each-group> 
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Ref Physician: <xsl:value-of select="REF_PHYS_FNAME"/>
 </fo:block>
 </fo:table-cell>
 <fo:table-cell number-columns-spanned="4">
 <fo:block >
 Ref Physician Id: <xsl:value-of select="REF_PHYS_ID"/>
 </fo:block>
 </fo:table-cell> 
 </fo:table-row>
 <fo:table-row margin-left="0cm">
 <fo:table-cell line-height="4pt" number-columns-spanned="16" 
text-align="left">
 <fo:block  padding-top="1mm" padding-bottom="1mm" 
border-bottom-style="solid" border-bottom-width="1pt" 
border-bottom-color="#ffffff"  >
   <fo:leader color="#53868B" leader-length.minimum="100%" 
leader-length.optimum="100%" leader-length.maximum="100%" 
leader-pattern="dots"/>
 </fo:block>
 </fo:table-cell> 
 </fo:table-row> 
 
 <xsl:for-each select="Line_Item">
        <fo:table-row text-align="left" background-color="#ffffff" 
margin-left="0.2cm" font-size="10px" line-height="16pt" font-weight="bold" 
font-family="Helvetica">
                <fo:table-cell  number-columns-spanned="1">
                        <fo:block >
                                <xsl:value-of select="ORIG_LINE"/>
                        </fo:block>
                </fo:table-cell>
                <fo:table-cell  number-columns-spanned="2">
                        <fo:block >
                                <xsl:value-of select="SUB_PROC_CODE"/>
                        </fo:block>
                </fo:table-cell> 
                <fo:table-cell  number-columns-spanned="4">
                        <fo:block >
                            <xsl:value-of select="vc:tokenize(ICD_CODE)"/>
                        </fo:block>
                </fo:table-cell> 
                <fo:table-cell  number-columns-spanned="3">
                        <fo:block >
                                <xsl:value-of select="MODIFIER"/>
                        </fo:block>
                </fo:table-cell>
                <fo:table-cell  number-columns-spanned="2">
                        <fo:block >
                                <xsl:value-of select="SUB_AMT"/>
                        </fo:block>
                </fo:table-cell> 
                <fo:table-cell  number-columns-spanned="2">
                        <fo:block >
                                <xsl:value-of 
select="vc:format-date(../BILL_BEG_DOS)"/>
                        </fo:block>
                </fo:table-cell> 
                <fo:table-cell  number-columns-spanned="2" 
text-align="left">
                        <fo:block >
                                <xsl:value-of 
select="vc:format-date(../BILL_END_DOS)"/>
                        </fo:block>
                </fo:table-cell> 
        </fo:table-row>

        <xsl:for-each select="ERROR_MASTER">
                <fo:table-row margin-left="0.2cm" font-size="8px" 
line-height="16pt" font-weight="normal" font-family="Helvetica" 
vertical-align="middle" text-align="left">
                        <fo:table-cell  text-align="left">
                                <fo:block/>
                        </fo:table-cell>  
                        <fo:table-cell number-columns-spanned="3">
                                <fo:block >
                                        Error Severity: <xsl:value-of 
select="SEVERITY"/>
                                </fo:block>
                        </fo:table-cell>  
                        <fo:table-cell number-columns-spanned="2">
                                <fo:block >
                                        ID: <xsl:value-of 
select="ERROR_ID"/>
                                </fo:block>
                        </fo:table-cell>  
                        <fo:table-cell number-columns-spanned="3">
                                <fo:block >
                                        <!--Group: <xsl:value-of 
select="GROUP_NAME"/>-->
                                        Group: <xsl:value-of 
select="descendant::GROUP_DESC"/>
                                </fo:block>
                        </fo:table-cell>  
                        <fo:table-cell number-columns-spanned="11">
                                <fo:block >
                                        <xsl:value-of select="MESSAGE"/>
                                </fo:block>
                        </fo:table-cell>  
                </fo:table-row> 
        </xsl:for-each>                         <!-- Close Error Master 
--> 
 
   <fo:table-row margin-left="0cm">
     <fo:table-cell background-color="#ffffff" line-height="4pt" 
number-columns-spanned="16" text-align="left">
       <fo:block  padding-top="1mm" padding-bottom="1mm" 
border-bottom-style="solid" border-bottom-width="1pt" 
border-bottom-color="#ffffff"  >
                  <fo:leader color="#53868B" leader-length.minimum="100%" 
leader-length.optimum="100%" leader-length.maximum="100%" 
leader-pattern="rule"/>
       </fo:block>
     </fo:table-cell> 
   </fo:table-row>
 </xsl:for-each> <!-- Close Line Iterm --> 
                                </xsl:for-each> 
 
                        </fo:table-body >
                </fo:table>
 
                <!-- Filter Report -->

                        <fo:table background-color="#cee3de" 
border-width="0.1mm" border-style="solid" >
                                                        <fo:table-column/>
                                                        <fo:table-column/>
                                                        <fo:table-column/>
                                                        <fo:table-column/>
 
 

                                <fo:table-body >
                                                <fo:table-row 
font-weight="bold" break-before="page">
                                                        <fo:table-cell 
text-align="center" number-columns-spanned="4" 
id="selectedFilterCriteria">
 <!--<fo:block margin-left="0.4cm">Selected Filter Criteria</fo:block>-->
 <fo:block>
 <fo:marker marker-class-name="page-header" position="relative">
        Selected Filter Criteria  
 </fo:marker>
 </fo:block>
 <fo:block>
 <fo:marker marker-class-name="line-labels" position="relative">     
 </fo:marker>
 </fo:block>
                                                        </fo:table-cell>
                                                </fo:table-row>
                <xsl:for-each select="FILTER_REPORT/FILTER">
                                                <fo:table-row >
                                                        <fo:table-cell 
text-align="left" padding-top="0.5cm">
                                                                <fo:block 
font-weight="bold" font-size="10px" margin-left="0.5cm"><xsl:value-of 
select="LABEL"/></fo:block>
                                                        </fo:table-cell>
                                                        <fo:table-cell 
text-align="left" padding-top="0.5cm" number-columns-spanned="3">
                                                                <fo:block 
font-weight="normal" font-size="10px" margin-left="0.5cm"><xsl:value-of 
select="VALUE"/></fo:block>
                                                        </fo:table-cell>
                                                </fo:table-row>
                </xsl:for-each>
                                        </fo:table-body>
                                </fo:table>
                <!-- Filter Report --> 
 
 
 
       </fo:flow>
        </fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet> 


---
Neeraj Jain
3M HIS, 
8 King Road, Rockleigh
NJ. 07647 USA
Direct - 201 750 5931
[EMAIL PROTECTED]
[EMAIL PROTECTED]



Jeremias Maerki <[EMAIL PROTECTED]> 
03/29/2006 02:46 PM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: generating large pdf reports using fop






Hmm, that's disappointing. I'd have expected more from JasperReport. On
the other side, it's very satisfying that FOP at least produces the
report (did you do the page-sequence optimization already?). I've never
used a Java-based reporting engine so I can't really give any
recommendations. I used to work on a non-public Delphi-based one in an
earlier life so I know that large documents shouldn't be a problem if
done right. A search on the net should reveal other tools. Maybe someone
else on this list has some recommendations. Sorry.

On 29.03.2006 21:29:54 njain wrote:
> Could you suggest me as to which reporting engine I could use. I tried 
> using JasperReport but it looks like that also uses lot of memory and 
> can't generate reports as big as 400MB.
> 
> ---
> Neeraj Jain
> 3M HIS, 
> 8 King Road, Rockleigh
> NJ. 07647 USA
> Direct - 201 750 5931
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> 
> 
> 
> Jeremias Maerki <[EMAIL PROTECTED]> 
> 03/29/2006 02:24 PM
> Please respond to
> [email protected]
> 
> 
> To
> [email protected]
> cc
> 
> Subject
> Re: generating large pdf reports using fop
> 
> 
> 
> 
> 
> 
> If you generate a large report with lots of tabular data then yes,
> you're probably using the wrong tool. Reporting engines can do that much
> more efficiently. Otherwise, there are simply the usual suggestions:
> http://xmlgraphics.apache.org/fop/0.20.5/running.html#memory
> 
> On 29.03.2006 17:19:20 njain wrote:
> > Hello,
> >         I need to generate large pdf file(as big as 500MB - 1GB).
> >         I have the input as xml file and using SAXON8 to transform to 
FO 
> 
> > object. And then using FOP-0.25.0 version to transform the FO object 
to 
> > pdf file.
> >         Unfortunately, it runs out of memory if I have xmx=128MB and 
> takes 
> > almost forever if xmx=512MB.
> >         I see that when I specify xmx=512MB, fop occupies the whole 
> system 
> > memory. Is this the way it is supposed to work or it is supposed to 
> stream 
> > the data. I am not sure if FOP is the right thing to be used here. 
> Kindly 
> > suggest.
> > 
> >         Following is the environment:
> >                 XSLT processor: SAXON8
> >                 XSLT Version: 2.0
> >                 FOP Version: 0.20.5



Jeremias Maerki


---------------------------------------------------------------------
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]

Reply via email to