Announcement

Collapse
No announcement yet.

Document Writer / Colors

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

  • Document Writer / Colors

    Has anyone been able to get color to work with the document writer (pdf or rtf)?

    Just an example of some html I'm sending to the connector. Everything looks great except any attributes dealing with color such as "color" or "bgcolor" seem to be ignored. Brendan thinks it may not be supported with iText but I'm curious to see if anyone else has been able to get colors to work with their document.

    Code:
    <font size='14' color='CCCCCC'><strong>Labor and Delivery Summary</strong></font>
    <br /><br />
    <table><tr bgcolor='C0C0C0'>
    <td><em>Last Name</em></td>
    <td><em>First Name</em></td>
    <td><em>Date of Birth</em></td>
    <td><em>MRN</em></td>
    </tr><tr>
    <td><font size='18'>DOE</font></td>
    <td><font size='18'>JANE</font></td>
    <td><font size='18'>xx/xx/xxxx</font></td>
    <td><font size='18'>123456789</font></td>
    </tr></table><br />

  • #2
    Reocument Writer / Colors

    We use color all the time when generating reports. Include a '#' before your color codes:

    #CCCCCC and #C0C0C0

    Let us know if that works.
    Chris Lang

    Comment


    • #3
      Reocument Writer / Colors

      In my actaul code I was using the # with the color codes, sorry for the mistype in my code.

      In HTML, you can normally apply an attribute like "bgcolor" to a table, row or cell.

      Code:
      <table bgcolor='#C0C0C0'>
      or
      <tr bgcolor='#C0C0C0'>
      or
      <td bgcolor='#C0C0C0'>
      I found that the first two examples are ignored by the RTFMaker. Only "color" or "bgcolor" attributes set within the <td> tag seem to work.

      Comment


      • #4
        Reocument Writer / Colors

        Interesting - I think because the TD column definition overrides the TR and TABLE setting (i.e. the HTML parser doesn't assume a transparent Z-ordering of elements). How about font colors?

        We are working on the HTML parser part of the RTF/PDF generation with a new tool that supports CSS. This should be available in the next version.
        Chris Lang

        Comment


        • #5
          Hi

          I'm using Mirth 1.8.0.4126 and I'm unable to specify font size in Document Writer when used to output a pdf file.

          In the associated template, I specify: ... <td><font size="8">blah<br/>blah<br/></font></td> ... and the resulting font size doesn't change from the default.

          Can anyone give me any hints?

          Thanks!

          Comment


          • #6
            Hello.

            Any news about this ?

            I have an inbound html file and I want to convert it in a RTF file but when I use the "Document Writer" to make this, I lost the <style> element of my HTML...

            Is there something I can do to have an identical copy of my HTML in RTF ?

            Thank you.

            Comment


            • #7
              i have been able to minimally customize a table's style in pdf output by using inline css in the template:

              PHP Code:
              <table border="0" width="50%" cellspacing="0">
                  <
              tr>
                      <
              td width="50%" bgcolor="#000000"><span style="color:#FFFFFF;font-family:arial,helvetica,sans-serif;"><b>ItemId</b></span></td>
                      <
              td bgcolor="#000000"><span style="color:#FFFFFF;font-family:arial,helvetica,sans-serif;"><b>ChargeCode</b></span></td>
                  </
              tr>
              ${
              chargeCodeHtml}
              </
              table

              Comment


              • #8
                Ok but this is not possible in my case.
                I receive different inbound html and I have to parse them in a RTF file.
                So the html template is always different...

                Comment

                Working...
                X