cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Reader could not open 'xxxxxxxx.pdf' for BSP application in portal 7.0

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

hugo_amo
Employee
Employee
0 Kudos

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

Former Member
0 Kudos

Hi Hugo,

sorry for the delay, how can i check the Adobe ReaderRights credential installed or not in my system?

Please help me.

Regards,

Jyothi

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi srini,

Where can I write the code to convert the binary code ?

I will try your suggestions and please explain in details.

Its really appreciate help and I will give full points.

Regards,

Jyothi

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Srinivas,

I am new to this .would u please explain in steps where can I write ur code in bsp application ?

Regards,

Jyothi

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

If this is a custom application, look into the controller/class for this page and check the print button event code and implement the code there.

If it's standard application, you need to check the config and SAP notes.