Following the guide as in pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html,
I converted the Korean HTML test string to PDF using PD4ML. By the way, the output had question marks with not properly converted.
The character set was UTF-8.
I performed as follows:
1. Inserted ttf font files in the created folder “/fonts” under /WEB-INF/lib/.
2. Run java -jar pd4ml_demo.jar -configure.fonts /fonts. Then pd4font.properties was created.
3. In my JSP file, I entered like this:
It was not executable so I zipped the fonts folder into jar, placed it in the lib folder, and entered as follows:
assumes the fonts are in fonts/ directory of the JAR. If the JAR has no internal directory structure, try
But I would recommend to start from a creation of a font directory not relative to /WEB-INF/lib (it does not work that way), but absolute to the file system. defug=”true” of should help you to identify the font loading problems.