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 missing on PDF

Former Member
0 Likes
2,635

Hi,

We are not getting some Turkish characters in the PDF.

In spool all the characters are displayed correctly on the OTF in SP02 transaction

We are using function module CONVERT_OTFSPOOLJOB_2_PDF to convert the spool to PDF. But on PDF these special characters are not displayed.

Kindly guide us on this issue.

Regards,

Mudita

Hi,

We are not getting some Turkish characters in the PDF.

In spool all the characters are displayed correctly on the OTF in SP02 transaction

We are using function module CONVERT_OTFSPOOLJOB_2_PDF to convert the spool to PDF. But on PDF these special characters are not displayed.

Kindly guide us on this issue.

Regards,

Mudita

9 REPLIES 9
Read only

Former Member
0 Likes
1,951

Hi Mudita,

Please check the sample program

BCS_EXAMPLE_8

this will resolve your problem.

i have used same thing to resolve my issue same as you

Thanks

Surendra

Read only

0 Likes
1,951

Hi Surendra,

Thanks for your response.

But I am not able to find this program BCS_EXAMPLE_8 in the R/3 system.

Could you please provide the details what this program do?

Regards,

Mudita

Read only

0 Likes
1,951

Hi Mudita,

After executing the Smartform or script it will generate a Spool right

the above program will ask the spool num and mail id than it will sent to that mail id

in that standard prog they use that function module to get PDF

Please find the below iam just pasting the code there in the standard prog just check

parameters:
mailto  type ad_smtpadr default 'Mail id' obligatory,
rqident type tsp01-rqident obligatory.
data send_request  type ref to cl_bcs.
data document      type ref to cl_document_bcs.
data recipient     type ref to if_recipient_bcs.
data bcs_exception type ref to cx_bcs.
data sent_to_all   type os_boolean.
data pdf_size      type so_obj_len.
data pdf_content   type solix_tab.
data pdf_xstring   type xstring.

start-of-selection.
  perform create_pdf.
  perform send.
form send.
  try.
      send_request = cl_bcs=>create_persistent( ).
      pdf_content = cl_document_bcs=>xstring_to_solix( pdf_xstring ).
      document = cl_document_bcs=>create_document(
            i_type    = 'PDF'
            i_hex     = pdf_content
            i_length  = pdf_size
            i_subject = 'test created by BCS_EXAMPLE_8' ).  "#EC NOTEXT
      send_request->set_document( document ).
      recipient = cl_cam_address_bcs=>create_internet_address( mailto ).
      send_request->add_recipient( recipient ).
      sent_to_all = send_request->send( i_with_error_screen = 'X' ).
      commit work.
      if sent_to_all is initial.
        message i500(sbcoms) with mailto.
      else.
        message s022(so).
      endif.
    catch cx_bcs into bcs_exception.
      message i865(so) with bcs_exception->error_type.
  endtry.
endform.                    "send
form create_pdf.
  data rq       type tsp01.
  data bin_size type i.
  data dummy    type table of rspoattr.
  call function 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
    exporting
      rqident     = rqident
    importing
      rq          = rq
    tables
      attributes  = dummy
    exceptions
      no_such_job = 1
      others      = 2.
  if sy-subrc <> 0.
    message e126(po) with rqident.
  endif.
  if rq-rqdoctype = 'OTF' or rq-rqdoctype = 'SMART'.
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
      exporting
        src_spoolid              = rqident
        no_dialog                = 'X'
        pdf_destination          = 'X'
        no_background            = 'X'
      importing
        pdf_bytecount            = bin_size
        bin_file                 = pdf_xstring
      exceptions
        err_no_otf_spooljob      = 1
        err_no_spooljob          = 2
        err_no_permission        = 3
        err_conv_not_possible    = 4
        err_bad_dstdevice        = 5
        user_cancelled           = 6
        err_spoolerror           = 7
        err_temseerror           = 8
        err_btcjob_open_failed   = 9
        err_btcjob_submit_failed = 10
        err_btcjob_close_failed  = 11
        others                   = 12.
    if sy-subrc <> 0.
      message e712(po) with sy-subrc 'CONVERT_OTFSPOOLJOB_2_PDF'.
    endif.
  elseif rq-rqdoctype = 'LIST'.
    call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
      exporting
        src_spoolid              = rqident
        no_dialog                = 'X'
        pdf_destination          = 'X'
        no_background            = 'X'
      importing
        pdf_bytecount            = bin_size
        bin_file                 = pdf_xstring
      exceptions
        err_no_abap_spooljob     = 1
        err_no_spooljob          = 2
        err_no_permission        = 3
        err_conv_not_possible    = 4
        err_bad_destdevice       = 5
        user_cancelled           = 6
        err_spoolerror           = 7
        err_temseerror           = 8
        err_btcjob_open_failed   = 9
        err_btcjob_submit_failed = 10
        err_btcjob_close_failed  = 11
        others                   = 12.
    if sy-subrc <> 0.
      message e712(po) with sy-subrc 'CONVERT_ABAPSPOOLJOB_2_PDF'.
    endif.
  else.
    message e789(po) with rq-rqdoctype.
  endif.
  pdf_size = bin_size.
endform.                    "create_pdf

Read only

0 Likes
1,951

Hi Surendra,

Thanks for your reply.

In your code you are importing two parameters "pdf_bytecount" and "bin_file" from FM 'CONVERT_OTFSPOOLJOB_2_PDF'.

In our system in fm 'CONVERT_OTFSPOOLJOB_2_PDF" there is no parameter as "bin_file".

Regards,

Mudita

Read only

Former Member
0 Likes
1,951

Hi,

Try to take the Print of the Document and see whether this this characters are missing.

Regards,

SRinivas

Read only

Former Member
0 Likes
1,951

Hi Mudita,

Is the Turkish fonts available in your system? Thats the reason you are not able to see the Turkish charcters.

These characters will be displayed as some garbage characters.

Read only

0 Likes
1,951

Hi Manjumath,

Can you please explain how to check whether the sytem supports the Turkish character or not?

Regards,

Mudita

Read only

0 Likes
1,951

From google, download any documents which contains Turkish characters.see if u are able to see the characters in the pdf.

In your computer, go to START->CONTROL PANEL-> REGIONAL & LANGUAGE OPTIONS, try to change it Turkish and see if u are able to see the Turkish characters

This is not an issue with program i feel. Because we had similar issue with Korean fonts

Also i think Adobe Language for Turkish fonts s/w if installed will solve the issue

Read only

0 Likes
1,951

Hi Manjunath,

I downloaded a file conatining Turkish characters. All the characters were displayed correctly on the PDF. So, my system supports the Turkish characters.

Regards,

Mudta