Announcement

Collapse
No announcement yet.

Convert RTF to PDF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Convert RTF to PDF

    I am trying to convert the contents of OBX.5.5 that is a base 64 encoded RTF string to a PDF string to place back in OBX.5.5.

    I found the forum article https://www.mirthcorp.com/community/...ad.php?t=14184 and that told me to do the following steps.

    • Convert RTF to plain text
    • Use Document Writer to create PDF from Text – Store as attachment
    • Include attachment token in OBX.5

    When I try converting to RTF using the function rtfToPlain text my variable is empty.

    My code is below. I have seen many questions on converting RTF to PDF but no real solution. I am on Connect version 3.2.2.7694. Thanks for the help.

    var RTFcontent = '';
    var ToText = '';

    RTFcontent = msg['OBX']['OBX.5']['OBX.5.5'].toString()

    ToText = FileUtil.rtfToPlainText(RTFcontent, null);

  • #2
    Hello:

    I am new to Mirth.... just assessing feasibility to see if this product will do what I am expecting of it.

    I have an HL7 message with an embedded RTF in OBX5 (as denoted by '{\rtf...' - can someone please provide me with a definitive set of steps or even better a Youtube video, etc., to show how I'd go about converting the embedded RTF into a PDF?

    Many, Many thanks!

    va3uv

    Comment

    Working...
    X