‎2018 Sep 03 5:50 AM
Hi,
I am uploading the PDF file data in custom database table in xstring format.
I want to read xstring data and display in PDF format in presentation server/desktop through module pool programming. Here I am not using any smartform/script.
How to convert xstring data to PDF format ?
Regards,
Shabbir
‎2018 Sep 03 7:11 AM
‎2018 Sep 03 6:53 AM
If you're uploading a PDF then the xstring is already in PDF format.
‎2018 Sep 03 7:02 AM
Thanks for the reply.
I have xstring format data in custom database table. I am reading the xstring data and then download using 'GUI_DOWNLOAD' on desktop. The pdf file is not opening, it is showing error " Adobe Reader could not open 'file1.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded ".
Regards,
Shabbir
‎2018 Sep 03 8:33 AM
As I understand it, you are uploading a PDF from somewhere and storing its binary representation in a database table. You are then downloading it, and now it doesn't open.
If that's the case, your data is getting corrupted in your process - the process itself should work, I've done it many times with different types of files. There are three points where corruption might happen.
1. On the upload
2. In the storing of the data in the database
3. On the download
Without further information - for example the relevant source code for each step (use the CODE button in the editor and right-click paste as plain text) - it's not possible to tell you a which point its going wrong..
‎2018 Sep 03 7:11 AM
‎2018 Sep 03 9:05 AM
Hi.
Then you should use SCMS_XSTRING_BINARY to convert raw data in binary format.
To display pdf format, you can use cl_gui_html_viewer, load then show_data method, through a container.
Hope to help.
Bye