James Mestack

Forum Replies Created

Viewing 6 replies – 1 through 6 (of 6 total)
  • Author
    Replies
  • in reply to: testing #109642
    James Mestack
    Participant

      testing a post.

      in reply to: HTML to Plain Text Converter #77464
      James Mestack
      Participant

        Unfortunately, I am stuck on a windows box.  Considering this, I was able to obtain lynx for win32, looks like it was compiled back in 99.  But it appears to work if the html is stored in a file and I call it from the command line.

        So this question may be related back to David to find out if he might know of a way to send lynx an html string in an exec call from a tcl script?

        Can I approach it through tcl this way or is there a more efficient way?:

        1) extract html from hl7 message and write to a test.tmp file.

        2) set html_to_txt_variable [exec lynx.exe -dump test.tmp]

        3) delete test.tmp file.

        4) set new_hl7_txt_string [string map

          $html_to_txt_variable]
        in reply to: decode the base 64 pdf file #67813
        James Mestack
        Participant

          Right on! I added the “w+” and “fconfigure” and now receive readable output.  Also, thank you for the code tidbits.

          Being my first time doing this, on the PDF view, I see there is an “X” in the top box, supposedly our logo.  Is that not supposed to be embedded or do we need a seperate file?  Probably need to discuss with vendor?

          See attached new output…

          in reply to: decode the base 64 pdf file #67811
          James Mestack
          Participant

            I included the smat files with the test records received from vendor, you’ll have to take off the “.txt” extension to utilize as I had to rename so I could upload.

            The vendor states it is base-64 from pdf.

            in reply to: decode the base 64 pdf file #67809
            James Mestack
            Participant

              Something appears to be lost in the decode process from base-64 to pdf, can someone determine if I am doing this correctly?

              Win 2003 Server SP2

              CL 5.7 R2

              See attachment for inbound message in .msg file.

              See attachments for what pdf should look like and what it does look like?

              proc code:

              package require base64

              foreach segment $segments {

              if {[cequal [crange $segment 0 2] “OBX”]} {

                 set obx_fields [split $segment $field_delim]

                 set list_size [llength $obx_fields]

                 while { $list_size < 6 } {

              lappend obx_fields “”

              set list_size [llength $obx_fields]

                 }

                 set obx_5_fields [split [lindex $obx_fields 5] $comp_delim]

                 set list_size [llength $obx_5_fields]

                 while { $list_size < 5 } {

              lappend obx_5_fields “”

              set list_size [llength $obx_5_fields]

                 }

                 set pdf_data [base64::decode [lindex $obx_5_fields 4]]

                 break

              }

                 }

                 set PDFFileName [cconcat $HciProcessesDir “/” $myprocessName “/que_pdf_data/CentralLogic_Test.pdf”]

                 if { [catch {set outfile [open $PDFFileName w]} cerr] } {

              puts [cconcat “–> WARNING: Error Creating ” $PDFFileName ” File – ” $cerr “r”]

                 } else {

              puts $outfile $pdf_data

              close $outfile

                 }

              in reply to: Engine not recognizing lost connection #60168
              James Mestack
              Participant

                noticed post from Bill Bertera:  How do I tell or configure my Win 2K3 server to have TCP_KEEPALIVE running?

              Viewing 6 replies – 1 through 6 (of 6 total)