PDF Generating Tool Support Forum

HOME   Login   Register    Search




Post a reply
Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are OFF
Disable BBCode
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the Board Administrator.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - CJK glyphs not displaying correctly
Post subject:  Re: CJK glyphs not displaying correctly
Important: it refines font lookup/caching logic
and also you should be able to use TTC again, if you want
    Post Posted: 02 Jul 2020, 20:53
 
Post subject:  Re: CJK glyphs not displaying correctly
1. As replied earlier, we have replaced all .ttc files with .ttf files. Our Fonts Jar does not contain any .ttc files. So how does .ttc indexing come into picture here ?
2. For the first few conversions it is working as expected, which indicates that the font lookup must be correct initially. Is it possible to get messed up for the same file and same CSS later ?
    Post Posted: 02 Jul 2020, 20:49
 
Post subject:  Re: CJK glyphs not displaying correctly
Please give a try to v4.0.8 - it refines font lookup/caching logic and solves a bug in .TTC font collections indexing.
    Post Posted: 02 Jul 2020, 19:58
 
Post subject:  Re: CJK glyphs not displaying correctly
We have removed .ttc from the Fonts Jar and introduced .ttf Files instead.
Now the conversion works perfectly fine for the first few conversions, after which the converted PDF shows the following inconsistency for the HTML Given below:

Code:
Simplified - Chinese - <font face="KaiTi">人人生而自由,在尊严和权利上一律平等。</font>
Traditional - Chinese - <font face="MingLiU">人人生而自由,在尊嚴和權利上一律平等。</font>


Converted pdf shows KaiTi font being used for Traditional Chinese although the Font face says MaingliU.

Note: Both font mapping are present in .properties file and the Jar has the .ttf files. It works fine for the first few conversions after which the issue starts to come up although no code changes are made to the HTML file or CSS.

If I take a restart for the server, things start to work fine again until the inconsistency is again observed. Is there is any incorrect caching or wrong indexing of font file going on ?
    Post Posted: 02 Jul 2020, 11:43
 
Post subject:  Re: CJK glyphs not displaying correctly
PD4ML v4 has two PD4ML classes: com.pd4ml.PD4ML is the new API, org.zefer.pd4ml.PD4ML is PD4ML v3 API wrapper, which translates older API calls to the new ones.

setLogLevel() belongs to the new API. If you use the wrapper class, switch debug on with pd4ml.enableDebugInfo()
    Post Posted: 30 Jun 2020, 15:05
 
Post subject:  Re: CJK glyphs not displaying correctly
There is no setLogLevel() method in 4.0.4 version. Can you please cross check and verify here..
    Post Posted: 30 Jun 2020, 09:44
 
Post subject:  Re: CJK glyphs not displaying correctly
> 1. We are using 4.0.4 version for pd4ml.
> 2. Added the suggested font, but no progress.

Try the most recent v4.0.8

> 3. Enabled the debugInfo() but it is not printing (debug level logs are enabled in server log4j configs).

In v4 the right API call is pd4ml.setLogLevel(255), where 255 is a bit mask with all options on.
    Post Posted: 29 Jun 2020, 14:57
 
Post subject:  Re: CJK glyphs not displaying correctly
Hi @pd4ml,

Replying to your suggestions,
1. We are using 4.0.4 version for pd4ml.
2. Added the suggested font, but no progress.
3. Enabled the debugInfo() but it is not printing (debug level logs are enabled in server log4j configs).
    Post Posted: 29 Jun 2020, 09:10
 
Post subject:  Re: CJK glyphs not displaying correctly
You may omit font family/face definition.

If font face not explicitly defined in an input document, it takes the default face (Arial or Times New Roman) from the built-in stylesheet.
    Post Posted: 25 Jun 2020, 16:59
 
Post subject:  Re: CJK glyphs not displaying correctly
@pd4ml, thanks for the reply. Please answer a quick question, is it necessary to define a font face in the HTML code? Currently we are not defining font-face in the HTML being converted to PDF for CJK.
    Post Posted: 25 Jun 2020, 16:52
 


Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share