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

pdf from otf table

Former Member
0 Likes
2,159

Hi.

I have got problem with my smartform.

When i look at smartform from spool or from print preview it looks ok, but when i try to make pdf file using OTF table my smartform is without special characters (polish letters).

Any advice ?

Hi.

I have got problem with my smartform.

When i look at smartform from spool or from print preview it looks ok, but when i try to make pdf file using OTF table my smartform is without special characters (polish letters).

Any advice ?

6 REPLIES 6
Read only

Former Member
0 Likes
1,377

Hi

You can try with using function modules : CONVERT_OTF_2_PDF

SX_OBJECT_CONVERT_OTF_PDF.

For Spool conversion : FM

CONVERT_OTFSPOOLJOB_2_PDF

Read only

Former Member
0 Likes
1,377

I tried those functions. The problem is in otf table. Smartform return OTF table wrong converted,

when i tried SSFCOMP_PDF_PREVIEW which import otf table and make preview from it, this created pdf have not got polish letters.

Read only

Former Member
0 Likes
1,377

Hi,

See below .

DATA: lv_lines TYPE I,

lv_filesize TYPE STRING,

lv_pdf_xstring TYPE xstring.

DATA: lt_otf TYPE STANDARD TABLE OF ITCOO,

lt_obj_bin TYPE STANDARD TABLE OF SOLISTI1,

lt_lines TYPE STANDARD TABLE OF TLINE,

  • Convert OTF to PDF

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

IMPORTING

bin_filesize = lv_filesize

bin_file = lv_pdf_xstring

TABLES

otf = lt_otf

lines = lt_lines

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.

  • Convert PDF data into Binary fomrat

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

EXPORTING

buffer = lv_pdf_xstring

TABLES

binary_tab = lt_objbin.

I was getting problem when i was converting OTF to PDF then I used above function module and my problem is solved. May this help you.

Thanks,

Jayshree.

Read only

Former Member
0 Likes
1,377

Just try by creating a new smartstyle for the smartform.

This will work as the font you are using might not support Polish characters.

Thanks

Nitin

Edited by: Nitin Sachdeva on Dec 17, 2008 5:21 AM

Read only

Former Member
0 Likes
1,377

I found in sap note 941495 answer to my question.

Read only

Former Member
0 Likes
1,377

sap note 941495 :

A PDF file is created from a Smart Form using CONVERT_OTF. The form uses the COURIER font for a text in the Latin-2 character set (for example, Polish).

Although a PDF substitute font is installed for COURIER and Latin-2 with Report RSTXPDF2 (see Note 141343), this font is not inserted into the PDF. The Latin-2 special characters are therefore not displayed correctly in the PDF.