on 06-11-2009 5:13 PM
Hi,
I have a requirement like . I am generating one smart form. I need to convert the smart form output to PDF format.
Here If I give the print out of my smart form it directly goes to the printer as a PDF format and I need print out in PDF print.
I dont want to store anywhere this PDF output. It goes to printer directly and print as PDF.
Thanks and Regards,
Srihari.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jun 11, 2009 12:17 PM
hi
try this 2 options
1) Execute the smartform application program with the printer name and
click on print on the pop up for print parameters,a spool no will be generated
goto SP01 to get the spool no, then with the spool no as input execute the
program RSTXPDFT4,it will convert the smartform o/p to PDF and stores
in the location mentioned.
2)Try this
Call function 'SSF_FUNCTION_MODULE_NAME'
with the smartform name as input stored in a variable of type TDSFNAME
to determine the Generated Function Module stored in a variable of type
RS38L_FNAM
call the Generated Function Module
call function 'CONVERT_OTF'
exporting
format = 'PDF'
tables
otf = ssfcrescl-otfdata
lines = tline
call function 'SX_TABLE_LINE_WIDTH_CHANGE'
data : it_attach like SOPCKLSTI1 occurs 0 with header line,
it_mess like SOLISTI1 occurs 0 with header line,
it_table like SOLIX occurs 0 with header line,
it_receivers like SOMLRECI1 occurs 0 with header line.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
tables
packing_list = it_attach
contents_txt = it_mess
contents_hex = it_table
receivers = it_receivers.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wht do u mean by print output in pdf, it will be same anyways as normal print output
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No Kartik,
Actually I am printing the data in the pre-printed stationary. If I convert the output into PDF format manually then alignment is perfect with pre-printed stationary. If I give the print directly with out converting into PDF the alignment is differenent.
That is the reason I posted the above query.
Thanks
Srihari..
Hi,
Once u get the OTF data, just pass it to the below FM..
to get OTF data, u need to pass the variable 'GETOTF' in structure 'SSFCTRLOP' as 'X'.
DATA : otf_data TYPE itcoo OCCURS 0 WITH HEADER LINE,
l_t_control LIKE ssfctrlop.
l_t_control-getotf = 'X' ---> pass this to Smartform FM
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
i_otf = otf_data[]
EXCEPTIONS
acrobat_not_registered = 1
convert_otf_to_pdf_error = 2
download_error = 3
acrobat_not_started = 4
cntl_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope it helps!!
Rgds,
Pavan
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.