NextGen (Mirth) Connect 3.9.1 Released!

NextGen (Mirth) Connect 3.9.1 is now available as an appliance update and on our GitHub page. This release contains bug fixes and adds support for eHealth Exchange UDDI providers in the Interoperability plugin. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Carriage return PDF and Text doc formatting

  • Filter
  • Time
  • Show
Clear All
new posts

  • Carriage return PDF and Text doc formatting

    This is a really simple question but I can?t get it to work.

    When creating a pdf or a text file how do you create carriage return in the Template?

    ${x} ${y}

    out put.

    Thank you.

  • #2
    Re: Carriage return PDF and Text doc formatting

    For a text file, just hit enter twice in the template area. If it is coming from javascript, use the string '\n' for a newline.

    For PDF, you can use <br/> to insert new lines. (Or <p></p> for paragraphs)
    Chris Lang


    • #3
      Paste the following into your javascript transform:

      for each (seg in msg..OBX){
      pdfTemplate = pdfTemplate + seg['OBX.5']['OBX.5.1'] + '\n';
      pdfTemplate = pdfTemplate +"<br/>"

      This will generate the requested results


      • #4
        I also wanted to use this, specifically I was using the destination as a file logger. The only solution I found was to generate a transformer which put a channel variable to put in \r\n as so:

        then call this variable at the end of each line in the template like so:

        ${date.get('yyyy-M-d H.m.s')}${nl}