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

    Hi,

    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());
    pd4ml.readHTML(is);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    pd4ml.writePDF(baos);
    Files.write(Paths.get(“D:”, “test.pdf”), baos.toByteArray());

    Is there any chance to render such symbols?

    Cheers Felix

    #36145

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

    #36226

    tried 4.0.15fx2: no change, still not working

    #36365

    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 https://pd4ml.com/pdf-fonts/ for TTF embedding hints

    Attachments:
    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.