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
Important: [b]it refines font lookup/caching logic[/b] and also you should be able to use TTC again, if you want
|
|
|
PD4ML
 |
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 ?
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 ?
|
|
|
Aman
 |
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.
Please give a try to v4.0.8 - it refines font lookup/caching logic and solves a bug in .TTC font collections indexing.
|
|
|
PD4ML
 |
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 ?
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>[/code]
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.[b] It works fine for the first few conversions[/b] after which the issue starts to come up although [b]no code changes are made to the HTML file or CSS[/b].
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 ?
|
|
|
Aman
 |
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()
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()
|
|
|
PD4ML
 |
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..
There is no setLogLevel() method in 4.0.4 version. Can you please cross check and verify here..
|
|
|
Aman
 |
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.
> 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.
|
|
|
PD4ML
 |
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).
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).
|
|
|
Aman
 |
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.
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.
|
|
|
PD4ML
 |
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.
@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.
|
|
|
Aman
 |
Posted: 25 Jun 2020, 16:52 |
|
|
|
 |