If you are unable to create a new account, please email support@bspsoftware.com

 

How to automatically match the font when generating PDF with some non-English ch

Started by ricky_ru, 15 Feb 2014 11:55:26 AM

Previous topic - Next topic

ricky_ru

Dears,

As I researched, for the chars to be displayed correctly in pdf reader, we must specify the right font for the data in the Report Studio and the related font must be installed on the cognos server(especially for Unix).  If the font is not right/matched, when you open the pdf, the chars will be displayed as square and can not be displayed well even you modify its font with adobe acrobat in the client(I guess the hex code has been written wrong in the server side because of the incorrect font specified in Report Studio).

So, if we specify the right font for the column in Report Studio, things will be ok. But here's the new problem.
The database column stores UTF8 data of some kinds of chars. Some of them can be only displayed with font NSimSun and some can be only displayed with font SimSun-ExtB and some can be sisplayed with both NSimSun and SimSun-ExtB. The thing is could cognos server generates the pdf to make the same column/list of data match the proper font automatically? Just like the browser or word does. The browser and word can display them very well(copy the data from browser to word, I can check the different font for different chars). But when I view in pdf format then save it, as you can image, chars whose matched font is the one I set in Report Studio will be displayed well and others will be displayed with square with default the font andale WT.

If I need to fix that, one way I can do is to category the data by their hex code and create multiple SQL queries in Report Studio. Then in RS , set the corresponding font for the data item in the column/list for each query. But this is not the final solution. Because it will not work if the database column stores an article/many chars requiring to match with multiple fonts....
Do you have any thoughts?  Pls kindly check the attached image for word, pdf, browser output.

Thanks,
Ricky

CognosPaul

Do you have a field that indicates the correct font for the field? If so, you could use conditional styles.