Application Development 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: 

How to ZIP a PDF File with a Password Protection

Former Member
0 Kudos

Hi,

i've a pdf file with created smartforms and i want to assign a password to that pdf file but the SAP doesn't let doing that protection. So i want to create a zip file with a password protection for PDF file.

How can i create a zip file with a password protection? Can somebody help me please?

Thanks.

6 REPLIES 6

Former Member
0 Kudos

Hello,

Check this links

Take a look to the class CL_ABAP_GZIP

  • open (top-)zip-archive

CALL METHOD lo_zip->load

EXPORTING

zip = lv_zip_file_head

EXCEPTIONS

zip_parse_error = 1

OTHERS = 2.

...

  • create sub-zip-archives which contain the files you would assign to a folder

...

  • add sub-zip-archive to top-zip-archive

CALL METHOD lo_zip->add

EXPORTING

name = lv_zip_filename

content = lv_zip_file.

  • save zip-archive

CALL METHOD lo_zip->save

RECEIVING

zip = ev_zip_file.

Former Member
0 Kudos

Hi ,

Please go through this links ..,

https://www.sdn.sap.com/irj/scn/advancedsearch?query=passwordprotectedpdf&cat=sdn_all

Regards,

Rajasekhar.

Former Member
0 Kudos

Thanks for your posts,

i've created zip file but i couldn't set a password to this zip file. there is not any attribute or method in CL_ABAP_ZIP.

How can i set a password to a zip file? Does anybody have an idea to set a password to a zip file in sap?

Thanks again.

Former Member
0 Kudos

Does anybody know?

Please help me!

Former Member
0 Kudos

Hi,

Just try searching (encr) in SE37 and you will find a lot of FM's that set password.

There you can see the FM that suits ur need.

use the link below

http://sap.ittoolbox.com/groups/technical-functional/sap-dev/classes-or-function-modules-or-how-to-e...

Hope it helps

Regards,

Manish

Edited by: MANISH GUPTA on May 22, 2009 10:32 AM

0 Kudos

Thank you Manish,

is there any function module in searched list with (encr) to set password a zip file? i couldn't find like this.

Thanks again.