i am using TTF embadding in pro edition to include arabic support , any way how can i make my html to pdf converter work based on the fonts that are provided by the html , i need to get this in my head because i have used the steps you specify for the TTF embadding and its not working .
HTML does not provide fonts. It only refers to fonts, present on a client PC (where a client browser has physical access to the fonts).
In order to add fonts to a PDF document, PD4ML needs an access to font files (to parse the TTFs, extract used glyphs and embed the extracted subset to PDF document).
JVM may use fonts in Java applications, but it offers no access to physical font files. In order to workaround the restriction, you need to accept TTF embedding “complexities”.
First I would recommend to use the standard font dir. pd4ml.useTTF(“/windows/fonts”, true);
But before you need to index existing fonts with the command line call: java -jar pd4ml.jar -configure.fonts /windows/fonts
After it works you may create a JAR file with selected fonts. But first make sure the above works.
Also if you want to define document access permissions, you should call setPermissions() method only once:
so if i do as you say any html tag that contains a font attribute with specific font will be interrepted with the appropriate font that i have just embadded and no need to add any additional code i just need say
You need to pass either a directory name of the font dir pd4ml.useTTF(“/windows/fonts”,true);
or refer to a resource, available via the classloader (distinguished by “java:” prefix) pd4ml.useTTF(“java:fonts”,true);
In both cases pd4fonts.properties file has to be generated in advance with java -jar pd4ml.jar -configure.fonts …
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.