2023 Apr 12 11:25 AM
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?
2023 Apr 12 1:38 PM
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.
2023 Apr 12 2:11 PM
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.