cancel
Showing results for 
Search instead for 
Did you mean: 

Different Font in different system

0 Kudos

Hi all,

I need to covert a smart form to PDF, then sending it out in email.

Everything looks ok in DRA system, But the font in part of the PDF document become smaller in QRA system.

Who can tell me the reason? Thanks advance.

The following is my code to convert otf and add attachment.

 ls_control_param-no_dialog   = gc_no_dialog.
            ls_control_param-device        = 'TELEFAX'.
            ls_control_param-getotf         = gc_flg_x.
            ls_output_option-tddest         = 'LOCAL'.

CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = gc_doc_type_pdf
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = lv_bin_filesize
          bin_file              = lv_bin_file
        TABLES
          otf                   = lt_otf_data
          lines                 = lt_pdf_data
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          OTHERS                = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

* Add PDF attachment
      lv_file_size  = XSTRLEN( lv_bin_file ).
      lt_attachment = cl_document_bcs=>xstring_to_solix(
                                     ip_xstring = lv_bin_file ).
      lv_attachment_subject = ls_invoice-xblnr.
      TRY.
          cr_document->add_attachment(
          EXPORTING
          i_attachment_type    = gc_doc_type_pdf
          i_attachment_subject = lv_attachment_subject
          i_attachment_size    = lv_file_size
          i_att_content_hex    = lt_attachment ).

Thanks very much.

Ivy

Accepted Solutions (0)

Answers (4)

Answers (4)

aidan_black
Active Contributor
0 Kudos

Hi,

Perhaps there are true type fonts loaded in one system but not the other. Check this via report RSTXPDF2 -> List true type fonts.

Regards,

Aidan

Former Member
0 Kudos

Just a thought, have you verified that smartstyle in both systems are on the same version.

Former Member
0 Kudos

Hi,

you have to check following:

Frontend print: Your font in the form will be mapped to a windows font, which will be used.

Backend print: Your font in the form will be mapped to a resident font in the printer device.

PDF print: Your font in the form will be mapped to a true type font installed on the SAP-Server.

If your font is not available with the print technique on your system, you get a different output!

Regards

Christian

0 Kudos

Hello Sat R,

How to check the smartstyle? The smart form not created by me, i just using the smart form to generate the PDF.

Please adivse....Thanks ! !

Best Regards,

Ivy

Former Member
0 Kudos

hi,

to check smartstyle:

goto smartforms transaction.

there enter the smartform name and check what smartstyle is used in it.If tehre is a table define in the main window, the smartstyle would be mentioned in its output options, or any text elements outoput options.

once you have the name, go back to smartform transaction.There select the radio button for smartstyle and check same in both systems.

Former Member
0 Kudos

Hi Ivy,

Is it just a part of the text in the document that is small in font, or is it the whole document?

In case it is whole document - Might sound off the track but, are you sure that on the PDF client(that is ADOBE Reader) you have the correct "ZOOM" value ?

If it is only part of the document, then you might want to check the Font/Style used for the text element that is small in size.

Regards,

Chen

Former Member
0 Kudos

Hi Ivy,

I believe that the smartform is producing some output (spool request) and you are converting the spool to PDF. The font problem is a known issue as you must be checking same layout output in different systems (i.e, dev, quality, production). The font problem happens not only in case of PDF conversion, but also for printing had copies, though the print preview may be misleadingly same.

One of reason is the printer set-up. You must be using some printer to create the spool. If the printer connected to different systems are different (rather, using different device drivers, printer model does not matter), you will get varying font. So always try to produce output in reference to a printer which is having same device driver as in printer in production. That will at least ensure that you get identical output in production, compared to what you developed in development system.

You can check with Basis team and find out the device driver used for the different printers you are using in different system.

Cheers,

Anid

0 Kudos

Hello Anid,

I don't think i am producing the smart form in spool, because i didn't find the it in spool (SP01). Please refer my below code.


 ls_control_param-device       =  'TELEFAX'.
 ls_control_param-getotf        =  gc_flg_x.
 ls_output_option-tddest         =  'LOCL'.

As you metionded, i should use identical printer to create the spool. How to use the identical printer in my case? I am using 'LOCL' to be the Output Devices in both systems, and the devices type is SWIN. The devices type version in DRA system is 458 and in QRA system is 457, and there are no other different configrations.

If the different version cause this issue?

Please adivce...Thanks very much.

Best Regards,

Ivy