XML To TIF

Clovertech Forums Read Only Archives Cloverleaf General XML To TIF

  • Creator
    Topic
  • #52295
    Sandy McQuay
    Participant

      Red Hat Enterprise Linux Server release 5.3

      Cloverleaf 5.7

      Apache FOP 1.0

      Ghostscript 8.15

      We have an interface that sends base64 encoded XML in OBX-5.4 of an HL7 message (McKesson’s CareEnhance Review Manager).  We need to decode the XML and ultimately convert it to a TIF image for uploading to Meditech 6.04.  

      During development of this interface, we ended up using the base64 package for TCL to decode the XML.  The XML is written to a file where it is processed by Apache FOP 1.0 and converted to PDF (using an XML style sheet).  The resulting PDF is then processed by Ghostscript where it is converted to a TIF image that can be uploaded to Meditech.  All of this is done in a TCL proc.

      This process worked well in TEST.  Once we moved it to our LIVE environment, however, we ran into an issue.  We stop/start our Cloverleaf processes each day during the week.  When the Cloverleaf process is bounced, Apache FOP seems to

    Viewing 1 reply thread
    • Author
      Replies
      • #73716
        David Barr
        Participant

          Looks like FOP depends on have an X server available. I’m not sure if this will help:

          http://xmlgraphics.apache.org/fop/1.0/graphics.html#batik

          See the part about -Djava.awt.headless=true.

          The problem is that your process is being started with the DISPLAY variable set to the terminal where you are starting the process (or where you started the host server if you are starting processes through the GUI). I don’t know how FOP works, but you should try setting the DISPLAY variable to point to an X server that will always be running and that has granted access to clients from your Cloverleaf process.

        • #73717
          Sandy McQuay
          Participant

            Hi David,

            Thanks for taking the time to respond!  I had already read the information regarding the display, but didn’t really “get it.”  Until now!  I guess your explanation was better!  

            The script that bounces the Cloverleaf process is set up in cron, so I can see why it “loses it’s mind” when bounced by the script where the DISPLAY variable is not set, but is just fine when I bounce the process from my laptop where the DISPLAY variable is set.

            I’ll look into getting an Xserver running on our RH Linux server.

            Thanks again!

        Viewing 1 reply thread
        • The forum ‘General’ is closed to new topics and replies.