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: 

Spool to PDF

Former Member
0 Kudos

Hi experts,

I am converting a script to PDF documnet.

For that i am using the FM: CONVERT_OTFSPOOLJOB_2_PDF

after that i am downloading to desk top.

After downloading to desk top i am able to see the PDf document but the text in that is in irregular format.I can see the numeric data perfectly.But the text which is in russian language is displaying in iregular format which is not readable.

Can any body tell me how to resolve this?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The Russian Font must be defined in your SAP system font hence you must me able to see it. But it must not be install in the PDF version you are using. Try installing the Russian font in the PDF version on your destop.

2 REPLIES 2

Former Member
0 Kudos

Hi,

The Russian Font must be defined in your SAP system font hence you must me able to see it. But it must not be install in the PDF version you are using. Try installing the Russian font in the PDF version on your destop.

former_member404244
Active Contributor
0 Kudos

Hi,

Have a look at the below code.

Declaration of local variables

DATA : lv_bytecount TYPE i,

lv_cancel(1) TYPE c,

lv_filename1 LIKE rlgrap-filename. "File name

  • Declaration of local constants

CONSTANTS: lc_pdf(4) TYPE c VALUE '.PDF'.

CONCATENATE c_c

sy-repid

lc_pdf

INTO lv_filename1.

  • Convert Spool to PDF

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = v_rqident

no_dialog = c_x

dst_device = v_print_parms-pdest

IMPORTING

pdf_bytecount = lv_bytecount

TABLES

pdf = i_pdf

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 NE 0.

REFRESH : i_pdf.

ENDIF.

IF p_pdf IS NOT INITIAL.

  • To Download to PDF format

PERFORM download_w_ext(rstxpdft) TABLES i_pdf

USING lv_filename1

lc_pdf

'BIN'

lv_bytecount

lv_cancel.

ENDIF.

Regards,

nagaraj