cancel
Showing results for 
Search instead for 
Did you mean: 

Thai character in print preview PDF

Former Member
0 Kudos

Hi All,

Why is it when I print preview smartform output in PDF format, all thai characters printed as funny characters?

My command is as below:

control_parameters-no_dialog = 'X'.

control_parameters-getotf = 'X'.

output_options-tddataset = 'SMART'.

output_options-tdsuffix2 = sy-uname.

output_options-tdimmed = 'X'.

output_options-tddelete = 'X'.

output_options-tdlifetime = '1'.

output_options-tdcopies = '1'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZMM_VMR_01'

IMPORTING

fm_name = lf_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

CLEAR job_output_info.

CALL FUNCTION lf_fm_name

EXPORTING

user_settings = ' '

control_parameters = control_parameters

output_options = output_options

IMPORTING

job_output_info = job_output_info

TABLES

sitab = t_basic_t[]

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Is there anything missing? do I have to print to spool and then read from spool to preview via PDF? What user want is to preveiw in PDF and if they are satisfied, they will save the document from PDF.

Juli.

Edited by: Julimainoe Mohd Noh on Oct 10, 2011 11:29 AM

Accepted Solutions (1)

Accepted Solutions (1)

aidan_black
Active Contributor
0 Kudos

Hi,

Some parameters need to be set correctly when calling the smartform function module. Parameter output_options-tddest needs to be set to an output device that is defined with a correct Thai device type like e.g. THSAPWIN. The parameter 'User Settings' should not be filled.

Regards,

Aidan

Former Member
0 Kudos

Hi,

you must install a true type font to your local PC, that has Thai characters inside. Print preview is a Dialogue/Frontend processing method and has nothing to do with the PDF-generation at backend.

To display a pdf preview, you must upload the truetype font with thai characters to the application server.

There is a SAP-note, where you can find a table, which fonts are available for thai.

Regards,

Christian

Former Member
0 Kudos

Hi Aidan,

Thanks for the reply.

I've set output_options-tddest = 'THSAPWIN' but PDF preview display on screen is still the same where Thai characters printed as funny character. Is there anything I have to do for device type THSAPWIN? I've also tried device type 'PDFUC' and the result is the same.

Juli.

Edited by: Julimainoe Mohd Noh on Oct 11, 2011 5:40 AM

Former Member
0 Kudos

Hi Christian,

Do you know what SAP Notes that I need to apply?

Thanks,

Juli.

aidan_black
Active Contributor
0 Kudos

Hi juli,

If you use device type THSAPWIN, then you must install the Angsana New fonts under font family THANGSAN via report RSTXPDF2. See SAP note # 339832. Also the language key of the smartform must be TH. i.e. When the application calls the smartform function module, the parameter CONTROL_PARAMETERS-LANGU should be set to '2'. 2 is the short version of TH.

Finally font THANGSAN should be used for Thai characters in the smartform. iIf you use device type PDFUC, then the Angsana New fonts must be installed via report RSTXPDF2UC. See SAP note #999712.

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

My basis guy already installed as per your suggestion.. but still not working.. Do you think there's anything else I should check?

Please help!

Juli.

Former Member
0 Kudos

Hi,

I managed to get Thai character in PDF preview.. only now the problem is the characters overlapping with others in the same line.. how can I get it to display correctly..

Juli.

aidan_black
Active Contributor
0 Kudos

Hi,

Usually this is becasue a different font than Angsana New is used.

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

I set my font to THANGSAN because I thought we are supposed to use font THANGSAN for Thai character?

I don't have font Angsana New to select in smartform.. How do I do that?

Juli

aidan_black
Active Contributor
0 Kudos

Hi Juli,

When you select THANGSAN in the form, font Angsana New should be used in the PDF if you uploaded this true type font as a PDF replacement font as described above.

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

I've checked with my basis.. Angsana new is already mapped to PDFUC Thangsan..

What I notice that for Thai, the length of character printed is not same as EN.. Is that can be a reason why the character printed overlapped?

Juli.

Answers (0)