Outputting Chinese Characters in PDF Reports

APPS   2009-05-13 18:43   阅读55   评论0  
字号:    
Outputting Chinese Characters in PDF Reports
Posted: 2004-5-6 下午9:59

Click to report abuse...   Click to reply to this thread Reply
Hi, I wonder how do I output the chinese characters in PDF format for reports? I have read some of the articles in this forum.

Things I have done are:
1. I have modified the "uifont.ali" file on the PDF: Subset part to:
Arial = "ARIALUNI.TTF"
2. Copy the "ARIALUNI.TTF" file to REPORTS_PATH (C:\OraHome1\jdk\jre\lib\fonts).
3. Visited these sites:
http://otn.oracle.com/products/reports/htdocs/getstart/examples/index.html
http://otn.oracle.com/products/reports/htdocs/getstart/whitepapers/pdfenh.htm
http://otn.oracle.co.kr/products/reports/pdf/Reports_Configuration.pdf(I cannot read the characters in this file)
4. Change the NLS_LANG in REGEDIT to Traditional Chinese or Simplified Chinese.

But I still couldn't get the chinese characters outputted to the PDF format in Report Server. Please help. Thank you.

P/S: I'm using Acrobat Reader 6.0. Report9i with Oracle8i as database.


Joey

nasingh

Posts: 1,047
Registered: 02/03/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-11 下午10:21   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Hi, One more thing you can check is:

See if the font "script" is correct - in reports builder, highlight the text object, and choose Format > Font > Script.

Navneet.
joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-12 上午12:49   in response to: nasingh in response to: nasingh

Click to report abuse...   Click to reply to this thread Reply
Thanks for your suggestion, Navneet. I did that and the report is still not displaying chinese characters in PDF.

I suspect there must be something wrong with the Report Server. It may not contain the Unicode characterset which will recognize any language (e.g. chinese). Thus the report generated in PDF format through the Report Server will be displayed as "?" (unknown character).
Please comment.

Regards,
Joey
nasingh

Posts: 1,047
Registered: 02/03/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-12 下午10:45   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Hi Joey,

something wrong with the Report Server. It may not contain the Unicode characterset
The Reports Server does not contain character sets. On Windows, it picks up the fonts from the system on which it is running.

I am not sure what else could be wrong with your setup. I am assuming that you are running your report and also viewing it on the SAME Windows machine. Are you getting correct output when you generate output to other formats like HTML / HTMLCSS / RTF? Or do you hit the same problem with all layouts? If it is a problem with ALL output formats, are you sure that the characters are stored in the database in correct Chinese form, ie, in the correct character set?

If nothing else works, you can try this - make sure you have version 9.0.2.3 (if not, apply patch 3) - then edit the reports server config file to add the following environment entry:

<environment id="CH">
<envVariable name="NLS_LANG" value="<your_value>"/>
</environment>

Restart the reports server, and run the report using the command line argument EnvId=CH, eg,
http://machine:port/reports/rwservlet?report=...+server=...+destype=file+desformat=pdf+desname=...+userid=...+envid=CH

