2012 Apr 09 4:42 AM
Dear ALL,
I have developed a Smartform and then used the FM CONVER_OTF_2_PDF and QCE1_CONVERT. I have got my PDF in TRECORD1 which of SOLISTI1 type standard table.The size of file is 6 MB and I want to ZIP it before sending it to mail. I have searcd SDN and found that it is possible through OO Concept. I have not worked much on that. I came to know that CL_ABAP_ZIP is to be used to achieve that.Please guide on how to use it. I want to zip the file and then send it to mail .
Thanks In Advance,
Regards,
Bharti Jain
Dear ALL,
I have developed a Smartform and then used the FM CONVER_OTF_2_PDF and QCE1_CONVERT. I have got my PDF in TRECORD1 which of SOLISTI1 type standard table.The size of file is 6 MB and I want to ZIP it before sending it to mail. I have searcd SDN and found that it is possible through OO Concept. I have not worked much on that. I came to know that CL_ABAP_ZIP is to be used to achieve that.Please guide on how to use it. I want to zip the file and then send it to mail .
Thanks In Advance,
Regards,
Bharti Jain
2012 Apr 09 5:19 AM
Generally even if you zip the PDP file that attachement would be of still almost same size clsoe to 6mb, so do you still need it..
2012 Apr 09 6:28 AM
Yes,
I need it . I have searched in SDN that by Classes it is possible. I have not worked much on it.
Please guidwe me in this matter.
Regards,
Bharti Jain
2012 Apr 09 6:47 AM
Hi ,
Did u try to change the Conversion Setting with RSTXPDF3 , u can reduce the size of the generating PDF . (more info . just search the term - RSTXPDF3)
Thx ,
Dilum
2012 Apr 09 6:51 AM
Hi , just try to ON parameter COMPR_PAGECONT in RSTXPDF3.
This would reduce your PDF file size.
2012 Apr 09 7:16 AM
HI,
My PDF file is generated from SMARTFORM and send to mail. Now user is complaining about its size. So I want to reduce it through programming and send it to mail.
Regards,
Bharti Jain
2012 Apr 09 10:07 AM
Hi ,
I faced the same problem , just change the settings in RSTXPDF3 (COMPR_PAGECONT).
Thx
Dilum
2012 Apr 09 7:24 AM
hi bharati,
Please check the fallowing link.
*&---------------------------------------------------------------------*
*& Form zipping_pdf_file
*&---------------------------------------------------------------------*
FORM zipping_pdf_file .
"create our zipper object
CREATE OBJECT g_zipper.
"add file to zip
CALL METHOD g_zipper->add
EXPORTING
name = file_name************************heare give smartform name and check**********************
content = content_x.
"save zip
CALL METHOD g_zipper->save
RECEIVING
zip = zip.
ENDFORM. " zipping_pdf_file
*&---------------------------------------------------------------------*
*& Form download_zip_file
*&---------------------------------------------------------------------*
FORM download_zip_file .
"convert to table
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = zip
IMPORTING
output_length = bytecount
TABLES
binary_tab = file_tab.
"Save the file
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bytecount
filename = file_path
filetype = 'BIN'
TABLES
data_tab = file_tab.
ENDFORM. " download_zip_file
Regrds,
Siva rama krishna mohan G.
Message was edited by: siva rama
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |