RE: FOPSerializer user config
Hi, The first syntax should work. Are you sure the font added in font-config.xml is actually used in your document ? To be sure try to get some more logs from fop in DEBUG. It should display some messages about what fonts are used... Laurent -Original Message- From: Faehndrich Philippe [mailto:phfaehndr...@bluewin.ch] Sent: dimanche, 7. novembre 2010 15:09 To: users@cocoon.apache.org Subject: FOPSerializer user config Hello, Working with Cocoon 2.1.11 and fop-0.94.jar, I'm trying to use a Truetype font I need for some Unicode characters. I've built the font metric files, and added a line in the main sitemap.xmap, but it's obvious Cocoon doesn't take this line into account. I've tried both of the following syntax: map:serializer logger=sitemap.serializer.fo2pdf mime-type=application/pdf name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer user-configWEB-INF/lib/fop-fonts/font-config.xml/user-config /map:serializer and: map:serializer logger=sitemap.serializer.fo2pdf mime-type=application/pdf name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer user-config src=WEB-INF/lib/fop-fonts/font-config.xml/ map:serializer with relative path to the sitemap-xmap file and absolute path (user- config/srv/tomcat6/webapps/cocoon/WEB-INF/lib/fop-fonts/font-config.xml/user- config or user-config src=/srv/tomcat6/webapps/cocoon/WEB-INF/lib/fop- fonts/font-config.xml/), but none of the these solutions work. I just get the same PDF output as if I didn't modify anything. As I have no error and no mention of the FOP process in the log files, I have no idea if the error is the sitemap.xmap, in the font-config.xml or in the metric files. Could someone help me? I didn't find anything I understand enough in the documentation. Philippe Faehndrich - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org • This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. • Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. • Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. • An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. • If you have received this email in error, please notify the sender immediately and delete the original.
RE: Set Encoding for XMLSerializer dynamically
Hi, have you tried: serialize type=xhtml status-code=200 ... ... encoding{charsetEncoding}/encoding ... /serialize ? Laurent From: Ali Mahdoui [mailto:mahd...@hotmail.de] Sent: dimanche, 7. novembre 2010 12:10 To: Cocoon users; d...@cocoon.apache.org Subject: Set Encoding for XMLSerializer dynamically Hi, i am using cocoon 2.2 and i want to set the encoding for the xml serializer dynamically depending on the return value of a previous action. for example like this serialize type=xhtml status-code=200 encoding={charsetEncoding}/ ... For the moment i can only set the encoding in the bean definition... Is that possible? Thanks • This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. • Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. • Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. • An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. • If you have received this email in error, please notify the sender immediately and delete the original.
RE: Set Encoding for XMLSerializer dynamically
Hi,no that does not help (and the syntax is not allowed in the schema of the sitemap)thanksAli Subject: RE: Set Encoding for XMLSerializer dynamically Date: Mon, 8 Nov 2010 12:56:11 +0100 From: lmedi...@odyssey-group.com To: users@cocoon.apache.org Hi, have you tried: serialize type=xhtml status-code=200 ... ... encoding{charsetEncoding}/encoding ... /serialize ? Laurent
RE: Set Encoding for XMLSerializer dynamically
So this changed from 2.1, pity… From: Ali Mahdoui [mailto:mahd...@hotmail.de] Sent: lundi, 8. novembre 2010 13:08 To: Cocoon users Subject: RE: Set Encoding for XMLSerializer dynamically Hi, no that does not help (and the syntax is not allowed in the schema of the sitemap) thanks Ali Subject: RE: Set Encoding for XMLSerializer dynamically Date: Mon, 8 Nov 2010 12:56:11 +0100 From: lmedi...@odyssey-group.com To: users@cocoon.apache.org Hi, have you tried: serialize type=xhtml status-code=200 ... ... encoding{charsetEncoding}/encoding ... /serialize ? Laurent • This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. • Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. • Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. • An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. • If you have received this email in error, please notify the sender immediately and delete the original.
Re: FOPSerializer user config
Le lundi 08 novembre 2010 10.50:00, Laurent Medioni a écrit : Hi, The first syntax should work. Are you sure the font added in font-config.xml is actually used in your document ? To be sure try to get some more logs from fop in DEBUG. It should display some messages about what fonts are used... Laurent The problem is, with DEBUG, Cocoon gives me a huge amount of informations in the log file, but just about nothing concerning the fo2pdf process. Just like if the FOPSerializer wouldn't write a single line in the log file. Is there a way to get specifically more details on the fo2pdf process in the log file? Philippe - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: FOPSerializer user config
Try to get DEBUG logs from org.apache.fop.fonts using log4j, I am not sure you can get them from the Cocoon logs... I remember solving my issue using these logs because it showed that I needed to map SansSerif to my nice new Arial Unicode font... Here is the font declaration in fop.xconf: font metrics-url=file:///X:/somewhere/arial_uni.xml kerning=yes embed-url=file:///X:/somewhere/ARIAL_UNI.TTF font-triplet name=Arial style=normal weight=normal/ font-triplet name=Arial style=normal weight=bold/ font-triplet name=Arial style=italic weight=normal/ font-triplet name=Arial style=italic weight=bold/ font-triplet name=Arial Unicode MS style=normal weight=normal/ font-triplet name=Arial Unicode MS style=normal weight=bold/ font-triplet name=Arial Unicode MS style=italic weight=normal/ font-triplet name=Arial Unicode MS style=italic weight=bold/ font-triplet name=SansSerif style=normal weight=normal/ font-triplet name=SansSerif style=normal weight=bold/ font-triplet name=SansSerif style=italic weight=normal/ font-triplet name=SansSerif style=italic weight=bold/ /font I do not know what your document content is but you should try to match all the possible font triplets from your document... Laurent -Original Message- From: Faehndrich Philippe [mailto:phfaehndr...@bluewin.ch] Sent: lundi, 8. novembre 2010 17:09 To: users@cocoon.apache.org Subject: Re: FOPSerializer user config Le lundi 08 novembre 2010 10.50:00, Laurent Medioni a écrit : Hi, The first syntax should work. Are you sure the font added in font-config.xml is actually used in your document ? To be sure try to get some more logs from fop in DEBUG. It should display some messages about what fonts are used... Laurent The problem is, with DEBUG, Cocoon gives me a huge amount of informations in the log file, but just about nothing concerning the fo2pdf process. Just like if the FOPSerializer wouldn't write a single line in the log file. Is there a way to get specifically more details on the fo2pdf process in the log file? Philippe - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org • This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. • Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. • Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. • An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. • If you have received this email in error, please notify the sender immediately and delete the original.
Re: FOPSerializer user config
Le lundi 08 novembre 2010 17.51:57, Laurent Medioni a écrit : Try to get DEBUG logs from org.apache.fop.fonts using log4j, I am not sure you can get them from the Cocoon logs... I'm afraid it's a little difficult for me. I'm a Cocoon user, having some practice with XSLT, SQL queries and XSL-FO stylesheets, but not a Java developer. I have absolute no idea how I could parameter log4j for a more comprehensive output. For now, after having replaced the native logkit system by log4j, using the proposed default log4j.xconf config file, I get a (very) verbose log file, with some interesting lines I hadn't in my precedent cocoon.log. These lines are: cocoon/log4j.log:http-8080-1 WARN fonts.FontInfo - Font 'DejaVuSerif,normal,400' not found. Substituting with 'any,normal,400'. cocoon/log4j.log:http-8080-1 WARN fonts.FontInfo - Font 'DejaVuSerif,normal,700' not found. Substituting with 'any,normal,700'. But the (about 10 megas) log4j.log doesn't tell me why (or I don't understand where it does). I'm not even sure Cocoon reads the font metric files or my font-config.xml (there are no mention of those files in the log). I remember solving my issue using these logs because it showed that I needed to map SansSerif to my nice new Arial Unicode font... Here is the font declaration in fop.xconf: font metrics-url=file:///X:/somewhere/arial_uni.xml kerning=yes embed-url=file:///X:/somewhere/ARIAL_UNI.TTF font-triplet name=Arial style=normal weight=normal/ font-triplet name=Arial style=normal weight=bold/ font-triplet name=Arial style=italic weight=normal/ font-triplet name=Arial style=italic weight=bold/ font-triplet name=Arial Unicode MS style=normal weight=normal/ font-triplet name=Arial Unicode MS style=normal weight=bold/ font-triplet name=Arial Unicode MS style=italic weight=normal/ font-triplet name=Arial Unicode MS style=italic weight=bold/ font-triplet name=SansSerif style=normal weight=normal/ font-triplet name=SansSerif style=normal weight=bold/ font-triplet name=SansSerif style=italic weight=normal/ font-triplet name=SansSerif style=italic weight=bold/ /font I do not know what your document content is but you should try to match all the possible font triplets from your document... Laurent Here is my font-config.xml. It is a little different from yours, but I believe it conforms to the documentation I've found on http://cocoon.apache.org/2.1/userdocs/pdf-serializer.html;. I've made it for more fonts than I'm really using (DejaVuSerif and DejaVuSerif bold would be enough for my actual document, but I can't exclude I'll be using italic or the sans serif varaint in the future). configuration fonts font metrics-file=DejaVuSerif.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSerif.ttf font-triplet name=DejaVuSerif style=normal weight=normal/ /font font metrics-file=DejaVuSerifItalic.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSerif- Italic.ttf font-triplet name=DejaVuSerif style=italic weight=normal/ /font font metrics-file=DejaVuSerifBold.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSerif- Bold.ttf font-triplet name=DejaVuSerif style=normal weight=bold/ /font font metrics-file=DejaVuSerifBoldItalic.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSerif- BoldItalic.ttf font-triplet name=DejaVuSerif style=italic weight=bold/ /font font metrics-file=DejaVuSans.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSans.ttf font-triplet name=DejaVuSans style=normal weight=normal/ /font font metrics-file=DejaVuSansOblique.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSans- Oblique.ttf font-triplet name=DejaVuSans style=italic weight=normal/ /font font metrics-file=DejaVuSansBold.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSans- Bold.ttf font-triplet name=DejaVuSans style=normal weight=bold/ /font font metrics-file=DejaVuSansBoldItalic.xml kerning=yes embed-file=/usr/share/fonts/truetype/DejaVuSans- BoldItalic.ttf font-triplet name=DejaVuSans style=italic weight=bold/ /font /fonts /configuration Anyhow, thank you for your help. If you have some hints further, I take them gratefully. Philippe - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org