Hi,
I am using cold fusion for web capture (converting websites to PDF). It
uses Ice Browser to capture the web page as a java.awt panel which is converted
to PDF using itext. Our product is supported on windows and unixes. On windows
the code is working fine and displaying the Japanese characters for websites (I
tried http://www.google.co.jp <http://www.google.co.jp/> ). Earlier I was
facing problem on windows about Japanese fonts not appearing in the PDF created
using itext. Then I figured out that the font Arial Unicode MS (true type) is
requited under c:\windows\fonts (or other Unicode fonts would even do. They
were somehow missing on my machine). When I added this font everything is
working fine. But when I run the same code on linux red hat the Japanese
characters are not appearing. The itext.jar contains a class FontFactory which
has a method registerDirectories() which registers a few directories containing
fonts with itext for windows and unixes.
1)I added the Arial Unicode MS (true type) (from windows) to a couple of
directories which are used in this method (like /usr/X11R6/lib/X11/fonts/TTF
and /usr/X11R6/lib/X11/fonts/truetype) but itext did not pick up the fonts.
2) I downloaded a few more Unicode true type fonts from internet but still it
didn’t work
3) I searched on internet and found the way to configure Unicode fonts in linux
(http://vietunicode.sourceforge.net/howto/fontlinux.html)
As per the instructions on this page I pasted some fonts in a directory and
then execute the following commands in that directory
# mkfontscale && mkfontdir
# fc-cache
# chkfontpath --add “the directory path here”
# /etc/rc.d/init.d/xfs restart
Even this didn’t work. The document also talks about Make X11 fonts available
to Java but I couldn’t get it much what it meant so didn’t try the following
a)Open /etc/profile and add a new environment variable
JAVA_FONTS=/usr/share/fonts/truetype
export JAVA_FONTS
b)Open font.properties file under jre/lib directory, uncommnent and set to the
appropriate font directory
appendedfontpath=/usr/share/fonts/truetype
4) According to me the steps in 3) are not required as these are required to
register some new font with the xmanager. But here we need to register some
Unicode font with itext.
Can someone suggest any possible solution?
Thanks,
Abhishek
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/