Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #36144


    I tried to render HTML symbols such as ☒ and ☐ (ballot box) but no luck. Version used is 4.0.15. JVM charset is UTF-8.

    here is my sample code:

    PD4ML pd4ml = new PD4ML();
    String test = “<br>☒</br><br>☐</br>”;
    InputStream is = new ByteArrayInputStream(test.getBytes());
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    Files.write(Paths.get(“D:”, “test.pdf”), baos.toByteArray());

    Is there any chance to render such symbols?

    Cheers Felix


    for easier debugging
    String test = "<br>& # 9746;</br><br>& # 9744;</br>"; (without the blanks)


    tried 4.0.15fx2: no change, still not working


    In order to render the glyphs you need to make sure the glyphs are present in used TTF font.

    As it follows from your Java code snippet, you did not enable TTF embedding at all, so it uses built-in core fonts, support Latin-1 charset only and do not implement the glyphs.

    The attached PDF is generated with the TTF embedding enabled. PD4ML took the glyphs from MS Gothic TTF font

    See for TTF embedding hints

    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.