-
My destination created a PDF attachment. Can't get this PDF to be sent as the channel response. Tried dozens of things, too many to list here, nothing works. Mirth Connect Server 4.5.0 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
No code, no screenshots. No answer. You post enough here to know better. I'd at least expect a screenshot of your source tab and response selection and how you set $r (or if you are responding from the post processor) with an attachment/attachment ID's (assuming the PDF is an attachment) base64 content assigned to a JSON object - for that matter the expected structure of your response to the caller. |
Beta Was this translation helpful? Give feedback.
-
Any example of returning a PDF from a mirth channel with an HTTP Listener Source Connector would be much appreciated. (In my case the Multi-part always says No. Also do we need this to say Yes and how?) At this point I tried to return the Base64 text as the content, but I also tried to return the attached PDF too. |
Beta Was this translation helpful? Give feedback.
-
I got this to work today. I have the following in a JS response transformer step of the PDF generating destination and then set the source connector return type to binary and application/pdf. I think the final piece that made it work was the ISO-8859-1 parameter. responseMap.put('PDF', getAttachments(false).get(0).getContentString("ISO-8859-1")); |
Beta Was this translation helpful? Give feedback.
I got this to work today. I have the following in a JS response transformer step of the PDF generating destination and then set the source connector return type to binary and application/pdf. I think the final piece that made it work was the ISO-8859-1 parameter.
responseMap.put('PDF', getAttachments(false).get(0).getContentString("ISO-8859-1"));