You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by nj...@mmm.com on 2006/03/29 17:19:20 UTC

generating large pdf reports using fop

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
 

---
Neeraj Jain
3M HIS, 
8 King Road, Rockleigh
NJ. 07647 USA
Direct - 201 750 5931
njain@mmm.com
neerajj@vmoksha.com

Re: generating large pdf reports using fop

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Paul Tremblay wrote:
> So forward references would mean memory cannot be released? 

Correct.
The machinery in FOP 0.20.5 roughly works a follows:
  Read the layout master set. Fortunately, it must be the
  first element in fo:root.
  loop until fo:root closes
    Build an internal representation of a FO tree for a
    page sequence.
    Loop until all FOs are laid out
      Create an area tree for a page and add it to the page queue.
      loop until page queue is empty
        if queue head can be rendered (no unresolved references)
          Render the area tree into the target stream and discard it.
        else
          break
       end loop
    end loop
    Discard FO tree for the page sequence.
  end loop
  Render forcibly whatever is left in the page queue.
  Write whatever is still necessary to the output stream (like
  embedding fonts etc.).

As you see, once a forward reference is encountered, intermediate data
structures are simply queued up until the reference is resolved, which
adds up quickly.

There are a few more caveats, mainly that the table FO tree elements as
well as a few other FOs have references to the corresponding areas,
which cause them to hang around in memory until the FO tree is discarded
rather than having them GC'd after the page has been rendered. This is
quite bad given that blind tables are necessary for many layout tricks
and workarounds for deficiencies in 0.20.5. Not to mention for reports
consisting of a single 3000 page table.

J.Pietschmann

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


Re: generating large pdf reports using fop

Posted by Paul Tremblay <ph...@iglou.com>.
On Wed, Mar 29, 2006 at 10:05:13PM +0200, Jeremias Maerki wrote:
> 
> Basically, this means that you have to try to design your stylesheet in
> a way, that you can produce multiple page-sequences (ATM, your
> stylesheet produces one single page-sequence). The reason for that: FOP
> can release memory after a page-sequence is processed, . So if you can find logical points in
> your report where you can force a new page, you can start a new
> page-sequence. Sometimes it means that you have to do some crude line
> counting to guess at FOP's line break decisions, sometimes this is not
> necessary which makes the whole job easier.
> 

Interesting. I didn't realize that memory can be released after a page
sequence. 

However, the catch is "especially if there are no forward references." 

So forward references would mean memory cannot be released? 

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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


Re: generating large pdf reports using fop

Posted by Lo...@log-net.com.
A crude line counting example:

<xsl:for-each select="details/data/reportrow[position() mod $rowCount = 
1]">
        <fo:page-sequence master-reference="generic" language="en" 
country="us">
                <fo:static-content flow-name="xsl-region-before">
                        <xsl:call-template name = "pageHeader"/>
                </fo:static-content>

                <fo:static-content flow-name="xsl-region-after">
                        <xsl:call-template name = "copyright"/>
                </fo:static-content>

                <fo:flow flow-name="xsl-region-body">
                        <fo:table table-layout="fixed" width="100%">
                        ...
                        </fo:table>
                </fo:flow>
        </fo:page-sequence>
</xsl:for-each>

Be aware, this results in some strange page breaking since table rows may 
wrap and be "taller" than you would expect.  It does help with memory 
consumption so even though it is ugly, my users still like it for "quick 
and dirty" reporting.

-Lou

Jeremias Maerki <de...@jeremias-maerki.ch> wrote on 03/29/2006 15:05:13:

> Basically, this means that you have to try to design your stylesheet in
> a way, that you can produce multiple page-sequences (ATM, your
> stylesheet produces one single page-sequence). The reason for that: FOP
> can release memory after a page-sequence is processed, especially if
> there are no forward references. So if you can find logical points in
> your report where you can force a new page, you can start a new
> page-sequence. Sometimes it means that you have to do some crude line
> counting to guess at FOP's line break decisions, sometimes this is not
> necessary which makes the whole job easier.
> 
> HTH
> 
> On 29.03.2006 21:52:28 njain wrote:
> > 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.
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

Re: generating large pdf reports using fop

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Basically, this means that you have to try to design your stylesheet in
a way, that you can produce multiple page-sequences (ATM, your
stylesheet produces one single page-sequence). The reason for that: FOP
can release memory after a page-sequence is processed, especially if
there are no forward references. So if you can find logical points in
your report where you can force a new page, you can start a new
page-sequence. Sometimes it means that you have to do some crude line
counting to guess at FOP's line break decisions, sometimes this is not
necessary which makes the whole job easier.

