Hi,
Lately there was a thread of converting BASE 64 TO PDF .
I was intrigued so I decided to do some tests (We might get any kind of data this way) .
Using Java I generated a Base64 text file (this will be used as input ) .
This is how the output file looks like (1,060,588 byte long string)
Time for some abap code:
Program steps ( Y_R_EITAN_TEST_31_10 ) :
- Using cl_gui_frontend_services=>gui_upload to upload the text file.
- Using cl_http_utility=>if_http_utility~decode_x_base64 to decode the data the output from this method is xstring .
- CALL METHOD cl_gui_frontend_services=>gui_download to write the xstring as PDF .
I have new valid PDF file named "An Easy Reference for ALV Grid Control.new.pdf" .
Comparing the files using MD5 tell me that the files are not identical !!!!
So I used a binary editor to compare:
There is some extra bytes in the new file .
This does not interfere in this case but might cause a problem with other file formats and it is annoying...(Any idea ???? )
This all for now.
regards.