In mathematical perspective this may be the solution Let X be the total number of pages [ In this case it is 8 ]
Let Y be the current page. Then the display on each page will be : Y / [(X/2)+1] Assuming that (X/2) returns an integer. -----Original Message----- From: Leonard Wolters [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 6:52 PM To: [EMAIL PROTECTED] Subject: Problem with displaying total page numbers in PDF document Situation sketch: I'll need to generate a PDF document that has the following page number 'algorithm'. The document starts with a cover (page 1). Then, a couple of pages will follow for which each left (even) AND right (odd) page should have the SAME page number. The document ends with a footer page. For example, 1 2 2 3 3 4 4 5 So far I managed to fix the page numbers for the even and odd pages. However, the problem is is that for each page, a 'wrong' total number is given. Given the example above, the first page displays 'page 1/8'. This should be 'page 1/5'. Does anyone have any suggestion / tip to help me fixing this ? I already tried hacking / fooling around with the pageCount variable in org.apache.fop.apps.StreamRenderer, unfortunately without any result. Playing around with PageSequence also didn't provide any solution. The solution must be somewhere at the end of the PDF generation; that's the only time that the PDF document knows howmany pages are available and can 'fix' the total amount of pages. Exactly at this point, the PDF document must be 'fooled'. Thanks in advance, Leonard Leonard Wolters Software Developer -------------------------------- BackStream(R) Willem de Zwijgerlaan 350-352 1055 RD Amsterdam The Netherlands tel +31 20 386 8365 fax +31 20 386 8948 Post Office Address: Postbus 58385 1040 HJ Amsterdam BackStream: content management - multi-channel distribution www.backstream.com This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. BackStream, its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. BackStream(R) Willem de Zwijgerlaan 350-352 1055 RD Amsterdam The Netherlands tel. +31 20 386 8365 fax +31 20 386 8948 Post Office Address: Postbus 58385 1040 HJ Amsterdam BackStream: The Digital Delivery Company www.backstream.com This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. BackStream, its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]