HTH

On 29.03.2006 21:52:28 njain wrote:
> 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.


Jeremias Maerki


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


Re: generating large pdf reports using fop

Posted by nj...@mmm.com.
Glenn,
        Thanks for the pointers. I'll try to do this and see the results.
        Thanks for the important information about not posting the 
confidential data also. I was kind of aware of it and that's why I 
modified the xsl also before posting on the list. Appreciate your help.

---
Neeraj Jain




Glen Mazza <gm...@apache.org> 
03/29/2006 07:25 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
Re: generating large pdf reports using fop






njain@mmm.com wrote:

> 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 would first try to imagine what you can logically break on.  Since you 
are apparently doing some form of health insurance information, you can 
break on doctor or patient or geographical region perhaps.  Find 
something your customer would like to see subtotals of, perhaps, and 
that can be a good place to start a new page sequence.

Next, after your fo:layout-master set, call a template that creates an 
fo:page-sequence for each of whatever that you are breaking on.  I have 
yet to do this (my reports are much smaller), but this should work well 
for you.

[As an aside, I'm in the process of trying to move Oracle Reports-based 
reports to XSL at work.  One thing I have upcoming is to build a 
stylesheet for a particular report that can dynamically break as above 
on *any* user-desired field: patient, doctor, hospital, state, etc., 
instead of being hardcoded to just break on one.  So one customer gets 
his reports one-page-sequence per doctor, others one-page-sequence per 
patient, etc.  I have no clue as to the difficulty of doing this, but 
you may wish to consider such a design yourself.]

Also, thankfully you didn't here, but just to warn you in case you may 
forget for a moment, be *very* careful not to accidently post any source 
XML data in any future question you have, as it appears that you are 
handling HIPAA data.

Glen

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





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


Re: generating large pdf reports using fop

Posted by Glen Mazza <gm...@apache.org>.
njain@mmm.com wrote:

> 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 would first try to imagine what you can logically break on.  Since you 
are apparently doing some form of health insurance information, you can 
break on doctor or patient or geographical region perhaps.  Find 
something your customer would like to see subtotals of, perhaps, and 
that can be a good place to start a new page sequence.

Next, after your fo:layout-master set, call a template that creates an 
fo:page-sequence for each of whatever that you are breaking on.  I have 
yet to do this (my reports are much smaller), but this should work well 
for you.

[As an aside, I'm in the process of trying to move Oracle Reports-based 
reports to XSL at work.  One thing I have upcoming is to build a 
stylesheet for a particular report that can dynamically break as above 
on *any* user-desired field: patient, doctor, hospital, state, etc., 
instead of being hardcoded to just break on one.  So one customer gets 
his reports one-page-sequence per doctor, others one-page-sequence per 
patient, etc.  I have no clue as to the difficulty of doing this, but 
you may wish to consider such a design yourself.]

Also, thankfully you didn't here, but just to warn you in case you may 
forget for a moment, be *very* careful not to accidently post any source 
XML data in any future question you have, as it appears that you are 
handling HIPAA data.

Glen

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


Re: generating large pdf reports using fop

Posted by nj...@mmm.com.
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
njain@mmm.com
neerajj@vmoksha.com



Jeremias Maerki <de...@jeremias-maerki.ch> 
03/29/2006 02:46 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
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
> njain@mmm.com
> neerajj@vmoksha.com
> 
> 
> 
> Jeremias Maerki <de...@jeremias-maerki.ch> 
> 03/29/2006 02:24 PM
> Please respond to
> fop-users@xmlgraphics.apache.org
> 
> 
> To
> fop-users@xmlgraphics.apache.org
> 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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org





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


Re: generating large pdf reports using fop

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
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
> njain@mmm.com
> neerajj@vmoksha.com
> 
> 
> 
> Jeremias Maerki <de...@jeremias-maerki.ch> 
> 03/29/2006 02:24 PM
> Please respond to
> fop-users@xmlgraphics.apache.org
> 
> 
> To
> fop-users@xmlgraphics.apache.org
> 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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating large pdf reports using fop

Posted by nj...@mmm.com.
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
njain@mmm.com
neerajj@vmoksha.com



Jeremias Maerki <de...@jeremias-maerki.ch> 
03/29/2006 02:24 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org





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


Re: generating large pdf reports using fop

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org