Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PDF File ZIP

Former Member
0 Likes
1,315

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,232

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..

Read only

0 Likes
1,232

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

Read only

0 Likes
1,232

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

Read only

0 Likes
1,232

Hi , just try to ON parameter COMPR_PAGECONT in RSTXPDF3.

This would reduce your PDF file size.

Read only

0 Likes
1,232

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

Read only

0 Likes
1,232

Hi ,

I faced the same problem , just change the settings in RSTXPDF3 (COMPR_PAGECONT).

Thx

Dilum

Read only

Former Member
0 Likes
1,232

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