cancel
Showing results for 
Search instead for 
Did you mean: 

Email attachment with pdf documents are not proper encoded pdf

Former Member
0 Kudos

HI,

We have requirement with sending email with pdf attachment.We have used createEmailAttachmentmodel() method to attach a pdf file with EmailAttachmentModel.Where we used to read the file from byte[] to set into media.We are getting emails with attached pdf files but when we are trying to open the pdf,it shows the pdf is corrupted or not properly encoded.

Please update ,if you have any thoughts. Thanks, Jasapriya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

check this out GenerateEmailWithAttachmentAction.java

This is used to attach return label in email in OMS

Regards, Sid

Former Member
0 Kudos

Even I faced this issue. Please check how are you creating the XSL transformer. Try making the secure processing feature to false.

In the earlier versions (5.x),

the XSL transformer was obtained with secure feature as true, like below. final TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); final Transformer xslTransfromer = factory.newTransformer(transformSource);

But in version 6.3, it has been made to

factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false);