views:

44

answers:

1

Hi all,

The actual table is a lot larger than the mock-up one that I am going to show you but this mock-up one does explain the problem. Please go to http://www.monteandjanicechan.com/test_table.cfm

The thickness of the grid lines in the table are coming up the way I want in the HTML version. You can do a View Source to see the actual HTML stuff that gets generated. Now, I put these HTMl codes within the cfdocument tag with format="pdf"; please go to http://www.monteandjanicechan.com/test_table_pdf.cfm. You will see the inconsistent thickness of the grid line for sneezing and for flu. To further illustrate my point, I removed the background colors and generate a PDF; please go to http://www.monteandjanicechan.com/test_table_pdf_nocolor.cfm. The thickness of the grid lines is back to normal.

This leads me to believe that the background color of one cell somehow goes over to the cell right next to it and cover up the border. Here are the strange things:

1) This is ONLY happening in rowspan and ONLY happening from the second row on to the rest of the rowspan. For example, first Sneezing is okay but the border of the second sneezing is not correct; the first Flu is okay but the borders of the second and the third Flu are not correct.

2) The background color does NOT cover the border of its own cell at all; it only cover the border of the cell right next to it.

My question is, how can I fix this issue?

Any suggestions and pointers are greatly appreciated.

+1  A: 

The thickness varies in the HTML version as well. I think the problem is with your CSS rules.

This works how I think you want, although it could probably be improved.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html>
  <head>
    <title>Test Table</title>
    <style type="text/css">
    td { 
        border-top: 1px solid black; 
        border-left: 1px solid black; 
    }
    .right { border-right: 1px solid black; }
    .bottom {border-bottom: 1px solid black; }
    </style>
  </head>
  <body>
<table border="0" cellspacing="0" cellpadding="5">
  <tr>

    <td class="a_style">Name</td>
    <td class="a_style">Problem</td>
    <td class="right">Treatment</td>
  </tr>
  <tr>
    <td class="b_first">Jane Doe</td>
    <td class="c_first" style="background-color:#ffff99">Cough</td>

    <td class="right" style="background-color:#ffff99">Vitamins</td>
  </tr>
  <tr>
    <td class="b">John Doe</td>
    <td class="c" style="background-color:#99FF99">Sneezing</td>
    <td class="right" rowspan="2" style="background-color:#99FF99">Nose Spray</td>
  </tr>

  <tr>
    <td class="b">Joe Schmo</td>
    <td class="" style="background-color:#99FF99">Sneezing</td>
  </tr>
  <tr>
    <td class="b">Joe Six Pack</td>
    <td class="c" style="background-color:#cccccc">Flu</td>

    <td class="right bottom" rowspan="3" style="background-color:#cccccc">Flu Shot</td>
  </tr>
  <tr>
    <td class="b">Joe The Plumber</td>
    <td class="" style="background-color:#cccccc">Flu</td>
  </tr>
  <tr>

    <td class="bottom">Joe Doe</td>
    <td class="bottom" style="background-color:#cccccc">Flu</td>
  </tr>
</table>
</body>
</html>
Jason
No, that's not what I want. Like I wrote, http://www.monteandjanicechan.com/test_table.cfm is exactly how I want the table to look. Certain grids are more bold than the others; this is INTENTIONAL. The more bold grids are there to divide the categories and that's how my customer wants it.
Monte Chan
If you can, put http://www.monteandjanicechan.com/test_table.cfm and http://www.monteandjanicechan.com/test_table_pdf.cfm side by side. For Joe Schmo and John Doe, both have Sneezing as their problems. Look at the Treatment cell for these two rows. The left border of treatment (Nose Spray) only applies to John Doe but not Joe Schmo in the PDF. Likewise, Joe Six Pack, Joe The Plumber, and Joe Doe all have Flu shots as their treatments. However, the left border of Flu shots only applies to Joe Six Pack, but not to Joe The Plumber and Joe Doe. This is the unevenness that I was referring to.
Monte Chan
Ah, I see what you mean. When I zoom in, the coloring is shifted 1 pixel to the right and/or down. That is what is causing the issue, I just don't know how you go about fixing it. Does it do it if the cfdocument format is flashpaper as well? It might just be a bug with the PDF generator.
Jason
I have not tried it in Flashpaper.
Monte Chan
Well, I came up with a "fix". Instead of doing 1px right and 1px right in the border, I changed it to 2px right and no left border. Now, the grid line does show up the way I want it; however, because of the background color "spills over" 1px and overlaps part of the grid line, the horizontal border that touches the grid line appears to be not connected.
Monte Chan