[pdftex] Problem with hlines in pdftex

George N. White III aa056 at chebucto.ns.ca
Thu Jun 24 13:18:45 CEST 2004


On Wed, 23 Jun 2004, Gregory Collins wrote:

> Reinhard Kotucha <reinhard.kotucha at web.de> writes:
>
>>>>>>> "Gregory" == Gregory Collins <greg-keyword-pdftex.630614 at subrosa.ca> writes:
>>
>>    > We've traced the problem to the "colortbl" package; when the
>>    > \rowcolor command is used, the color fill rectangle painted
>>    > (which is white in this case) is painted after the table rules,
>>    > and it's a rounding error THERE which is causing Acrobat to
>>    > paint over the rules. Is anyone familiar enough with the
>>
>> Does the problem disappear if you zoom in?  Are the widths of the rules
>> correct then?  If this is the case, the pdf file is correct.
>
> Hi Reinhard,
>
> You have to zoom in pretty far to get the problem to go away
> completely. Whether the .pdf file is "correct" as-is is a semantic
> quibble, because we have customers who will be reading the reports we
> are generating in Acrobat Reader, and lines appearing and disappearing
> due to rounding errors, no matter what the cause, is unprofessional.

The real problem is that the rules should be drawn later (e.g., on top
of) the the color fill rectangles.  A "solution" is to create the
table twice, first just a "background" with the color fill rectangles and 
then an overlay with the lines and text.

> As a short-term measure we've disabled support for row-colouring in
> our reports, but we would really like to find a workaround since we do
> nice things with colortbl like striping tables, etc.

Color separation tools may be able to generate new PDF's with the color
under the lines.  You could probably do something in PostScript
(e.g., render each page twice, once showing only the color background
and a second time for the foreground) and then generate PDF's from
that.

--
George N. White III  <aa056 at chebucto.ns.ca>
   Head of St. Margarets Bay, Nova Scotia, Canada



More information about the pdftex mailing list