# Adobe Reader and xcolor within a table breaks the line render

I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't display the table line properly.

But removing the colouring for the table fixes it. Here is the example that works as expected:

\begin{table}
\caption{Table showing Feature 5's Functional Tests}
\hspace*{-0.5in}
\begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}
\hline
{\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\
\hline
5.1 & Something &  Something & Something &  Success \\
\hline
5.2 & Something &  Something & Something &  Success \\
\hline
5.3 & Something &  Something & Something &  Success \\
\hline
5.4 & Something &  Something & Something &  Success \\
\hline
\end{tabular}
\end{table}


And here is the example with a coloured row:

\begin{table}
\caption{Table showing Feature 5's Functional Tests}
\hspace*{-0.5in}
\begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}
\hline
\rowcolor{gray!25}
{\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\
\hline
5.1 & Something &  Something & Something &  Success \\
\hline
5.2 & Something &  Something & Something &  Success \\
\hline
5.3 & Something &  Something & Something &  Success \\
\hline
5.4 & Something &  Something & Something &  Success \\
\hline
\end{tabular}
\end{table}


Removing the \rowcolor{} command replacing it with \cellcolor{} creates the same view. Any idea how to fix this?

I've tried printing it out of Adobe and the lines print fine, but as this will be read on as a soft copy it's pretty important. Here is a gallery to show the out of of the LaTeX code.

Any idea how to fix this?

-

## 1 Answer

PDF viewers try to "snap" rules to pixel boundaries and this can mean that the coloured panels get pulled over adjacent rules. Try increasing the rule width with

\setlength\arrayrulewidth{0.6pt}


or whatever value works on your screen.

-
By contrast, I've been having problems with the lines not showing up correctly when printed, even though they're at least visible, if slightly fainter, in the PDF viewer (Preview or Reader). Would the same thing be causing that? – Erika Oct 22 '14 at 9:14
@Erika probably. Try adjusting the with of \arrayrulewidth by a fraction just to get it to round the pixel boundaries differently. – David Carlisle Oct 22 '14 at 9:16
I'm not actually getting a difference, even on screen, playing around with \arrayrulewidth. It looks like the colored boxes are actually making the lines paler (and so the printer won't print them) because when I zoom in enough that the pixel overlap isn't so much an issue, they're still very faded out. Confusing! – Erika Oct 31 '14 at 16:25