PDF Problems with Large Files #4718
-
Using Mirth 3.9.1 We are sending PDFs as base64 encoded strings in the Json body of an HTTP message to Mirth. For testing, we forward these to a channel that writes them out as files using a file writer destination. This file writer destination has a transformer that decodes the PDF contents and puts that value in a 'fileContent' channel map item (along with a 'fileName'). You can see in the image below how the 'fileContent' and 'fileName' items are used.
The code above is hit when we are sending in a large "combined" PDF versus sending in the PDFs individually. When we are dealing with the smaller "individual" PDFs, this is working just fine. However, for the "combined" case the PDFs are corrupt/incomplete. I suspect this is due some some kind of size limitation? I took one of the "combined" base64 strings and decoded it myself, and it is valid. Any thoughts/suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Kelly, this is Paul C from T, your former co-worker. I am also "pacmano" over at the mirth forums. I would probably use the attachment handler capability in Mirth for PDFs. see this article: https://forums.mirthproject.io/articles/175046-using-attachments This functionality effectively lets you link to that attachment rather than have the large blob traverse your destinations. You should define "large" though, since in some work I do we regularly consume rather large CDAs and mirth handles that just fine, including normalized representations of the CDA. |
Beta Was this translation helpful? Give feedback.
-
@pacmano1 Sorry for the late reply...got diverted onto other issues for a while. I will try this out and let you know how it goes. Kelly |
Beta Was this translation helpful? Give feedback.
-
Using attachments to reduce storage use was mentioned by OP at #4729 |
Beta Was this translation helpful? Give feedback.
Kelly, this is Paul C from T, your former co-worker. I am also "pacmano" over at the mirth forums.
I would probably use the attachment handler capability in Mirth for PDFs. see this article: https://forums.mirthproject.io/articles/175046-using-attachments
This functionality effectively lets you link to that attachment rather than have the large blob traverse your destinations.
You should define "large" though, since in some work I do we regularly consume rather large CDAs and mirth handles that just fine, including normalized representations of the CDA.