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: 

PDF file corrupted after zipped

0 Kudos
349

I have two sample PDF files - one is a SAP Smart Forms PDF and the other is an Adobe forms PDF. Both are normal PDFs, but they are generated differently in separate report programs. I have noticed that SAP Smart Forms PDFs do not have any issues when zipped, whereas Adobe forms PDFs become corrupted when zipped.

After extracting the zip, I can open the SAP Smart Forms PDF without any issues, but the Adobe forms PDF becomes corrupted. I am using the standard SAP class to zip the files (cl_abap_zip). Are there any other encoding methods that I should be aware of when zipping the Adobe forms PDF file?

2 REPLIES 2

Tomas_Buryanek
Active Contributor
275

Double check if/how do you work with the "binary file size".

This is common mistake when working with the files in ABAP.

Xstring file has xstrlen( lv_xstring ) which you need to use when downloading file to frontend.

-- Tomas --

0 Kudos
275

izzatz And so, nothing related to cl_abap_zip (it's very simple class, no surprise), nor zip file (the issue could be with an Excel file and so on). It's about the way you store the file.

If it happens to zipping Adobe Form but not Smart Form, it's just kind of hazard.