cancel
Showing results for 
Search instead for 
Did you mean: 

Pdf attached to mail is corrupted !

fikretsomay
Participant
0 Kudos

Hi,

I have a problem with pdf document sent as attachment in a mail.

  • I call a adobe forms,
  • SCMS_XSTRING_TO_BINARY is called to convert it binary.
  • With using cl_bcs class I add this attachment, and mail sent.
  • When sost is executed and pdf clicked I got this error :Adobe Reader could not open file.pdf because it is either not a supported file type or because the file has been damaged.

Accepted Solutions (0)

Answers (3)

Answers (3)

Muthu_raja
Active Participant
0 Kudos

When adding attachment using CL_BCS class, Are you passing size of the document ?..

ArthurParisius
Contributor
0 Kudos

Have you checked what the binary string for your PDF looks like? It could be that trailing nulls have been added which might be what is corrupting your file.

Florian
Active Contributor
0 Kudos

Instead of SCMS_XTRING_TO_BINARY I would try

CL_CO_XMLTOOL=>CONV_XML_TO_PDF


fikretsomay
Participant
0 Kudos

Hi,

I am using SCMS_XTRING_TO_BINARY to attach it in a mail, do you have sample code for "CL_CO_XMLTOOL=>CONV_XML_TO_PDF" attaching into mail?

Thank you.