Thin lines with cfdocument

Posted on 2010-11-14
Last Modified: 2013-12-24
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,


[0] 172e0811cbec22c24-7c21.html
Question by:alsmersi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 52

Expert Comment

ID: 34131196
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?

Author Comment

ID: 34136205
Hello --
below is an extract of relevant code:

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

Open in new window

Attached screen-shot.
LVL 52

Accepted Solution

_agx_ earned 125 total points
ID: 34137391
(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.
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.


Author Closing Comment

ID: 34148347
I will re-check documentation to verify that's 1px is minimum allowed.
LVL 52

Expert Comment

ID: 34148545
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.  

Expert Comment

ID: 38054423
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">

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math ( While this method is not o…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

730 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