Solved

Thin lines with cfdocument

Posted on 2010-11-14
6
2,042 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:alsmersi
  • 3
  • 2
6 Comments
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
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?
0
 

Author Comment

by:alsmersi
Comment Utility
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
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 125 total points
Comment Utility
(no points ...)

I see what you mean.  That code looks ok.  In my experience, that is the thinnest border I've been able to create with cfdocument.  I can' t point to documentation on it, but I suspect that's the minimum allowed.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Closing Comment

by:alsmersi
Comment Utility
I will re-check documentation to verify that's 1px is minimum allowed.
0
 
LVL 52

Expert Comment

by:_agx_
Comment Utility
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.  
0
 

Expert Comment

by:gfbj
Comment Utility
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">
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now