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

OTF to PDF. Scripts.

Former Member
0 Likes
406

Hi ,

I am using the below module for a script to convert OTF to PDF

And then downloading it to desktop using GUI_DOWNLOAD.

FIle is getting downloaded and PDF is opening with two pages. But it's blank. Therez no data. I get a message as "There was an error opening this document. There was a problem reading this document".

But when I right click the PDF file and open it in notepad I can see all the script data with html '/' etc

i_content_txt has OTF data. As I have used TDGETOTF = 'X'.

I can actually see the data in i_content_bin. But it has all numbers which i don't understand like what they mean.

CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'

EXPORTING

format_src = c_otf

format_dst = c_pdf

devtype = c_printer

*devtype = 'ASCIIPRI'

CHANGING

transfer_bin = w_transfer_bin

content_txt = i_content_txt

content_bin = i_content_bin

objhead = i_objhead

len = v_len_in

EXCEPTIONS

err_conv_failed = 1

OTHERS = 2.

plz help

Message was edited by:

Alchemi

2 REPLIES 2
Read only

Former Member
0 Likes
382

Any ideas?

Read only

0 Likes
382

I think you create a smartform or sapscript with an empty content