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 Roberto Nunnari <ro...@supsi.ch> on 2006/01/31 17:56:52 UTC
total per page
Hello list.
I'm new to FO and I'm enjoying fop-0.20.5 quite a lot.
Thank you to all who developed this excellent piece of software!
Now my question:
A java program generates a FO document that is then given to
fop to generate a pdf document. This document (a kind of bill)
is made up of text lines that may extend over several pages.
Each of this text lines may or may not include a decimal number.
Everything is fine till here and as the FO generation is done
in java, there is a total that is summed up to each decimal number
encountered so that the total is shown at the end of the document,
but I also need to have the current total at the end of
each page and at the beginnig of each new page in the final
pdf document, and here is where I ask for help.
Could any kind soul help me, please?
Thank you again.
--
Robi
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Roberto Nunnari <ro...@supsi.ch>.
Yes! That did the job!
Thank you very much! Keep up with the great work, guys!
FOP is a wonderful piece of software!
Best regards.
--
Robi
Jeremias Maerki wrote:
> I'll be working on page-position="last" this month. :-) But there may
> also be another aprroach, one that I haven't tested, though:
>
> If you define the whole subtotal line inside the marker and not only the
> value itself, you could simply omit the subtotal line on the last line.
> That'll get you a slighlty higher memory-consumption but may solve your
> problem.
>
> On 01.02.2006 19:40:40 Andreas L Delmelle wrote:
>
>>On Feb 1, 2006, at 18:45, Roberto Nunnari wrote:
>>
>>Hi,
>>
>>
>>>One more question..
>>>
>>>What if I don't want the static area with the subtotal not to be
>>>printed on the last page? Is that possible?
>>
>>In theory: yes. You would need to define a fo:conditional-page-master
>>with page-position="last()", which has no fo:static-content (or at
>>least one that doesn't contain a fo:retrieve-marker).
>>
>>In practice...
>>see: http://xmlgraphics.apache.org/fop/compliance.html#fo-property-
>>page-position
>>
>>:-(
>
>
>
> 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: total per page
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'll be working on page-position="last" this month. :-) But there may
also be another aprroach, one that I haven't tested, though:
If you define the whole subtotal line inside the marker and not only the
value itself, you could simply omit the subtotal line on the last line.
That'll get you a slighlty higher memory-consumption but may solve your
problem.
On 01.02.2006 19:40:40 Andreas L Delmelle wrote:
> On Feb 1, 2006, at 18:45, Roberto Nunnari wrote:
>
> Hi,
>
> > One more question..
> >
> > What if I don't want the static area with the subtotal not to be
> > printed on the last page? Is that possible?
>
> In theory: yes. You would need to define a fo:conditional-page-master
> with page-position="last()", which has no fo:static-content (or at
> least one that doesn't contain a fo:retrieve-marker).
>
> In practice...
> see: http://xmlgraphics.apache.org/fop/compliance.html#fo-property-
> page-position
>
> :-(
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 1, 2006, at 18:45, Roberto Nunnari wrote:
Hi,
> One more question..
>
> What if I don't want the static area with the subtotal not to be
> printed on the last page? Is that possible?
In theory: yes. You would need to define a fo:conditional-page-master
with page-position="last()", which has no fo:static-content (or at
least one that doesn't contain a fo:retrieve-marker).
In practice...
see: http://xmlgraphics.apache.org/fop/compliance.html#fo-property-
page-position
:-(
Sorry,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Roberto Nunnari <ro...@supsi.ch>.
Hello.
One more question..
What if I don't want the static area with the subtotal not to be
printed on the last page? Is that possible?
Jeremias Maerki wrote:
> No, that's the fun about it. fo:retrieve-marker will determine the right
> marker depending on the decisions of the layout engine using the
> parameters you give there (retrieve-boundary, retrieve-position).
>
> I recommend you read at least once through the text for fo:marker and
> fo:retrieve-marker in the FO specification or the respective section in
> your favorite XSL-FO book.
>
> On 01.02.2006 16:19:14 Roberto Nunnari wrote:
>
>>Thank you! That seams exactly what I need..
>>Only one concern.. isn't that a problem if the resulting
>>FO document contains several (one for row) fo:marker
>>with the same name??
>>
>>Best regards.
>>--
>>Robi
>>
>>
>>Jeremias Maerki wrote:
>>
>>>He meant this:
>>>http://marc.theaimsgroup.com/?l=fop-user&m=109035492329917&w=2
>>>
>>>I hope that helps.
>>>
>>>On 01.02.2006 15:09:19 Roberto Nunnari wrote:
>>>
>>>
>>>>Hello list.
>>>>
>>>>Can anybody tell me what J.Pietschmann meant by 'a marker based solution'?
>>>>
>>>>Best regards.
>>>>--
>>>>Robi.
>>>>
>>>>
>>>>J.Pietschmann wrote:
>>>>
>>>>
>>>>>Roberto Nunnari wrote:
>>>>>
>>>>>
>>>>>
>>>>>>but I also need to have the current total at the end of
>>>>>>each page and at the beginnig of each new page in the final
>>>>>>pdf document, and here is where I ask for help.
>>>>>
>>>>>
>>>>>In general, there is no standard (or easy) way to solve this. FOP
>>>>>doesn't do calculations involving data from the content, and OTOH
>>>>>there is no way for other tools to know what content is on a page.
>>>>>
>>>>>There are solutions in some special cases:
>>>>>1. If you can live with a partial sum from the beginning to the
>>>>>(end of) the current page rather than the total of the current page,
>>>>> you can use a marker based solution.
>>>>>2. If you can reasonably estimate how much content fits on a page,
>>>>>you can precompute the layout the pages, including the page totals.
>>>>>
>>>>>A more flexible solution would be coding a functional extension to FOP
>>>>>involving the evaluation of expressions which may refer to marker
>>>>>content.
>>>>>
>>>>>J.Pietschmann
>>>
>>>
>>>
>>>
>>>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
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
--
Roberto Nunnari -software engineer-
mailto:roberto.nunnari@supsi.ch
Scuola Universitaria Professionale della Svizzera Italiana
Dipartimento Tecnologie Innovative
http://www.dti.supsi.ch
SUPSI-DTI
Via Cantonale tel: +41-91-6108561
6928 Manno """ fax: +41-91-6108570
Switzerland (o o)
=======================oOO==(_)==OOo========================
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
No, that's the fun about it. fo:retrieve-marker will determine the right
marker depending on the decisions of the layout engine using the
parameters you give there (retrieve-boundary, retrieve-position).
I recommend you read at least once through the text for fo:marker and
fo:retrieve-marker in the FO specification or the respective section in
your favorite XSL-FO book.
On 01.02.2006 16:19:14 Roberto Nunnari wrote:
> Thank you! That seams exactly what I need..
> Only one concern.. isn't that a problem if the resulting
> FO document contains several (one for row) fo:marker
> with the same name??
>
> Best regards.
> --
> Robi
>
>
> Jeremias Maerki wrote:
> > He meant this:
> > http://marc.theaimsgroup.com/?l=fop-user&m=109035492329917&w=2
> >
> > I hope that helps.
> >
> > On 01.02.2006 15:09:19 Roberto Nunnari wrote:
> >
> >>Hello list.
> >>
> >>Can anybody tell me what J.Pietschmann meant by 'a marker based solution'?
> >>
> >>Best regards.
> >>--
> >>Robi.
> >>
> >>
> >>J.Pietschmann wrote:
> >>
> >>>Roberto Nunnari wrote:
> >>>
> >>>
> >>>>but I also need to have the current total at the end of
> >>>>each page and at the beginnig of each new page in the final
> >>>>pdf document, and here is where I ask for help.
> >>>
> >>>
> >>>In general, there is no standard (or easy) way to solve this. FOP
> >>>doesn't do calculations involving data from the content, and OTOH
> >>>there is no way for other tools to know what content is on a page.
> >>>
> >>>There are solutions in some special cases:
> >>>1. If you can live with a partial sum from the beginning to the
> >>> (end of) the current page rather than the total of the current page,
> >>> you can use a marker based solution.
> >>>2. If you can reasonably estimate how much content fits on a page,
> >>> you can precompute the layout the pages, including the page totals.
> >>>
> >>>A more flexible solution would be coding a functional extension to FOP
> >>>involving the evaluation of expressions which may refer to marker
> >>>content.
> >>>
> >>>J.Pietschmann
> >
> >
> >
> >
> > 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
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Roberto Nunnari <ro...@supsi.ch>.
Thank you! That seams exactly what I need..
Only one concern.. isn't that a problem if the resulting
FO document contains several (one for row) fo:marker
with the same name??
Best regards.
--
Robi
Jeremias Maerki wrote:
> He meant this:
> http://marc.theaimsgroup.com/?l=fop-user&m=109035492329917&w=2
>
> I hope that helps.
>
> On 01.02.2006 15:09:19 Roberto Nunnari wrote:
>
>>Hello list.
>>
>>Can anybody tell me what J.Pietschmann meant by 'a marker based solution'?
>>
>>Best regards.
>>--
>>Robi.
>>
>>
>>J.Pietschmann wrote:
>>
>>>Roberto Nunnari wrote:
>>>
>>>
>>>>but I also need to have the current total at the end of
>>>>each page and at the beginnig of each new page in the final
>>>>pdf document, and here is where I ask for help.
>>>
>>>
>>>In general, there is no standard (or easy) way to solve this. FOP
>>>doesn't do calculations involving data from the content, and OTOH
>>>there is no way for other tools to know what content is on a page.
>>>
>>>There are solutions in some special cases:
>>>1. If you can live with a partial sum from the beginning to the
>>> (end of) the current page rather than the total of the current page,
>>> you can use a marker based solution.
>>>2. If you can reasonably estimate how much content fits on a page,
>>> you can precompute the layout the pages, including the page totals.
>>>
>>>A more flexible solution would be coding a functional extension to FOP
>>>involving the evaluation of expressions which may refer to marker
>>>content.
>>>
>>>J.Pietschmann
>
>
>
>
> 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: total per page
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
He meant this:
http://marc.theaimsgroup.com/?l=fop-user&m=109035492329917&w=2
I hope that helps.
On 01.02.2006 15:09:19 Roberto Nunnari wrote:
> Hello list.
>
> Can anybody tell me what J.Pietschmann meant by 'a marker based solution'?
>
> Best regards.
> --
> Robi.
>
>
> J.Pietschmann wrote:
> > Roberto Nunnari wrote:
> >
> >> but I also need to have the current total at the end of
> >> each page and at the beginnig of each new page in the final
> >> pdf document, and here is where I ask for help.
> >
> >
> > In general, there is no standard (or easy) way to solve this. FOP
> > doesn't do calculations involving data from the content, and OTOH
> > there is no way for other tools to know what content is on a page.
> >
> > There are solutions in some special cases:
> > 1. If you can live with a partial sum from the beginning to the
> > (end of) the current page rather than the total of the current page,
> > you can use a marker based solution.
> > 2. If you can reasonably estimate how much content fits on a page,
> > you can precompute the layout the pages, including the page totals.
> >
> > A more flexible solution would be coding a functional extension to FOP
> > involving the evaluation of expressions which may refer to marker
> > content.
> >
> > J.Pietschmann
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: total per page
Posted by Roberto Nunnari <ro...@supsi.ch>.
Hello list.
Can anybody tell me what J.Pietschmann meant by 'a marker based solution'?
Best regards.
--
Robi.
J.Pietschmann wrote:
> Roberto Nunnari wrote:
>
>> but I also need to have the current total at the end of
>> each page and at the beginnig of each new page in the final
>> pdf document, and here is where I ask for help.
>
>
> In general, there is no standard (or easy) way to solve this. FOP
> doesn't do calculations involving data from the content, and OTOH
> there is no way for other tools to know what content is on a page.
>
> There are solutions in some special cases:
> 1. If you can live with a partial sum from the beginning to the
> (end of) the current page rather than the total of the current page,
> you can use a marker based solution.
> 2. If you can reasonably estimate how much content fits on a page,
> you can precompute the layout the pages, including the page totals.
>
> A more flexible solution would be coding a functional extension to FOP
> involving the evaluation of expressions which may refer to marker
> content.
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> 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: total per page
Posted by Roberto Nunnari <ro...@supsi.ch>.
Hi J.Pietschmann.
Thank you for your reply.
Solution #1 would be good enough for me. As I'm a beginner with
FO, I'd like to ask if you could be kind enough to put me on
the right direction with a short FO-code example.. if you have
no time, even telling me the name of the objects to use would be
a great help to me..
As a beninner I suspect that I should use some kind of static-area
at the bottom of each page where to put the partial total, but
I'd like to hear the word of the experts for the correct way
to go.
Thank you again.
--
Robi
J.Pietschmann wrote:
> Roberto Nunnari wrote:
>
>> but I also need to have the current total at the end of
>> each page and at the beginnig of each new page in the final
>> pdf document, and here is where I ask for help.
>
>
> In general, there is no standard (or easy) way to solve this. FOP
> doesn't do calculations involving data from the content, and OTOH
> there is no way for other tools to know what content is on a page.
>
> There are solutions in some special cases:
> 1. If you can live with a partial sum from the beginning to the
> (end of) the current page rather than the total of the current page,
> you can use a marker based solution.
> 2. If you can reasonably estimate how much content fits on a page,
> you can precompute the layout the pages, including the page totals.
>
> A more flexible solution would be coding a functional extension to FOP
> involving the evaluation of expressions which may refer to marker
> content.
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> 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: total per page
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Roberto Nunnari wrote:
> but I also need to have the current total at the end of
> each page and at the beginnig of each new page in the final
> pdf document, and here is where I ask for help.
In general, there is no standard (or easy) way to solve this. FOP
doesn't do calculations involving data from the content, and OTOH
there is no way for other tools to know what content is on a page.
There are solutions in some special cases:
1. If you can live with a partial sum from the beginning to the
(end of) the current page rather than the total of the current page,
you can use a marker based solution.
2. If you can reasonably estimate how much content fits on a page,
you can precompute the layout the pages, including the page totals.
A more flexible solution would be coding a functional extension to FOP
involving the evaluation of expressions which may refer to marker
content.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org