Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OTF unicode output conversion to PDF

Former Member
0 Likes
3,330

Hi,

I have a smartform that needs to be converted to pdf. The smartform output may be in regional languages like Chinese. The output is correct when I see the print preview of the smartform.

Now, when I call convert_otf_2_pdf, the pdf contains garbage character instead of the unicode characters.

Our R/3 is not unicode, but the translation exists. How can I solve this problem?

Nirav.

Hi,

I have a smartform that needs to be converted to pdf. The smartform output may be in regional languages like Chinese. The output is correct when I see the print preview of the smartform.

Now, when I call convert_otf_2_pdf, the pdf contains garbage character instead of the unicode characters.

Our R/3 is not unicode, but the translation exists. How can I solve this problem?

Nirav.

12 REPLIES 12
Read only

Former Member
0 Likes
2,258

Hi guys,

Has nobody encountered this situation before? Any ideas?

Read only

Former Member
0 Likes
2,258

Hi

We have implemented a similar scenario but we are sending the PDF by email. How do you want to process the PDF. I mean do you want to store it to SAP OFFICE / PC FILE or send it by mail. We have used CONVERT_OTF ( to PDF format ) with some additional coding . But this has been done on WAS620 system ( i.e. unicode enabled)

Cheers

Read only

Former Member
0 Likes
2,258

Hi Nirav,

Just checkout the codepage in which the PDF is getting generated. Alternatively also check out your language settings in Windows where you might be opening the PDF file.Setit to chinese language and try opeing the PDF. Hope this helps.

Read only

0 Likes
2,258

Hi Kareemullah,

We went through the convert_otf_2_pdf function and found it uses sy-langu to pick up the codepage. We logged into the backend with chinese and generated the OTF and PDF, but still no luck.

About the Acrobat Reader, we have a document which is in Chinese and it shows up fine , so that rules out the second possibility too.

Anything else I can try?

Nirav

Read only

0 Likes
2,258

Hi guys,

I am trying to understand where exactly the problem lies, so please help me.

1. The output of the smartform is correct when I see the print preview, i.e. Chinese characters appear. Does this mean that if I suppress the dialog and get the otf output, that too contains the correct output?

2. If the above is true, then is the problem with the convert_otf_2_pdf? If so, then is the problem because I may have logged in with english and trying to convert using a Chinese codepage? (could be the problem since I saw that code of convert_otf_2_pdf and it picks up the codepage according to the sy-langu). I tried this and didn't work. Could this be because the backend is not unicode enabled?

3. If the above is true, if there any way I can force the convert_otf_to_pdf to use a particular codepage? If no, then is there are other option, like making a replica of the function module and replacing sy-langu by an additional language parameter...I will try this, but I first need to know if its worth a shot, since the backend is not unicode?

Nirav

Read only

0 Likes
2,258

Hi Nirav,

Did you try using SET LOCALE LANGUAGE <your language here> before call to CONVERT_OTF_2_PDF?

SET LOCAL LANGUAGE <your language>.

CALL FUNCTION 'CONVERT_OTF_2_PDF'....

Sri

Read only

0 Likes
2,258

Hi Srikant,

Tried it...no difference.

Nirav.

Read only

0 Likes
2,258

Nirav,

Have you got a solution for the below issue. It is the same issue even we are facing with Traditional Chinese PO PDF download.

Pl let me know if you have any solution..

Read only

Former Member
0 Likes
2,258

Does anyone have any solution? I am faced with thesame problem.

Read only

0 Likes
2,258

Hi Gurus,

can any one resolve this issue.

I have the same problem i.e. when I see the PO which has chinese charcaters, in print preview and in Spool, its fine.However when I try downloading it using GUI_DOWNLOAD , its giving some garbage characters insteading of printing chinese letters. Can anyone suggest me in this regard.

I have tried changing the code page, the printer , changed the language settings in PC and downloaded the language packs for PDF 8.0 but no luck. please help.

cheers,

badam

Read only

Former Member
0 Likes
2,258

Hi All,

can any one resolve this issue.

I have the same problem with Cyrillic Languages (Bulgarian).

When i use FM convert OTF to PDF its giving some garbage characters insteading of printing cyrillic letters.

Please can anyone suggest me in this regard.

I appreciate any help.

Regards,

Ari

Read only

Former Member
0 Likes
2,258

Hi,

This problem can be solved by using smartform translations, provided your layout is designed in Times/Courier/Helve font. These are the fonts SAP converts to their corresponding Chinese font.

Use transaction SE63 to perform the smartform translation from EN to ZH.

Let me know if any doubts.

Tushar