April 14, 2015 at 08:21#27006
I get the following error (Screenshot.png) when I use the following fonts.jar : (These outputs are normally not seen on console, they only come when you enableDebugInfo on PD4ML)
There are also other similar threads from the forums but none of them have been convincingly answered.
There are similar issues reported on forums but I cannot seem to find a resolution to this :
Can you please help resolve this issue?
ManoojApril 14, 2015 at 13:42#29701
The error is caused by IOException thrown in
java.awt.Font.createFont( Font.TRUETYPE_FONT, fontBytes )
call and usually caused by an attempt to load a custom font, which is not fully compatible with Java’s font subsystem. Usually the standard arial.ttf (for example from our sample fonts.jar) causes no problem.
Can you reproduce the problem when run PD4ML in command line mode?April 15, 2015 at 10:46#29702
I have two tomcat instances on my windows machine and both run the same code and point to the same font directory. Both of these instances use the same Java runtime environment. I get this error with only one of my instances. (I can confirm that the configurations for both are absolutely similar)
Again, as I mentioned already, I did try the Allfonts.jar provided by pd4ml @ http://pd4ml.com/i/allfonts.zip which also generates the same error.
ManoojApril 15, 2015 at 18:52#29703
Hmm… As it works on one of the machines, that is obviously not a problem of PD4ML, but a server configuration issue or a JVM installation corruption.
Could you please send us 2 PDF samples produced on the healthy and the problematic machines?April 16, 2015 at 10:59#29704
Well, actually this is how it is,,,
Tomcat instance 1 : I set the font directory as c:windowsfonts to PD4ML and PDF is generated fine. Even the fonts appear fine.
Tomcat instance 2 : I do the same as above, but I get the error in the subject of this discussion.
Tomcat instance 1 & 2 : I try to load the font files using the jar files PD4ML has provided instead of pointing them to a font directory. I still see the same error.
So, I have a problem with jar way of loading fonts. I can’t seem to get a fonts jar that would work for me.
ManoojApril 16, 2015 at 11:08#29705
Most probably the issue with JAR has a different nature: for example the font .JAR is packed to .WAR, and the web application is not configured to be unpacked to a work directory. In the case PD4ML may have (not in every configuration) fail to load resources from .JAR
But the issue with c:windowsfonts tells that the Tomcat instance #2 has a configuration (or inconsistence) problem. I would start with a resolving the issue.
Enable debug info on both instances and compare PD4ML’s diagnostic output. Is it identical by identical PDF conversion requests (except the failure messages)?
Also requested PDF samples (from even blank HTML) would give us some additional info.September 7, 2015 at 10:14#29706
Can you please emphasize on your point:
“Most probably the issue with JAR has a different nature: for example the font .JAR is packed to .WAR, and the web application is not configured to be unpacked to a work directory. In the case PD4ML may have (not in every configuration) fail to load resources from .JAR”.
ManoojSeptember 7, 2015 at 14:34#29707
Ok. so I googled around and having created a temp directory in my tomcat folder cleared the errors with font data not loading and the fonts show up properly.September 8, 2015 at 16:16#29708
glad the issue is solved on your side!
The forum ‘Troubleshooting’ is closed to new topics and replies.