on 09-30-2014 12:57 PM
Hi Experts,
We are facing one problem with displaying PDF file from our BSP application. We have one BSP application, it was excuting successfullt, but when we are try to printing that application in PDF format we got below error.
Adobe Reader could not open 'xxxxxxxxxxx.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 attachement and wasn't correctly decoded).
Would you please give any suggestions to close this issue.
Thank you in advance.
Regards,
Jyothi
Hi Jyothi,
do you have Adobe ReaderRights credential installed?
If not than please request it by note 736902 - Adobe Credentials and install it.
Regards,
Hugo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, In my case, I am converting the content to binary format and sending to the browser and it works fine for me. If this is not your case, Let me know exactly what you are trying to do. * Set the file content type in HTTP Response Object runtime->server->response->set_header_field( name = if_http_header_fields=>content_type value = c_mime_type ). * Delete HTTP header attributes that are not required runtime->server->response->delete_header_field( name = if_http_header_fields=>cache_control ). runtime->server->response->delete_header_field( name = if_http_header_fields=>expires ). runtime->server->response->delete_header_field( name = if_http_header_fields=>pragma ). * Set the content disposition as per the mime content runtime->server->response->set_header_field( name = if_http_header_fields=>Content_Disposition value = lw_attachment ). * Set the file data (XSTRING) in HTTP Response Object runtime->server->response->set_data( data = W_XSTR length = LW_LENGTH ). navigation->response_complete( ). "signal that response is comple Thanks, Srini
Depends on your application, whatever you are writing to PDF(content) should be written to http header using the given code with mime type PDF. I am not clear with what content you are trying to write to PDF.
c_mime_type type string value 'application/pdf'.
However you need to get the xstring and write it using my given code.
Go to your controller or class:
In se80:
1. Check the method where the PDF is being rendered.
2. In DO_REQUEST or DO_HANDLE or custom method, the code for rendering PDF would be present.
3. Use correct FMs to get the XSTRING and put my code over there.
Also, explain your requirement so that it would be clear for me.
Hi Srinivas,
Please find the below screen shot.
if user click on the print option , getting the below error.
Adobe Reader could not open 'xxxxxxxxxxx.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 attachement and wasn't correctly decoded).
please let me know if you need any information.
Regards,
Jyothi
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.