page count of document
I have an FO style sheet to generate a series of invoice from an XML file. Each invoice is pretty much the same but the item on the invoice varies from one to another. The invoice might be single page or multiple page for one customer. I got the total page count of the output pdf (contains multiple invoice) from FOP API. Is there any way we can find out how many page for each customer's invoice is? -- View this message in context: http://www.nabble.com/page-count-of-document-tf2748933.html#a7669574 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fo:external-graphic SRC by xpath
Thanks. I did find this in my XSLT quick guide from O'reilly. I am going to try it. hmm. I need a more detailed book on XSLT!! J.Pietschmann wrote: Sam Tsai wrote: I am looking a way to make the SRC of external-graphic tag dynamic. This sounds like a pure XSLT question. Usually it's better to ask on the Mulberry XSL list in such cases. http://www.mulberrytech.com/xsl/xsl-list/ fo:external-graphic src= some xpath like root/imgPath width=61.00mm Use braces around the XPath expression: fo:external-graphic src={root/imgPath} width=61.00mm ... Look up the term attribute value template or AVT in your favorite XSLT reference for more information. imgPathx:\folder\img1.jpg/imgPath Note that the value for the src of an external graphic should be an URL, e.g. imgPathfile:///x:/folder/img1.jpg/imgPath J.PIetschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fo%3Aexternal-graphic--SRC-by-xpath-tf2280958.html#a6344006 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fo:external-graphic SRC by xpath
Hi: I am looking a way to make the SRC of external-graphic tag dynamic. For example ... fo:external-graphic src= some xpath like root/imgPath width=61.00mm content-width=61.00mm height=77.50mm content-height=77.50mm/ ... in this way if I have an xml like root imgPathx:\folder\img1.jpg/imgPath imgPathx:\folder\img2.jpg/imgPath /root The xml transformed with XSL:FO will get graphics specified by xpath Is that possible to do this? -- View this message in context: http://www.nabble.com/fo%3Aexternal-graphic--SRC-by-xpath-tf2280958.html#a6336311 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fopFactory setFontBaseURL
Thanks. I tried but still not working. Other than the TTF and Metric file what else should be in the folder to make it working? Manuel Mall-2 wrote: On Sunday 10 September 2006 19:12, Shue-Yen Tsai wrote: Hi: I embed FOP 0.92 to my program. I can't get the font to work. I put the fopFactory.setFontBaseURL(file:///C:/fonts); Sam please try fopFactory.setFontBaseURL(file:///C:/fonts/); and check if that fixes it. Manuel in the program and put my ttf files, metric files under the folder c:/fonts. I still got error on finding fonts. Do I have to create userconfig.xml in this folder or something else? Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fopFactory-setFontBaseURL-tf2247370.html#a6233141 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fopFactory setFontBaseURL
Manuel: The message is I got from log4J Font 'Arial,normal,400' not found. Substituting with default font. I also attached the Arial.xml metric file. Sam http://www.nabble.com/user-files/235939/Arial.xml Arial.xml Manuel Mall-2 wrote: On Sunday 10 September 2006 19:58, Sam Tsai wrote: Thanks. I tried but still not working. Other than the TTF and Metric file what else should be in the folder to make it working? What is the exact error message(s) FOP is producing? Does that give any clue about what might be wrong? Manuel Manuel Mall-2 wrote: On Sunday 10 September 2006 19:12, Shue-Yen Tsai wrote: Hi: I embed FOP 0.92 to my program. I can't get the font to work. I put the fopFactory.setFontBaseURL(file:///C:/fonts); Sam please try fopFactory.setFontBaseURL(file:///C:/fonts/); and check if that fixes it. Manuel in the program and put my ttf files, metric files under the folder c:/fonts. I still got error on finding fonts. Do I have to create userconfig.xml in this folder or something else? Sam --- -- 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] -- View this message in context: http://www.nabble.com/fopFactory-setFontBaseURL-tf2247370.html#a6233269 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fopFactory setFontBaseURL
I put this line: fopFactory.setUserConfig(new File(C:/Temp/userconfig.xml)); and the config file content is: ?xml version=1.0 encoding=UTF-8? !-- New document created at Sun Sep 10 05:56:26 CDT 2006 -- configuration font metrics-url=file:///C:/fonts/Arial/Arial.xml kerning=yes embed-url=file:///C:/fonts/Arial/arial.ttf font-triplet name=Arial style=normal weight=normal/ font-triplet name=ArialMT style=normal weight=normal/ /font /configuration Sam Jeremias Maerki-2 wrote: Just a hunch: Make sure you call setFontBaseURL() after you specify a userconfig.xml (if any) and before you create an FOUserAgent or a Fop instance. On 10.09.2006 13:12:28 Shue-Yen Tsai wrote: Hi: I embed FOP 0.92 to my program. I can't get the font to work. I put the fopFactory.setFontBaseURL(file:///C:/fonts); in the program and put my ttf files, metric files under the folder c:/fonts. I still got error on finding fonts. Do I have to create userconfig.xml in this folder or something else? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fopFactory-setFontBaseURL-tf2247370.html#a6233414 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fopFactory setFontBaseURL
Thanks a lot. I got it working. You are right. I copied the configuration file came with 0.92beta and modify the font entry. Now it worked well. Sam Jeremias Maerki-2 wrote: That's the layout from FOP 0.20.5. You said you're using FOP 0.92beta, so you have to use that configuration layout. It has changed since 0.20.5. Please take conf/fop.xconf as a template! See also: http://xmlgraphics.apache.org/fop/0.92/configuration.html On 10.09.2006 14:34:42 Sam Tsai wrote: I put this line: fopFactory.setUserConfig(new File(C:/Temp/userconfig.xml)); and the config file content is: ?xml version=1.0 encoding=UTF-8? !-- New document created at Sun Sep 10 05:56:26 CDT 2006 -- configuration font metrics-url=file:///C:/fonts/Arial/Arial.xml kerning=yes embed-url=file:///C:/fonts/Arial/arial.ttf font-triplet name=Arial style=normal weight=normal/ font-triplet name=ArialMT style=normal weight=normal/ /font /configuration Sam Jeremias Maerki-2 wrote: Just a hunch: Make sure you call setFontBaseURL() after you specify a userconfig.xml (if any) and before you create an FOUserAgent or a Fop instance. On 10.09.2006 13:12:28 Shue-Yen Tsai wrote: Hi: I embed FOP 0.92 to my program. I can't get the font to work. I put the fopFactory.setFontBaseURL(file:///C:/fonts); in the program and put my ttf files, metric files under the folder c:/fonts. I still got error on finding fonts. Do I have to create userconfig.xml in this folder or something else? Jeremias Maerki Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fopFactory-setFontBaseURL-tf2247370.html#a6233515 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fopFactory setFontBaseURL
Jeremias: I have an additional question So the setFontURL alone won't do the job. You still need the confiuration file. Is this correct statement? Sam Jeremias Maerki-2 wrote: That's the layout from FOP 0.20.5. You said you're using FOP 0.92beta, so you have to use that configuration layout. It has changed since 0.20.5. Please take conf/fop.xconf as a template! See also: http://xmlgraphics.apache.org/fop/0.92/configuration.html On 10.09.2006 14:34:42 Sam Tsai wrote: I put this line: fopFactory.setUserConfig(new File(C:/Temp/userconfig.xml)); and the config file content is: ?xml version=1.0 encoding=UTF-8? !-- New document created at Sun Sep 10 05:56:26 CDT 2006 -- configuration font metrics-url=file:///C:/fonts/Arial/Arial.xml kerning=yes embed-url=file:///C:/fonts/Arial/arial.ttf font-triplet name=Arial style=normal weight=normal/ font-triplet name=ArialMT style=normal weight=normal/ /font /configuration Sam Jeremias Maerki-2 wrote: Just a hunch: Make sure you call setFontBaseURL() after you specify a userconfig.xml (if any) and before you create an FOUserAgent or a Fop instance. On 10.09.2006 13:12:28 Shue-Yen Tsai wrote: Hi: I embed FOP 0.92 to my program. I can't get the font to work. I put the fopFactory.setFontBaseURL(file:///C:/fonts); in the program and put my ttf files, metric files under the folder c:/fonts. I still got error on finding fonts. Do I have to create userconfig.xml in this folder or something else? Jeremias Maerki Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fopFactory-setFontBaseURL-tf2247370.html#a6233526 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]