on 04-29-2015 9:26 AM
Hi experts!
I'm working with Interactive Adobe Forms and the form function return the PDF in a XML format (xstring) through the parameter FPFORMOUTPUT-XML.
I need to save the PDF file (binary) without geting it through the "getpdf" parameter FPFORMOUTPUT-PDF.
Because the "getpdf" don't permit to show the user dialog print options.
How could I transform the XML(PDF) returned in binary PDF file?
Thank you all!
Hello Evaristo
You can make use of CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' and CALL METHOD cl_gui_frontend_services=>gui_download to achieve this requirement.
Regards
Sandy
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = ls_params->es_output-s_form_output-xml
IMPORTING
output_length = lv_pdf_len
TABLES
binary_tab = lt_pdf.
lv_file_name = p_xml.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = lv_pdf_len
filename = lv_file_name
filetype = 'BIN'
CHANGING
data_tab = lt_pdf
EXCEPTIONS
OTHERS = 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sandy!
Thank you for your post!
I already try this way but, the problem is, I'll be only converting the XML file to
binary and saving the file. When I try to open the PDF file, its corrupted! Because it's a XML file and not a PDF file.
I need convert the XML to PDF, convert to binary and save the file.
Any suggestions?
Thank you!
BR,
Evaristo.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.