Avatar of alsmersi
alsmersi
 asked on

Thin lines with cfdocument

Hello-
I'm a novice in CF9 world. I need to create a report in pdf with some tables. I've created it with cfdocument tag and css style.

Cfdocument doesn't support all the css styles[0] such as border-collapse and border-style:"thin". My problem is that I can't create a line very thin.

I've tried with css border-width with many units and values but the width doesn't go under 0.1em or 1px so I can't do lines as thin as those produced by ColdFusion Report Builder.

Can anyone tell me how can I create finer lines?


Many thanks for any suggestion,
Bryan

 

[0] http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461 172e0811cbec22c24-7c21.html
Web ServersColdFusion Language

Avatar of undefined
Last Comment
gfbj

8/22/2022 - Mon
_agx_

If you're styling it correctly, the lines should be very thin. But I'm not sure you can go under 1px.  Just to be certain, can you post a code snippet and screen shot of what you're seeing in cfdocument versus Report Builder?
alsmersi

ASKER
Hello --
below is an extract of relevant code:

<cfdocument format="pdf"  pagetype="letter"  fontembed="true">
<style type="text/css" media="print">
td{ 
	width=50%;
}
.tpx td{
	border: solid 1px black;
}
.tem td{
	border: solid 0.1em black;
}
.tmm td{
	border: solid 0.1mm black;
}
</style>
Table created with Cfdocument; <br>(using values smaller than 1px, 0.1em and 0.1mm the result is the same)<br />
<table class="tem">
<tr>
<td> 0.1 em </td>
</tr>
</table>
<br>
<table class="tpx">
<tr>
<td>1 pix </td>
</tr>
</table>
<br>
<table class="tmm">
<tr>
<td> 0.1mm prima riga prima colonna</td>
</tr>
</table>
</cfdocument>

Open in new window


Attached screen-shot.
Bryan
diff-dettaglio.jpg
diff-gn.jpg
ASKER CERTIFIED SOLUTION
_agx_

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
alsmersi

ASKER
I will re-check documentation to verify that's 1px is minimum allowed.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
_agx_

Unfortunately, I've never seen anything specific on border limits (mix/max).  My guess is there's too many css elements to describe the behavior of each one in detail.  But on the off chance you do find something about borders, let us know.  
gfbj

Tables may be 90's tech, but I have found a work-around using the cellspacing attribute in the table tag.  Browsers don't render the lines consistently but in prints of the pdf the lines are present and much thinner:

.tbl {background-color:#000;}
.tbl td,th,caption{background-color:#fff}

<table cellspacing="1" class="tbl" border="0">