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 "Noll, Jeffrey T HS" <je...@hs.utc.com> on 2006/03/30 22:50:29 UTC

Resetting page counts in fop

I'm generating a single PDF that contains multiple invoices. The invoices
each have a separate page count. I want the page counts on each invoice in
the PDF to be relative to only itself.

	IE the 3rd invoice has 2 pages so should show page 1 of 2 and 2 of 2
in their headers.

Is there an easy way of doing this? Using position() to dynamically create
an fo:block that has the position() as part of the id to uniquely handle the
last page. But I'm not sure how to get the relative current page.
	Any ideas appreciated,

Thanks,


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


Re: Resetting page counts in fop

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Yes, but it's initial-page-number, not "start-count". The split into
multiple page-sequences helps you with memory-consumption as a nice
side-effect. :-)

On 31.03.2006 16:41:40 Noll, Jeffrey T           HS wrote:
> Ok, so currently it is basically <fo:page-sequence> process each invoice
> </fo:page-sequence>
> 
> What I want is <for each invoice>
>                  <fo:page-sequence start-count="1">
>                  </fo:page-sequence>
>                </for each>
> ?
> 
> I know the sytax is totally wrong, just looking for general idea.
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Sent: Friday, March 31, 2006 4:34 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Resetting page counts in fop
> 
> You can use initial-page-number="1" on every fo:page-sequence. Your
> intuition about using position() to generate unique ids is good. HTH
> 
> On 30.03.2006 22:50:29 Noll, Jeffrey T           HS wrote:
> > I'm generating a single PDF that contains multiple invoices. The invoices
> > each have a separate page count. I want the page counts on each invoice in
> > the PDF to be relative to only itself.
> > 
> > 	IE the 3rd invoice has 2 pages so should show page 1 of 2 and 2 of 2
> > in their headers.
> > 
> > Is there an easy way of doing this? Using position() to dynamically create
> > an fo:block that has the position() as part of the id to uniquely handle
> the
> > last page. But I'm not sure how to get the relative current page.
> > 	Any ideas appreciated,



Jeremias Maerki


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


Re: Resetting page counts in fop

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You can use initial-page-number="1" on every fo:page-sequence. Your
intuition about using position() to generate unique ids is good. HTH

On 30.03.2006 22:50:29 Noll, Jeffrey T           HS wrote:
> I'm generating a single PDF that contains multiple invoices. The invoices
> each have a separate page count. I want the page counts on each invoice in
> the PDF to be relative to only itself.
> 
> 	IE the 3rd invoice has 2 pages so should show page 1 of 2 and 2 of 2
> in their headers.
> 
> Is there an easy way of doing this? Using position() to dynamically create
> an fo:block that has the position() as part of the id to uniquely handle the
> last page. But I'm not sure how to get the relative current page.
> 	Any ideas appreciated,


Jeremias Maerki


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


Re: Resetting page counts in fop

Posted by Roberto Nunnari <ro...@supsi.ch>.
What about marker and marker-retriver?
I'm still a beginner with fo, but I believe you could use them to
keep record of the current invoice page and reset it to 1 each
time a new invoice starts and then increment at every invoice page.

Hope that helps.
--
Robi.


Noll, Jeffrey T HS wrote:
> I'm generating a single PDF that contains multiple invoices. The invoices
> each have a separate page count. I want the page counts on each invoice in
> the PDF to be relative to only itself.
> 
> 	IE the 3rd invoice has 2 pages so should show page 1 of 2 and 2 of 2
> in their headers.
> 
> Is there an easy way of doing this? Using position() to dynamically create
> an fo:block that has the position() as part of the id to uniquely handle the
> last page. But I'm not sure how to get the relative current page.
> 	Any ideas appreciated,
> 
> Thanks,
> 
> 
> ---------------------------------------------------------------------
> 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