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 Richard FARAND <ri...@la-gi.fr> on 2007/08/28 15:00:30 UTC

resetting page-number to 0

Hi,

I'm trying to force my first page-number to 0 (zero) using 
initial-page-number=0. But it does not work (FOP 0.93 product version)!
FOP always seems always to reset its page-number to 1.
But when I reset it to another value but 0 (for exemple 
initial-page-number=24), it works. My pages are counted from the given 
non-zero value.
Is there any issue to this problem??... I tried to recuperate the value 
of fo:page-number but no way...

I have also another question: Is there any way to maintain two 
page-number sequences. I have indeed to print the internal page-number 
relative to the current chapter, and also the general page-number 
(relative to the whole pdf file). For example, page #10 in chapter 2, 
will be the page #55 in the document. And I need to print the two 
quantities (chapter 2 - page 10 in the header, and 55 in the footer)... 
Is there anyway to do it in FOP (and in XSL-FO generally).

Thanks for any help.



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


Re: resetting page-number to 0

Posted by Richard FARAND <ri...@la-gi.fr>.
Thanks for your help.

Concerning resetting page-number to 0, it works (I reset to 1 but on the 
following page-sequence).

For the second problem (Multiple page number + total page number) it 
seems to be a recurrent problem. I finally found a thread 
(http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200702.mbox/%3cBAY108-F39FB9107AA815F3A7C4D3288980@phx.gbl%3e) 
in the forum related to it. J.Pietschmann suggested to implement a small 
Java class to grab the total page number:

(This is a FAQ. As already pointed out, you can only get page numbers, 
rather than a total page count, within the FO standard. If you can 
implement a small Java class, you can use a two pass solution, grabbing 
the total page count from the rendering results of the first pass.)

Is there anyone who did it before? As it is a recurrent problem, I think 
it can be very helpful for FOP users to get a more detailed idea about 
the concerned classes!!

Thanks again.

Richard FARAND a écrit:

> Hi,
>
> I'm trying to force my first page-number to 0 (zero) using 
> initial-page-number=0. But it does not work (FOP 0.93 product version)!
> FOP always seems always to reset its page-number to 1.
> But when I reset it to another value but 0 (for exemple 
> initial-page-number=24), it works. My pages are counted from the given 
> non-zero value.
> Is there any issue to this problem??... I tried to recuperate the 
> value of fo:page-number but no way...
>
> I have also another question: Is there any way to maintain two 
> page-number sequences. I have indeed to print the internal page-number 
> relative to the current chapter, and also the general page-number 
> (relative to the whole pdf file). For example, page #10 in chapter 2, 
> will be the page #55 in the document. And I need to print the two 
> quantities (chapter 2 - page 10 in the header, and 55 in the 
> footer)... Is there anyway to do it in FOP (and in XSL-FO generally).
>
> Thanks for any help.
>

-- 
La Gestion Intégrale
12/14 rue du Cadran - BP 71 - 94223 Charenton Le Pont Cedex
tél. 01 45 18 35 00  -  fax 01 43 96 58 61  -  internet www.la-gi.fr
S.A.S. AU CAPITAL DE 871 360 ¬ - RCS CRETEIL B - N IDENT. CEE FR 71 652039678 - SIRET 652 039 678 00022 - APE 722 Z
______________________________________________________________________________________________
Cette transmission contient des informations " privilégiées et/ou confidentielles " appartenant à la société LA GESTION INTEGRALE pour l'emploi exclusif de la personne identifiée ci-dessus comme destinataire. Si vous n'êtes pas cette personne, il vous est notifié par les présentes que toute divulgation, reproduction distribution ou prise d'action sur la base de cette transmission est formellement interdite. Si vous avez reçu cette transmission par erreur, merci de la détruire et de nous joindre par téléphone, fax ou e-mail immédiatement afin de nous avertir de cette réception.

This transmission encloses "privileged and/or confidential" information of the society LA GESTION INTEGRALE Law Office which are for the exclusive use of the individual designated above as the recipient. If you are not the specified recipient, you are hereby notified that all disclosure, reproduction, distribution or action taken on the basis of this message is prohibited. If you have received this message by error, thank you for deleting it and immediately notifying the firm by phone, fax or e-mail, of your receipt of this message.
______________________________________________________________________________________________





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


Re: resetting page-number to 0

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 28, 2007, at 15:00, Richard FARAND wrote:

Hi

> I'm trying to force my first page-number to 0 (zero) using initial- 
> page-number=0. But it does not work (FOP 0.93 product version)!
> FOP always seems always to reset its page-number to 1.

FOP is merely being compliant to the XSL-FO Rec here, I'm afraid...  
The Rec states that the value, if a number, should be 'a positive  
integer', and 'if a non-positive or non-integer value is provided,  
the value will be rounded to the nearest integer value greater than  
or equal to 1'.

For now, unless I'm missing something, XSL-FO does not allow you to  
have a page zero. :(

> But when I reset it to another value but 0 (for exemple initial- 
> page-number=24), it works. My pages are counted from the given non- 
> zero value.
> Is there any issue to this problem??... I tried to recuperate the  
> value of fo:page-number but no way...
>
> I have also another question: Is there any way to maintain two page- 
> number sequences. I have indeed to print the internal page-number  
> relative to the current chapter, and also the general page-number  
> (relative to the whole pdf file). For example, page #10 in chapter  
> 2, will be the page #55 in the document. And I need to print the  
> two quantities (chapter 2 - page 10 in the header, and 55 in the  
> footer)... Is there anyway to do it in FOP (and in XSL-FO generally).

Although I don't immediately see a way to achieve this in native XSL- 
FO, maybe it is possible by post-processing the PDF with iText to  
insert the footer page-numbers, or by using the Intermediate Format  
and altering FOP's XML Area Tree, as described here:
http://xmlgraphics.apache.org/fop/0.94/intermediate.html


HTH!

Andreas


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