REPORT zdemo01.
*&---------------------------------------------------------------------*
*& Form frm_down_pdf
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PT_OTFDATA text
*----------------------------------------------------------------------*
FORM frm_down_pdf TABLES pt_otfdata STRUCTURE itcoo.
DATA:lv_filename TYPE string,
lt_lines TYPE TABLE OF tline.
*pt_otfdata 为smartforms OTF输出表
*将打印内容转换为PDF图像数据放到内表中
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
TABLES
otf = pt_otfdata "字符流内表,每行存储70字符
lines = lt_lines.
CONCATENATE 'C:' '\' '1.pdf' INTO lv_filename.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'BIN'
CHANGING
data_tab = lt_lines[].
ENDFORM. "frm_down_pdf
阅读(859) | 评论(0) | 转发(0) |