Application Development 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: 

Problem in PDF conversion of a Smartform

Former Member
0 Kudos

Hi Experts,

I have Chinese text and english text in the Smartform

When see print preview of Smartfrom the output is perfect

But when i convert the OTF to PDF using CONVERT_OTF FM and send as mail attachment,

The chinese characters are JUNK and conversion don't occur properly.

For english TEXT i use Times new roman font

For Chinese Text i use CNSONG

I have used other FM as well CONVERT_OTF_2_PDF, the results were negative.

Please advise

Regards

Balaji R

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Balaji,

Please check the print program of the Smartform.

There should be an exporting parameter 'control_parameters' in the call to the Smartform FM.

See if the field LANGU of this structure (structure type SSFCTRLOP) has value ZH(Chinese simplified) or ZF(Chinese traditional). Run the form again nad see if the issue is resolved?

Regards

Sabu.

14 REPLIES 14

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Please check in SE73 if the font CNSONG is maintained there in the "System Fonts".

BR,

Suhas

Former Member
0 Kudos

Hi,

Thanks for your reply

I can see CNSONG font available in SE73.

Former Member
0 Kudos

Balaji,

Please check the print program of the Smartform.

There should be an exporting parameter 'control_parameters' in the call to the Smartform FM.

See if the field LANGU of this structure (structure type SSFCTRLOP) has value ZH(Chinese simplified) or ZF(Chinese traditional). Run the form again nad see if the issue is resolved?

Regards

Sabu.

0 Kudos

Hi Sabu,

Thanks for your reply

I passed both ZH and ZF,but the Junk characters still appear.

Please advise.

Regards

Balaji

0 Kudos

Check the Output Device (Transaction SPAD) which you use to issue the output. See what is the Device type attached to the output device. For PDF conversion, there are device types named I2PDF. See, if this device type is attached to your output device(Printer).

Regards

Sabu

Former Member
0 Kudos

Hi Experts,

I even tried passing the device type used for chinese, but still Chinese characters are junk...

Any Inputs Please........

Regards

Balaji R

Former Member
0 Kudos

Hi,

Have you resolved this problem? I am having the same issue here.

Thank you.

Regards,

Tin

0 Kudos

Hello Tin,

Try passing device type as 'CNSAPWIN' in the control parameters and use CNSONG font for chinese chracters as proposed by SAP.

Regards

Balaji R

0 Kudos

HI Balaji,

There is NOT-SAP solution to make the PDF print preview, i don't know if it can be useful:

download and install PDF creator on your PC from: http://www.pdfforge.org/products/pdfcreator

It install into your PC a virtual printer that create PDF file if select for printing

Is well to set this PDFcreator as windows(if you use windows) default printer.

So you have just to Print Preview of smartforms (or other print) selecting the local printer of the SAP system; this call the

PDFcreator set as your PC local printer.

maybe with this method the characters will be converted correctly.

Regards,

Davide

0 Kudos

Hello Davide,

We got this solution from SAP active global support.

I suppose it works in some cases only.

Our scenario is when we try to create PDF of the smartform using FM convert_otf and send as mail attachment.

We can able to see chinese chracters when giving the print preview of the form, but during PDF conversion we get Junk chinese characters.

Even if you have multiple languages in your form, SAP proposes to use 'ZPDFUC' as device type.

My question has the solution proposed by you works in all cases?

Please advise.Thanks.

Best regards

Balaji R

0 Kudos

My solution is useful to save a PDF copy of the print preview of a smartforms or sapscript on PC that launch the print.

In my Company everybody use this method for preview printed in foreign languages ( ex. Romanian) and also our customers.

But i haven't try to do a smartforms in Chinese languages, and i don't know if my method work correctly in this case.

You should try!

Clarification:

For print the smartforms use the printer that you use usually,

for copy it on a pdf file and save it on a local PC use the SAP local printer ( maybe LOCL in your case).

In general (not only on sap ) this solution is useful also when you are not allowed to save a text file (or image) but only to print it.

With this methods you can save it in dpf format.

Regards,

Davide.

0 Kudos

Hi Balaji,

I hope your problem got solved. I am facing same issue like you. Our scenario is exactly same as yours. I would like ot know the detailed solution that you implimented to resolve this issue. Please let me know the detailed solution.

Please help me on this as I caught up very badly.

Thanks in Advance.

J.P.

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Balaji After converting the Spool using FM : CONVERT_OTF and sending that as attachment using SO_NEW_DOCUMENT_ATT_SEND_API1 call one more FM: QCE1_CONVERT.

Hope u can get the required results.

Regards,

Sreeram

Former Member
0 Kudos

Used corrected Devicetype/Printer in the control parameter of Smartform to solve the issue