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

Special characters in Smartforms

Former Member
0 Likes
1,056

Hi,

I'm working with webdynpro abap and in my application I have to generate a smartform which one has been created and converted to a PDF file.

In the conversion routine, some special characters are loosing the properties itself, for example: the character Ω has been transformed in © and I don't know why this is happening.

The function that I'm using to generato the pdf file is the code below:

CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format              = 'PDF'
        IMPORTING
          bin_file             = e_result
        TABLES
          otf                    = t_out-otfdata
          lines                 = t_saida
        EXCEPTIONS
          err_max_linewidth = 1
          err_format        = 2
          err_conv_not_possible = 3
          err_bad_otf      = 4
          OTHERS         = 5.

And after I take the bin file that the function returns and use the static method from the cl_wd_runtime_services class:

cl_wd_runtime_services=>attach_file_to_response(
    i_filename      = 'Calibracao.PDF'
    i_content       = v_pdf
    i_mime_type     = 'application/pdf'
    i_in_new_window = 'X'
    i_inplace       = 'X'

).

Follow an attachment file...

Anyone knows  can help?

Hi,

I'm working with webdynpro abap and in my application I have to generate a smartform which one has been created and converted to a PDF file.

In the conversion routine, some special characters are loosing the properties itself, for example: the character Ω has been transformed in © and I don't know why this is happening.

The function that I'm using to generato the pdf file is the code below:

CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format              = 'PDF'
        IMPORTING
          bin_file             = e_result
        TABLES
          otf                    = t_out-otfdata
          lines                 = t_saida
        EXCEPTIONS
          err_max_linewidth = 1
          err_format        = 2
          err_conv_not_possible = 3
          err_bad_otf      = 4
          OTHERS         = 5.

And after I take the bin file that the function returns and use the static method from the cl_wd_runtime_services class:

cl_wd_runtime_services=>attach_file_to_response(
    i_filename      = 'Calibracao.PDF'
    i_content       = v_pdf
    i_mime_type     = 'application/pdf'
    i_in_new_window = 'X'
    i_inplace       = 'X'

).

Follow an attachment file...

Anyone knows  can help?

2 REPLIES 2
Read only

arindam_m
Active Contributor
0 Likes
735

Hi,

It might be a misinterpretation of the encoding that might be happening when generating the OTF format. You can try few things, first you can try the FM CONVERT_OTF_TO_PDF. Also try manipulating the string by printing that text with Greek Fonts, most probably it will support better conversion in PDF.

Cheers,

Arindam

Read only

Former Member
0 Likes
735

Hello,

It might be an issue with the font. Please check and use correct font or fonst supported by smartforms.

Best Regards,

Swanand