RTF to Plain Text Conversion Question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf RTF to Plain Text Conversion Question

  • Creator
    Topic
  • #54539
    Theresa Schenck
    Participant

      I have an interface that has mulitple OBX 5 segments.  One OBX 5 segment will contain plain text data while another OBX 5 segment will contain RTF data.  The client this interface goes to cannot handle the RTF data.  Has anyone written an interface that converts the RTF to plain text?

      Thanks,

      Theresa

    Viewing 5 reply threads
    • Author
      Replies
      • #81902
        James Cobane
        Participant

          Theresa,

          Is the plain text data in the one OBX the same as the textual content of the RTF portion in the other OBX?  I have not done any RTF to plain text conversion, but we have an Anatomic Pathology interface that sends both plain text and embedded PDF, with the plain text data being the textual content of the embedded PDF.  For the systems that want this data, but can’t handle the PDF, we simply send them the plain text version of the result.

          Jim Cobane

          Henry Ford Health

        • #81903
          Theresa Schenck
          Participant

            Jim,

              No the data in one OBX 5 is different than the data in the other OBX 5.

            Thanks,

            Theresa

          • #81904
            Steve Williams
            Participant

              Theresa,

                Unfortunately, there are no good solutions for the RTF to text, especially in Cloverleaf (or any other streaming application).

              The brute force solution is to use a script to write the RTF to a file and have MS Word convert it to Plain Text and then load the resulting file back into your script. Of course, if you are not on a Windows box, this becomes an impossible task, given time and money.

              I’ve looked at other solutions over the years and nothing else has been able to handle my criteria in this matter (export RIS reports in RTF to Text), regardless of cost. The real problem is RTF formatting is a real bear and has many layers that need to be decoded properly to get to the underlying text. As MS Word can be called from a windows script, it can handle the task. But even then, I’ve managed to find other solutions to the problem.

              A better solution is to look to the vendor using RTF and see if they can work the decoding on their end. That has been the most cost effective solution I’ve found for my RIS reports.

            • #81905
              Theresa Schenck
              Participant

                We are unix based so it sounds like your solution will not work for me.

                Thank you,

                Theresa Schenck

              • #81906
                Steve Williams
                Participant

                  Since you are on unix, check out the Ted word processor for Unix. It may be helpful.

                • #81907
                  Theresa Schenck
                  Participant

                    Will do.

                    Thank you,

                    Theresa

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.