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: 

Create PDF with CONVERT_OTF in Unicode system

Former Member
0 Kudos

Hi,

I try to create a PDF file from OTF input with function module CONVERT_OTF.

It worked in a non-unicode environment with problems.

If I use the same coding in a unicode system (6.0) and OTF input

contains real doublebyte unicode characters like arabian/greek characters,

the PDF file shows wrong characters like "ÔÑÙàÜÐÕÞÙ Ôâé" instead of

"רבדל הצור %לועה" or "ЉЊЋЌЎЏАБВГόψχΩΨΧ".

I enable the developer trace for CONVERT_OTF, but the trace also

shows the correct unicode characters.

If I create a PDF file with PDF Creater with the same input on my computer,

PDF file looks fine. SAP PDF file uses Font enconding 'Windows', PDF Creator

uses a 'Custom' font encoding.

Any idea, that's going wrong here?

I install TrueType fonts like described in SAP note 999712 with no success,

but this note refers to SAP_BASIS 011, which is not yet available on SAP Marketplace

(latest is 010 today).

Is there any other configuration to enable PDF unicode support?

Print preview from other SAP transactions looks fine with unicode characters.

thanks for help

/Tibor

4 REPLIES 4

Former Member
0 Kudos

Hi,

I have similar problem than you ... how have you solved it?

thanks

Juraj

0 Kudos

>

> Hi,

> I have similar problem than you ... how have you solved it?

> thanks

> Juraj

I found a solution, but I am not sure, if it was for this problem or

output problem with for example PL in non-unicode systems.

I created the input for CONVERT_OTF with CALL FUNCTION 'PRINT_TEXT'.

PRINT_TEXT has to be called with DEVICE = 'PRINTER',

DEVICE = 'ABAP' uses internally the wrong code page.

You have also to set otf_options-tdprinter to a valid printer,

if it is empty, the default printer from user settings is used.

You can use code example from SAP note 413295.

Before you call CONVERT_OTF, you can also check entries with 'FC' in OTF input.

The font (see description of OTF format in SAP help) must be set like described in SAP note 144718.

/Tibor

Edited by: Tibor Gerke on Jan 13, 2011 10:29 AM

former_member182040
Active Contributor
0 Kudos

 CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT  = w_result
        TABLES
          otfdata = it_otfdata.


CALL FUNCTION 'CONVERT_OTF'
   EXPORTING
     format                      = 'PDF'
     max_linewidth               = 132
*   ARCHIVE_INDEX               = ' '
*   COPYNUMBER                  = 0
*   ASCII_BIDI_VIS2LOG          = ' '
*   PDF_DELETE_OTFTAB           = ' '
   IMPORTING
     bin_filesize                = gv_bin_filesize
*   BIN_FILE                    =
    TABLES
      otf                         = gt_otf
      lines                       = gt_pdf_tab
   EXCEPTIONS
     err_max_linewidth           = 1
     err_format                  = 2
     err_conv_not_possible       = 3
     err_bad_otf                 = 4
     OTHERS                      = 5.

Former Member
0 Kudos

set parameter        USE_CASCADING         = 'X'