Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27115

    Hi,

    we are using the pd4ml to convert html with chinese characters.

    we have chinese characters in both the header and the body. the outcome is that
    1. the header shows the chinese characters correctly in the PDF
    2. however, for the body all chinese characters are rendering as question marks (?).

    we know that we are loading the correct font as due to the header being rendered correctly. We are scratching our heads as to why only the body is failing from time to time.

    the problem arises intermittently as well however same observations as per above.

    Anybody knows any known issue relating to the above?

    #29972

    It sounds like different font families are applied to the header content and to the main body.

    If, for example, Arial or Times is applied to Chinese text (and regular versions of the fonts do not define CJK glyphs) PD4ML scans its fallback tables to find a “similar” font, which is able to display a given text. If no suitable font found, it gives up with an output of question marks.

    I guess it succeeds with a substitution font for header, but not for the main content. If you switch debug on, it should dump the font lookup attempts.

    #29973

    Thanks for the reply

    For reference, we are loading “arialuni.ttf” to the pd4ml.

    We will turn the debug mode one and wait to for it to occur again.

    We use the same chinese characters for both header and body html and assuming that substitution is only failing for the body given that we load only the arialuni.ttf

    What would likely be the solution to resolve such an issue?

    #29974

    Hi,

    We have enabled debug, though it only shows the lookup on first load.. succeedingly it doesnt show already (weblogic). I dont think it will be beneficial to enable debug as it will not show lookup once issue occurs.

    BTW Additional Information:

    pd4ml properties file contains:
    Arial=arialuni.ttf
    Serif=arialuni.ttf
    Times New Roman=arialuni.ttf

    Font File name: ARIALUNI.TTF

    Questions:
    Is my properties file sufficient to render chinese characters?
    We dont add the meta tag for the charset encoding of the HTML that will be converted, is it critical in using CJK Glyphs?

    #29975

    Try to add

    SimSun=arialuni.ttf

    SimSun presents in all fallback tables, so a TTF behind the font family name should be used as the last resort.

    #29976

    Hi

    We were able to partially recreate the problem.
    We did stress test to generate 100 pdf

    By the 35th and 36th generation the error occured to the PDF and stabilized again.

    The 2 files (35th and 36th) had problem rendering chinese as its showing as question mark.

    We will try to apply the suggestion but feel free to advise if have an explanation on what happened. Thanks!

    #29977

    Hi,

    I attached a sample of the problem we were able to recreate by chance.
    As you can see, some are rendered as question marks, some are corrrectly rendered in chinese.

    additionally this does not happen frequently. most of the time everything is in order (rendering).

    our working hypothesis that if the server slows down due to usage it affects the rendering.

    Is there any solution that can resolve this?
    We have our doubts on adding a new font in the properties file will work:

    SimSun=arialuni.ttf

    appreciate on any advise on the matter. thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.