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 s-...@artefrance.fr on 2004/08/10 09:32:52 UTC

Java App using FOP : How to communicate on the number of pages generated ?

Hi,

I am using FOP to generate huge PDF document in a java/swing application.

I made a little dialog box which tell the user about the progress of the 
transformation work (extracting data, serializing XML, first XSL 
transformation, etc..., and finally FOP).

I saw in the FOP logs that he knows how much pages were generated 
(outputing [INFO] logs) :

[INFO] [3]
[INFO] [4]
[INFO] [5]
[INFO] [6]
[INFO] [7]

I just would like to know if there is any event or something I could use 
to communicate this information to my user. So i can have in my dialog 
label :

Step 5 of 5 : Using FOP to generate PDF datas... page 3
Step 5 of 5 : Using FOP to generate PDF datas... page 4
Step 5 of 5 : Using FOP to generate PDF datas... page 5

etc...

Is there a better way than using a specific logger ?

Thanks forward for your help, and please excuse my english... :o)


--------------------------------------------------------------
Simon OUALID
--------------------------------------------------------------
ARTE FRANCE
Analyste Programmeur
s-oualid@artefrance.fr
Tél : 01.55.00.73.18
Fax : 01.55.00.73.89
--------------------------------------------------------------





Manoj_Nair@spe.sony.com
03/08/2004 19:19
Veuillez répondre à fop-user

 
        Pour :  fop-user@xml.apache.org
        cc : 
        Objet : Re: For each in xsl



Example...

                                <fo:table-row>
                                    <fo:table-cell
font-size="inherited-property-value(&apos;font-size&apos;) - 2pt"
padding-bottom="0pt" padding-left="0pt" padding-right="0pt"
padding-top="0pt" border-style="solid" border-width="1pt"
border-color="white" text-align="left" padding-start="3pt"
padding-end="3pt" padding-before="3pt" padding-after="3pt"
display-align="center">
                                        <fo:block />
                                    </fo:table-cell>
                                    <fo:table-cell
font-size="inherited-property-value(&apos;font-size&apos;) - 2pt"
padding-bottom="0pt" padding-left="0pt" padding-right="0pt"
padding-top="0pt" border-style="solid" border-width="1pt"
border-color="white" text-align="right" width="150pt" padding-start="3pt"
padding-end="3pt" padding-before="3pt" padding-after="3pt"
display-align="center">
                                        <fo:block>
                                            <xsl:for-each 
select="invoice">
                                                <fo:inline
font-weight="bold">
                                                    <xsl:for-each
select="TEMPLATE">
                                                        <xsl:for-each
select="PAGE">
                                                            <fo:inline
font-size="5pt">

<xsl:apply-templates />
                                                            </fo:inline>
                                                        </xsl:for-each>
                                                    </xsl:for-each>&#160;
                                                </fo:inline>
                                            </xsl:for-each>
                                            <fo:page-number 
font-size="5pt"
font-weight="bold" />&#160;<xsl:for-each select="invoice">
                                                <xsl:for-each
select="TEMPLATE">
                                                    <xsl:for-each
select="OF_WORD">
                                                        <fo:inline
font-size="5pt">

<xsl:apply-templates />
                                                        </fo:inline>
                                                    </xsl:for-each>
                                                </xsl:for-each>&#160;
                                            <fo:page-number-citation
font-size="5pt" ref-id="last-page"/>
                                            </xsl:for-each>
                                            <fo:inline
font-weight="bold">&#160;</fo:inline>
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>


  
                      Juan Manuel  
                      Bellina                  To: fop-user@xml.apache.org 
 
                      <juanmbellina@yah        cc:   
                      oo.com>                  Subject:  For each in xsl   
 
  
                      08/03/2004 10:12  
                      AM  
                      Please respond to  
                      fop-user  
  
  




I need to use the "for each" to make some rows in the
PDF but I do not know how to make it.
I am making a PDF design using Altova StyleVision.
Do you know if this tool allow me to introduce this
feature?
Can anybody send me a simple example?
Thanks,

Juan



__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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







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




Re: Java App using FOP : How to communicate on the number of pages generated ?

Posted by Chris Bowditch <bo...@hotmail.com>.
s-oualid@artefrance.fr wrote:

<snip/>

> Is there a better way than using a specific logger ?

Implementing a logger class that looks for the

[INFO] [1]
[INFO] [2]
etc

messages is the only way to report progress to the user. There is no way to 
know the total page count before hand either.

Chris


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