cancel
Showing results for 
Search instead for 
Did you mean: 

Send PDF via Mail-Adapter

Former Member
0 Kudos

Hi everybody,

I created a PDF via JAVA-Mapping.

The output looks like that:

<?xml version="1.0" encoding="UTF-8"?><MT_PDF><root><![CDATA[%PDF-1.4%u00E2u00E3u00CFu00D32 0 obj<</Filter/FlateDecode/Length 982>>streamxu0153u00BDWMu008Fu00DB6 u00BDu00FBWu00CCq tYR u201Dtu00CC&u00DB4Eu00BBAvu00BD=u00E5"u00DBu00B4u00A5Vu00A2 Ju00EA u00FEu00B3u00B9u00E4gu00E4u0090u00A1,u00A5u00B68u00DCu00CA-  2$u00CEu00BCu00F7f8Cu2018u00FAu00B8u00B8Y.B	)u2014u00B0u00DC,8\u2039u00D8u00DEu00FCu00F8u201C u00C1au00B9]\u00DDu00E5u00EBu00E2Iu2022
lu201Du0081u00C7u00BAu00C9u00DBCu00D3u00AA  Vu00AA Uu00A9?[u00B3u00D7eu00B3.T
u00AFu00F3Vu00E9u00BCkZu00BCu00D6u00C5u2039u00E5 u2039+u00B0u00FF u00F8 u00BF3*#u0178u00FEu0192* u00EC00000 n 0000002734 00000 n 0000002779 00000 n trailer<</ID [<ca60f9e260ef64a25c246ec3c3ed990c><2d7c208ead758f0d17ca56caeaf47802>]/Root 7 0 R/Size 9/Info 8 0 R>>startxref2901%%EOF]]>

When I just generate the PDF without the <tags> and test the mapping and download the result as *.pdf, the PDF is OK.

But I have to send the PDF via Mailadapter. So I have to wrap the generated PDF into <tags>. It seems, that the adapter has problems with the special characters.

Could you suggest workarounds?

Could MessageTransformBean help? How do I have to use it?

Thanks

Regards Mario

Edited by: Mario Mu00FCller on Oct 5, 2009 1:02 PM

Edited by: Mario Mu00FCller on Oct 5, 2009 1:06 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

solved it.

In the interface-Mapping you do not have to wrap the generated PDF.

Just send it to mail-receiver-adapter.

In the adapter you have to set special parameters.

Regards Mario

former_member200962
Active Contributor
0 Kudos

You can generate pdf out of the required data by using appropriate Content_Type value. Check if the process mentioned in this blog helps you:

/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword

Refer this link for the relevant value of Content_Type value: http://www.iangraham.org/books/html4ed/appb/mimetype.html

For pdf the value will be: application/pdf OR application/x-pdf

Regards,

Abhishek.

former_member204873
Contributor
0 Kudos

hi mario,

How did u created PDF file through JAVA mapping. Where is external library stored?

Thanks,

Mayank

Former Member
0 Kudos

Hi Mayank,

i created with iTEXT. But that is not the problem. I gues it has somthing to do with the encoding.

I will try to set the mail-adapter to BASE64.

Hope that helps.

regards Mario

Former Member
0 Kudos

Hi all,

some more information:

In SXMB_MONI the payload is not displayed. I get an error "contains illegal charcters".

When I dont wrap the PDF into a message-interface, than in SXMB_MONI shows the PDF when doubleclicking on payload.

Regards mario

former_member187339
Active Contributor
0 Kudos

Hi Mario,

Have a look at the blog by michal

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417100%29ID0975923150DB0123415523184199414...

If you have the pdf in your payload you can make it as an attachment using PAyloadSwap bean. Just give a try

Regards

Suraj

VijayKonam
Active Contributor
0 Kudos

Which tags you are talking about? Is your pdf is the payload or an attachment? May be you can look at swapping of payload if you can send the PDF as an attachment.

VJ

Former Member
0 Kudos

HI VJ,

at the moment the PDF is in the payload. But I want to use it as attachment. So I thought:

1.) Convert the the souce-message into a simple-PDF wrapped by just one <tag>. e.g

<xml....><root>myPDFwithLotsOfSpecialCharacters</root>

2) Map the simple-PDF to a mail-structure, where <root> get the attachment.

regards Mario