HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Deployment / Configuration issues › unix : fonts deployment ?
- This topic has 6 replies, 3 voices, and was last updated Jul 23, 2012
18:06:40 byAnonymous.
-
AuthorPosts
-
February 11, 2011 at 08:18#26516
Hi,
I work with a web-application that creates PDF’s from HTML with the library “PD4ML pro”. It works like a charm, it’s really much easier than coding on iText, thank you guys!I want to integrate chinese and other languages strange characters, but I’ve problems with .ttf files in prod.
I’ve created use a “fonts.jar” file that is in my WEB-INF/lib folder.
That font.jar file contains:
– all my .ttf files
– “fonts.properties” file that contains :#this is an autogenerated file. please remove manually any references to copyrighted fonts #Sun Feb 06 11:45:00 CET 2011 =Helvetica.ttf Arial=arial.ttf Arial Black=ariblk.ttf Arial Bold=arialbd.ttf Arial Bold Italic=arialbi.ttf Arial Italic=ariali.ttf Courier New=cour.ttf Courier New Bold=courbd.ttf Courier New Bold Italic=courbi.ttf Courier New Italic=couri.ttf Helvetica Cyrillic Bold=Helvetica Bold.Ttf Helvetica Cyrillic Bold Oblique=Helvetica Bold Oblique.Ttf Helvetica Cyrillic Oblique=Helvetica Oblique.Ttf KaiTi_GB2312=SIMKAI.TTF font.dir.location=/fonts/
In a development mode on Windows, I don’t have any problem, my application works perfectly. But in a production mode on a UNIX system, special characters (like arrows) as not displayed well.
Must I absolutely copy my ttf files on the folder jre/lib/font server-side as mentionned here: http://download.oracle.com/javase/1.3/docs/guide/intl/addingfonts.html#adding ?February 11, 2011 at 13:46#28402Try to enable debug output on the problem platform (pd4ml.enableDebugOutput()) and inspect STDOUT/server’s log. Does it try to load TTF files? Are the TTF URI correct?
February 16, 2011 at 09:49#28403Hi, thanks for your answer, this is an exemple of the output log when i create a PDF on production mode:
INFO | jvm 1 | 2011/02/15 05:22:49 | version: PD4ML 370 Pro INFO | jvm 1 | 2011/02/15 05:22:49 | not yet in cache: java:fonts/pd4fonts.properties INFO | jvm 1 | 2011/02/15 05:22:49 | 'helvetica' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:49 | reject TTF lookup for: 'helvetica' INFO | jvm 1 | 2011/02/15 05:22:49 | 'aharoni' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:49 | reject TTF lookup for: 'aharoni' INFO | jvm 1 | 2011/02/15 05:22:49 | 'impact' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:49 | reject TTF lookup for: 'impact' INFO | jvm 1 | 2011/02/15 05:22:50 | not yet in cache: file:/fonts//arialbd.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | /fonts/arialbd.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:50 | can not find 'arial bold' at file:/fonts//arialbd.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'arial bold' INFO | jvm 1 | 2011/02/15 05:22:50 | 'helvetica bold' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'helvetica bold' INFO | jvm 1 | 2011/02/15 05:22:50 | 'verdana bold' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'verdana bold' INFO | jvm 1 | 2011/02/15 05:22:50 | 'sans-serif bold' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'sans-serif bold' INFO | jvm 1 | 2011/02/15 05:22:50 | not yet in cache: file:/fonts//arial.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | /fonts/arial.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:50 | can not find 'arial' at file:/fonts//arial.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'arial' INFO | jvm 1 | 2011/02/15 05:22:50 | 'verdana' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'verdana' INFO | jvm 1 | 2011/02/15 05:22:50 | 'sans-serif' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'sans-serif' INFO | jvm 1 | 2011/02/15 05:22:50 | not yet in cache: file:/fonts//ariali.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | /fonts/ariali.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:50 | can not find 'arial italic' at file:/fonts//ariali.ttf INFO | jvm 1 | 2011/02/15 05:22:50 | reject TTF lookup for: 'arial italic' INFO | jvm 1 | 2011/02/15 05:22:50 | 'helvetica italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'helvetica italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'verdana italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'verdana italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'sans-serif italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'sans-serif italic' INFO | jvm 1 | 2011/02/15 05:22:51 | not yet in cache: file:/fonts//cour.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | /fonts/cour.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:51 | can not find 'courier new' at file:/fonts//cour.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'courier new' INFO | jvm 1 | 2011/02/15 05:22:51 | 'monospace' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'monospace' INFO | jvm 1 | 2011/02/15 05:22:51 | not yet in cache: file:/fonts//courbd.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | /fonts/courbd.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:51 | can not find 'courier new bold' at file:/fonts//courbd.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'courier new bold' INFO | jvm 1 | 2011/02/15 05:22:51 | not yet in cache: file:/fonts//arialbi.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | /fonts/arialbi.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:51 | can not find 'arial bold italic' at file:/fonts//arialbi.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'arial bold italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'helvetica bold italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'helvetica bold italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'verdana bold italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'verdana bold italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'sans-serif bold italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'sans-serif bold italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'times italic' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'times italic' INFO | jvm 1 | 2011/02/15 05:22:51 | 'times' is not in pd4fonts.properties file INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'times' INFO | jvm 1 | 2011/02/15 05:22:51 | not yet in cache: file:/fonts//couri.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | /fonts/couri.ttf (No such file or directory) INFO | jvm 1 | 2011/02/15 05:22:51 | can not find 'courier new italic' at file:/fonts//couri.ttf INFO | jvm 1 | 2011/02/15 05:22:51 | reject TTF lookup for: 'courier new italic'
as you can see he tries to load fonts but he doesn’t found anything. Do you think there is a path server side problem?
What is the mecanism used by pd4ml to get the font files ? Do you use a ClassLoader, an FileIntpuStream or something else ?
Also, it works correctly on our development machines (windows) but not on the production server (unix).thanks in advance for your help,
John
February 16, 2011 at 17:12#28404Please check if the pd4fonts.properties has ttf.fonts.dir entry. Remove it if any.
July 19, 2012 at 22:07#28405I have same issue.
Did you resolve this issue?
If yes then please help me to figure it out.Then very appreciate.
July 20, 2012 at 10:31#28406Please post your pd4fonts.properties file and debug output.
July 23, 2012 at 18:06#28407I am using pd4ml version 2.5.
In jsp file I tried to debug using<pd4ml:transform ... debug=true>but I didn’t get any information in server log file.
Am I doing correct way or have to do other way?
Please help me to figure it out .Thanks…
-
AuthorPosts
The forum ‘Deployment / Configuration issues’ is closed to new topics and replies.
