参考标准程序RSPO_TEST_MERGE_PDF_FILES
*--合并PDF
data: pdf_merger type ref to cl_rspo_pdf_merge.
data: ex type ref to cx_rspo_pdf_merge, lv_ex_txt type string.
data: rc type i value 0. data: docindex type i value 0, errordoc type xstring.
try.
create object pdf_merger.
catch cx_rspo_pdf_merge into ex.
lv_ex_txt = ex->get_text( ).
write: / lv_ex_txt color col_negative.
rc = 1.
return.
endtry.
PDF_MERGER->ADD_DOCUMENT( 文件流 ).
PDF_MERGER->ADD_DOCUMENT( 文件流 ).
PDF_MERGER->MERGE_DOCUMENTS( IMPORTING MERGED_DOCUMENT = MERGED_DOCUMENT RC = RC ).
IF RC <> 0.
PDF_MERGER->GET_ERR_DOC_INDEX( IMPORTING INDEX = DOCINDEX ).
PDF_MERGER->GET_DOCUMENT( EXPORTING INDEX = DOCINDEX IMPORTING DOCUMENT = ERRORDOC ).
ENDIF. CLEAR PDF_MERGER.

*--下载PDF

perform put_merged_file using merged_document.

form put_merged_file using merged_document type xstring. data: bin_tab type standard table of tabl1024.
data: lo_gui type ref to cl_gui_frontend_services.
data: path type string, fullpath type string.
data: length type i.
data: filter type string, uact type i, name type string.
DATA:cmd(2000) type c. create object lo_gui. call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = merged_document
importing
output_length = length
tables
binary_tab = bin_tab. call method lo_gui->file_save_dialog
exporting
default_extension = 'pdf'
default_file_name = 'merged.pdf'
file_filter = filter
changing
filename = name
path = path
fullpath = fullpath
user_action = uact.
if uact = lo_gui->action_cancel.
exit.
endif.
lo_gui->gui_download( exporting
filename = fullpath
filetype = 'BIN'
bin_filesize = length
changing
data_tab = bin_tab ).

SPAN { font-family: "Courier New"; font-size: 10pt; color: rgba(0, 0, 0, 1); background: rgba(255, 255, 255, 1) }
.L0S31 { font-style: italic; color: rgba(128, 128, 128, 1) }
.L0S52 { color: rgba(0, 0, 255, 1) }
.L0S55 { color: rgba(128, 0, 128, 1) }

最新文章

  1. LeetCode---Binary Search
  2. Python: 无参数的函数装饰器
  3. 最完整的合并相交集合的Java代码(查并集)
  4. linq的一些用法总结
  5. 基于Mesos运行Spark
  6. contentHorizontalAlignment 属性浅析
  7. sublime text2的插件熟悉
  8. NemaStudio船舶模拟软件下载及破解
  9. WC2016自测
  10. OAF开发概念和案例总结(项目总结)
  11. linux 按行分割文件
  12. js 解析url
  13. Finance财务软件(引入业务系统凭证专题)
  14. 滑雪(dp)
  15. 性能监控扩展篇(grafana + influxdb + telegraf)
  16. 01 Linux简介
  17. java非常好用的读取文件的流的代码
  18. Scrapy-从数据库取出IP并判断是否可用
  19. struts配置中的常量定义
  20. 【CodeForces】870 F. Paths

热门文章

  1. 软件开发架构、构架趋势、OSI七层协议
  2. 【转载】SQL SERVER 表变量与临时表的优缺点
  3. 使用Git提交代码
  4. 用Java写一个分布式缓存——缓存淘汰算法
  5. 将IoTdb注册为Windows服务
  6. 动力节点—day06
  7. 都用过@Autowired,但你知道它是怎么实现的吗
  8. 行为型模式 - 访问者模式Visitor
  9. Unity模块嵌入到Android中
  10. wixtoolset visualstudio 2017打包流程(1)