If this too does not work, you might want to follow it up with Oracle Support. Oracle Reports patches are available on Metalink (http://metalink.oracle.com)

Navneet.
nasingh

Posts: 1,047
Registered: 02/03/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-12 下午10:59   in response to: nasingh in response to: nasingh

Click to report abuse...   Click to reply to this thread Reply
Also, for more information on the "Dynamic Environment Switching" feature (the feature that I suggested, that uses EnvId), you can look up Publishing Reports Manual Sec 3.2.2
http://otn.oracle.com/documentation/reports.html

Navneet.
joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-12 下午11:34   in response to: nasingh in response to: nasingh

Click to report abuse...   Click to reply to this thread Reply
Thanks Navneet. I have no problem with displaying chinese characters in HTML or RTF. However, when it comes to generating the PDF report through the report server, the chinese characters will be displayed as "?" symbol. How do I solve this problem?

I am using Report Builder 9.0.2.0.3. Did you mean 9.0.2.0.3 instead of 9.0.2.3? Do I have to install the patch 3? Can you please show me the URL on the site where I can download this patch 3?

P/S: I am also posting to the metalink forum.

Cheers,
Joey
nasingh

Posts: 1,047
Registered: 02/03/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-13 下午11:00   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Hi Joey,

I meant 9.0.2.3. You have the base release of 9i (Release 2). You can apply Forms and Reports Patch 3. Download it from metalink http://metalink.oracle.com (search for patch number 3129219).

Before you apply your patch, try the following (it may work without the patch):

Use font aliasing. For steps refer to Publishing Reports (version 10g), Section 6.5
http://otn.oracle.com/documentation/reports.html

In case you are viewing the PDF output on a machine which does NOT have the Chinese font installed, use Font Subsetting. Steps are in the same section as given above.

Navneet.
rainbow178

Posts: 6
Registered: 06/10/00

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-14 上午2:57   in response to: nasingh in response to: nasingh

Click to report abuse...   Click to reply to this thread Reply
Hi,

I have the same problem with Joey that I tried to generate Traditional Chinese character from report server in pdf file, but it generated with strange characters. I have tried to output in preview/ rtf/ html format but it is OK.
How to solve this problem? How to set the configuration of the file "UIFONT.ALI" if the font of the chinese characters is "mingliu.ttc"?

Report runtime: 6.0.8.24.0
NLS_LANG. : AMERICAN_AMERICA.ZHT16BIG5
Database Server : 9.2.0.4.0
Script of the chinese font: CHINESE_BIG5

Thanks a lot!
swati_goel@pune...

Posts: 13
Registered: 02/26/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-18 下午11:08   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Hi..

I followed these steps for Japanese fonts. May be you will have to follow something similar for Chinese.

1. Characterset, set as AMERICAN_AMERICA.JA16SJIS.
2. Report Server NLS_LANG=AMERICAN_AMERICA.JA16SJIS
3. Make the following entry in the PDF:Subset section of the uifont.ali (location: C:\<Reports_Home>\tools\Common90):
"Arial Unicode MS" = "Arialuni.TTF"
4. Ensure that the file "Arialuni.TTF" is in REPORTS_PATH
5. Set the above files path in REPORT_PATH.
6. Go to: http://www.adobe.com:80/products/acrobat/acrrasianfontpack.html
Download the Adobe Acrobat Reader Asian Font Pack for Japanese on Windows.
7. Install the font pack on NT Application server as well as on Devlopment/Client Windows machines.

8. Open the uifont.ali file located on Application Server and create the following entry under the PDF section:

.....SJIS = "HeiseiKakuGo-W5-Acro"

I think something similar must be there for Chinese fonts also. Just try it out.
I hope this helps you at least with the steps.

Regards,
Swati

joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 上午12:07   in response to: swati_goel@pune... in response to: swati_goel@pune...

Click to report abuse...   Click to reply to this thread Reply
Thanks Swati.

I am not so sure what did you mean by these steps:

1. "1. Characterset, set as AMERICAN_AMERICA.JA16SJIS"
Where should I set this characterset? In the Report Server? How to set it in Report Server?

2. "8. .....SJIS = "HeiseiKakuGo-W5-Acro""
I am using Chinese characterset ZHS16GBK. What should I write then? Can I write:
"ZHS16GBK = SimSun"?

Hope to get your reply soon as I need it urgently.

Thank you.

Regards,
Joey
joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 上午1:15   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
By the way, what is the path I should install the Adobe Acrobat Reader Asian Font Pack in the report server?
joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 上午1:24   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
What did you mean by setting the characterset? Did you mean setting the characterset in the report server? How do I go about it?
rainbow178

Posts: 6
Registered: 06/10/00

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 上午2:41   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Hi,

I also don't understand about the step 8, and do you mean that I should install the language pack in both client & application server? would you please to explain it?
Thanks a lot for your kindly help!
swati_goel@pune...

Posts: 13
Registered: 02/26/03

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 上午3:11   in response to: rainbow178 in response to: rainbow178

Click to report abuse...   Click to reply to this thread Reply
Hi

See, the Asian Font Pack for PDF is to be installed on the server machine as well as the client machines otherwise they wont be able to view the chinese fonts. This is what i meant by installing them on the client and application machines.. by application, i meant application server.. I am sorry for not mentioning this explicitly.

You do not have to place it in the Reports Server Home. These fonts have to be installed on the windows. So, the files are placed in the fonts file of the machine.

As for the Character set, in the uifont.ali file, this has to be mentioned. I think once you install the asian font pack, this would be clearer. For Chinese fonts , this would be something like
... GBK = " something"
What exactly it would be, I am not sure.
If I come to know it, I would post it as well.

Just to make sure, while installation, had you selected Chinese in Product Languages option?

Do let me know, if there is still some problem that you are facing.

Regards,
Swati

joeyng@mailcity...

Posts: 77
Registered: 12/02/02

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-19 下午6:07   in response to: swati_goel@pune... in response to: swati_goel@pune...

Click to report abuse...   Click to reply to this thread Reply
Thanks Swati.

I followed all those steps (make the modifications as the Report Server is in Linux platform). Things that I have done are:
1. Set the report server NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (also trying to set it as CHINESE_CHINA.ZHS16GBK because error message will be prompted if I set it as SIMPLIFIED CHINESE_CHINA.ZHS16GBK)
2. Make the following entry in the PDF:Subset section of the uifont.ali (location: C:\<Reports_Home>\guicommon9\tk90\admin\):
Arial Unicode MS = "Arialuni.TTF"
3. Ensure that the file "Arialuni.TTF" is in REPORTS_PATH.
4. Set the above files path in REPORT_PATH.
5. Download and install the Adobe Acrobat Reader Asian Font Pack for Simplified Chinese on Linux.
6. Install the font pack on Linux Application server as well as on Development/Client Windows machines.
7. Open the uifont.ali file located on Application Server and create the following entry under the PDF section:
ZHS16GBK = "STSongStd-Light-Acro"
This STSongStd-Light-Acro.otf font is from the Adobe Acrobat Reader Asian Font Pack for Simplified Chinese on Linux. I also put this file into the same directory as stated in the REPORTS_PATH.

But I still couldn't get the Chinese font displaying in PDF format. Something I would like to find out from you are
1. How to set the chinese characterset? The only way that I can set the chinese characterset is when I am installing the Application server and the database. Is there the only way that I have to reinstall the Application Server and the database so that I can set the chinese characterset?
2. Do I have to set the Chinese characterset in both Application Server and Database?

Thank you.

Joey

Hi, Chow Yee Ng
I can display trandtional chinese character in a PDF output from both report server and developer.
You may follow the steps from "399828" posted on 18-05-2004 for Japanese character testing or my step for Traditional Chinese testing
- NLS_LANG=TRADITIONAL CHINESE_HONG KONG.ZHT16MSWIN950 in 9iAS/developer workstation
- Goto http://www.adobe.com:80/products/acrobat/acrrasianfontpack.html download the Asian font pack
***Remeber that the Asian Font Pack is differ in Adobe Reader 5 and 6, the "otf" files installed in CIDFont folder is different for each version. I install AFP for 5 then copy the files "MSungStd-Light-Acro.otf" to CIDFont folder in 6 will works fine. I recomment using Adobe Reader 5.0/5.1. Make sure that "MSungStd-Light-Acro" is located in your Adobe Installed directory (eg. C:\Program Files\Adobe\Acrobat 5.0\Resource\CIDFont)
-- Open uifont.ali (in 9iAS/Developer workstation) then add the entries under PDF (not subset)
"Arial Unicode MS"="MSungStd-Light-Acro"
-- Open your report then change the font to "Arial Unicode MS"
*** I try to use MingLIU but doesn't work, the chinese character will be collpased! Using Unicode font is recomment
-- Try to generate PDF from developer then deploy it into 9iAS

** Using unicode database and Windows 2000 English Version
** locale set to Traditional Chinese
** I try it on Windows 2000 simplified Chinese... doesn't work.
** Patchset 3 for 9iDS was installed in my developer workstation
juichiho

Posts: 8
Registered: 12/07/00

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-20 上午2:32   in response to: parry_chu in response to: parry_chu

Click to report abuse...   Click to reply to this thread Reply
Hi Chu C Chi Ho,

It's work after your hints.
Another problem is the chinese character are overlap.
Do you have any idea?

Thanks.
parry_chu

Posts: 2
Registered: 09/05/00

Re: Outputting Chinese Characters in PDF Reports
Posted: 2004-5-20 上午2:56   in response to: joeyng@mailcity... in response to: joeyng@mailcity...

Click to report abuse...   Click to reply to this thread Reply
Juichi Ho,

Please modify the field in 9iDS using font "Arial Unicode MS", I try to use MingLIU/Arial but doesn't work, the Chinese Character will be collpased/overlap. I don't know the reason at all, perhaps my database using unicode and Chinese Character is multibyte as well. That's why i use "Arial Unicode MS" in my testing.

Also, I try the following as well in unifont.ali
PDF:Subset
"Arial Unicode MS"= "ARIALUNI.TTF"

It works fine as well. The different between 2 method is the font only. If using Adobe AFP font, Chinese Character display in a "very good style". But if the data contains the character "~", there will be a problem. Using subset method, Chinese Character looks very solid and most of the English characters and symbols looks fine except block letter "I" and "l". Try to see which method is suitable for you.
** I need to restart the report server in 9iAS/developer for any changes
Regards,
Parry Chu




URL:

http://forums.oracle.com/forums/thread.jspa?threadID=243071&start=0&tstart=0

评论(?)
阅读(?)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
网易公司版权所有 ©1997-2009