Re: page number, but only if more than one page exists
Thank you all! :-) Now I have a couple of alternatives to work on. Best regards. Robi Il 22.03.2015 23:21, Luis Bernardo ha scritto: > > Try using a mix of page masters with different page positions (see > http://www.w3.org/TR/xsl/#page-position). > > You will need a page master with page-position="only" without the > page number, and a page master with page numbers when there is more > than one page (i.e. when page-position="only" does not apply). > > On 3/22/15 10:43 PM, Roberto Nunnari wrote: >> On 22. 03. 15 17:30, Roberto Nunnari wrote: >>> Hi. >>> >>> I need to change a servlet that generates a FO document and >>> then transforms it into a pdf document. Unfortunately I know >>> almost nothing about Formatting Objects. :-( >>> >>> At present the FO adds the page number on every page. >>> >>> I need to change it so that it adds the page number, but only >>> if there are more than one page. >>> >>> fop version in use is very old.. 0.91beta and build-Id is from >>> 20051223 >>> >>> Any help very appreciated. >>> >>> Thank you and best regards. Robi >> >> Hi. >> >> I got a slightly better result than having only the number using >> / >> >> and adding an empty block at the end of the flow.. > id="last-page"/> >> >> It works.. and it's already better than having just the page >> number because seeing also the total number of pages lets you >> know if you have in your hands the whole document or not.. but >> it's not exactly what I was asked to do.. >> >> Any hints on how to accomplish the original goal? Thank you and >> best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Hi, IIRC, there were a lot of bugfixes and additions in page-master management since FOP v0.91. To play with Luis' idea, you have 1st to upgrade FOP 2015-03-23 9:45 GMT+01:00 Szeak (Register Man) : > Hi, > I think, Barnardo's idea is the best for you. > > bye > > 2015-03-22 23:21 keltezéssel, Luis Bernardo írta: > >> >> Try using a mix of page masters with different page positions (see >> http://www.w3.org/TR/xsl/#page-position). >> >> You will need a page master with page-position="only" without the page >> number, and a page master with page numbers when there is more than one page >> (i.e. when page-position="only" does not apply). >> >> On 3/22/15 10:43 PM, Roberto Nunnari wrote: >>> >>> On 22. 03. 15 17:30, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi >>> >>> >>> Hi. >>> >>> I got a slightly better result than having only the number using >>> / >>> >>> and adding an empty block at the end of the flow.. >>> >>> >>> It works.. and it's already better than having just the page number >>> because seeing also the total number of pages lets you know if you have in >>> your hands the whole document or not.. but it's not exactly what I was asked >>> to do.. >>> >>> Any hints on how to accomplish the original goal? >>> Thank you and best regards. >>> Robi >>> >>> >>> - >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> >> >> - >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- pascal - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Hi, I think, Barnardo's idea is the best for you. bye 2015-03-22 23:21 keltezéssel, Luis Bernardo írta: Try using a mix of page masters with different page positions (see http://www.w3.org/TR/xsl/#page-position). You will need a page master with page-position="only" without the page number, and a page master with page numbers when there is more than one page (i.e. when page-position="only" does not apply). On 3/22/15 10:43 PM, Roberto Nunnari wrote: On 22. 03. 15 17:30, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi Hi. I got a slightly better result than having only the number using / and adding an empty block at the end of the flow.. It works.. and it's already better than having just the page number because seeing also the total number of pages lets you know if you have in your hands the whole document or not.. but it's not exactly what I was asked to do.. Any hints on how to accomplish the original goal? Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Hi again, If you want to add page number also for the first page, when the document have more than one pages, you'll need 2 times rendering. After first you can check the number of pages, than when you know it, you can format your document with the needed page numbering option. FOP can produce page numbers after rendering. ie.: You can render first into an Intermediate Format, second to PDF. But you can choose another way also ... Bye. 2015-03-22 17:30 keltezéssel, Roberto Nunnari írta: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Hi, Another option to define 2 different page-master, one for the first page, and one for rest of pages. Then define a page-sequence-master for a complex set of pages. Example: Bye, Szeak 2015-03-22 17:30 keltezéssel, Roberto Nunnari írta: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Good idea. Another option would be to never show the page number on the first page. -Terence Bandoian On 3/22/2015 5:21 PM, Luis Bernardo wrote: Try using a mix of page masters with different page positions (see http://www.w3.org/TR/xsl/#page-position). You will need a page master with page-position="only" without the page number, and a page master with page numbers when there is more than one page (i.e. when page-position="only" does not apply). On 3/22/15 10:43 PM, Roberto Nunnari wrote: On 22. 03. 15 17:30, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi Hi. I got a slightly better result than having only the number using / and adding an empty block at the end of the flow.. It works.. and it's already better than having just the page number because seeing also the total number of pages lets you know if you have in your hands the whole document or not.. but it's not exactly what I was asked to do.. Any hints on how to accomplish the original goal? Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
Try using a mix of page masters with different page positions (see http://www.w3.org/TR/xsl/#page-position). You will need a page master with page-position="only" without the page number, and a page master with page numbers when there is more than one page (i.e. when page-position="only" does not apply). On 3/22/15 10:43 PM, Roberto Nunnari wrote: On 22. 03. 15 17:30, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi Hi. I got a slightly better result than having only the number using / and adding an empty block at the end of the flow.. It works.. and it's already better than having just the page number because seeing also the total number of pages lets you know if you have in your hands the whole document or not.. but it's not exactly what I was asked to do.. Any hints on how to accomplish the original goal? Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
On 22. 03. 15 22:41, Rob Sargent wrote: if you're using xsl transformation... have you tried Thank you Rob, but it's not using xsl transformation.. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
if you're using xsl transformation... have you tried On 03/22/2015 10:30 AM, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: page number, but only if more than one page exists
On 22. 03. 15 17:30, Roberto Nunnari wrote: Hi. I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-( At present the FO adds the page number on every page. I need to change it so that it adds the page number, but only if there are more than one page. fop version in use is very old.. 0.91beta and build-Id is from 20051223 Any help very appreciated. Thank you and best regards. Robi Hi. I got a slightly better result than having only the number using / and adding an empty block at the end of the flow.. It works.. and it's already better than having just the page number because seeing also the total number of pages lets you know if you have in your hands the whole document or not.. but it's not exactly what I was asked to do.. Any hints on how to accomplish the original goal? Thank you and best regards. Robi - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
