General ⇒ Difference in how PDF renders in different readers
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Difference in how PDF renders in different readers
Here I was all happy that I'd gotten a handle on how to set up LaTeX to render my work correctly. I develop in Ubuntu/Gnome and generally use the default Document Viewer to check my PDFs. Everything was looking so good, that I forgot that the majority of the world uses Adobe Reader on Windows.
My boss asked for an updated PDF on one of our manuals. He looked at it on my computer and thought it looked great, but after I sent him a copy, he opened it in Adobe and the tables looked terrible. I looked at the source and can't see what the issue is, so I'm throwing myself on the mercy of the board and asking for help.
Since the preamble is quite lengthy, I'm attaching the minimal working example as a txt file. I'm also attaching screen captures of how the sample table renders in both Document Viewer and Adobe Reader. The main issue is that some of the horizontal and vertical lines that make up the rows and columns are missing. Also, in Adobe, some of the font looks compressed.
Frankly, I need it to look great in Adobe and it it looks like krud in any other PDF viewer, so be it.
Also, you'll notice the trademark in the upper left of the document. I've successfully created header and footer info for the doc (you obviously can't see the footer in the screen captures), but I need to extend the margins of the header and footer to match the width of the page. In my examples, the trademark doesn't extend as far to the right as the right edge of the table, and my boss wants it to extend that far. The minimal working example includes the code for the header and footer, so you can see what I've got.
Thanks in advance for your responses.
-Trip
My boss asked for an updated PDF on one of our manuals. He looked at it on my computer and thought it looked great, but after I sent him a copy, he opened it in Adobe and the tables looked terrible. I looked at the source and can't see what the issue is, so I'm throwing myself on the mercy of the board and asking for help.
Since the preamble is quite lengthy, I'm attaching the minimal working example as a txt file. I'm also attaching screen captures of how the sample table renders in both Document Viewer and Adobe Reader. The main issue is that some of the horizontal and vertical lines that make up the rows and columns are missing. Also, in Adobe, some of the font looks compressed.
Frankly, I need it to look great in Adobe and it it looks like krud in any other PDF viewer, so be it.
Also, you'll notice the trademark in the upper left of the document. I've successfully created header and footer info for the doc (you obviously can't see the footer in the screen captures), but I need to extend the margins of the header and footer to match the width of the page. In my examples, the trademark doesn't extend as far to the right as the right edge of the table, and my boss wants it to extend that far. The minimal working example includes the code for the header and footer, so you can see what I've got.
Thanks in advance for your responses.
-Trip
- Attachments
-
- doc_view.png (16.66 KiB) Viewed 11880 times
-
- adobe_read.png (8.9 KiB) Viewed 11881 times
-
- test_guide.txt
- (2.93 KiB) Downloaded 413 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Difference in how PDF renders in different readers
Hi Trip,
Stefan
I think that's just an Adobe Reader issue. Zoom in, a higher magnification (1200%, or more ...) should show the lines. Or are they still missing then?tripwire45 wrote:The main issue is that some of the horizontal and vertical lines that make up the rows and columns are missing.
Stefan
LaTeX.org admin
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Re: Difference in how PDF renders in different readers
Hi, Stefan. Nope, they're still missing. It has something to do with the \rowcolor tag that allows me to color every other row. When I comment it out, the lines reappear. This is something of a pain, since my supervisor likes the way the tables are formatted in terms of "look and feel", so I can't simply remove the color from the tables and call it good.
I've tried Googling this problem, but either no one else has it, or I'm using the wrong search string to find out what the issue is. Using Adobe Reader 8 if that makes a difference.
I've tried Googling this problem, but either no one else has it, or I'm using the wrong search string to find out what the issue is. Using Adobe Reader 8 if that makes a difference.
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Re: Difference in how PDF renders in different readers
Actually, it's worse. The "bad" example I have posted above is rendered in xpdf. I downloaded and installed the actual Adobe Reader 9 .deb package on my Ubuntu machine and am posting the following screen capture of what my test table looks like, bad lines, messed up text and all.
I found one thread in Google groups that seemed to suggest that the xcolor package has an effect on table line thickness. Even in Document Viewer, if you look closely enough, you can see that some of the table line colors are slightly "off" from some of the other lines, but it's hardly noticeable. Unfortunately in Acrobat Reader, the differences are huge and in fact, some lines just don't render at all.
Here's the link to the Google groups resource I found:
http://groups.google.nl/group/comp.text ... 011f66a29a
Given that most of the world uses Reader, I can only imagine that someone has encountered this difficulty before. Still proceeding hopefully.
-Trip
I found one thread in Google groups that seemed to suggest that the xcolor package has an effect on table line thickness. Even in Document Viewer, if you look closely enough, you can see that some of the table line colors are slightly "off" from some of the other lines, but it's hardly noticeable. Unfortunately in Acrobat Reader, the differences are huge and in fact, some lines just don't render at all.
Here's the link to the Google groups resource I found:
http://groups.google.nl/group/comp.text ... 011f66a29a
Given that most of the world uses Reader, I can only imagine that someone has encountered this difficulty before. Still proceeding hopefully.
-Trip
- Attachments
-
- acroread.png (12.99 KiB) Viewed 11844 times
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Difference in how PDF renders in different readers
Hi Trip,
as mentioned in my posting above, here are two screenshots of the Adobe Reader at different magnification: Did you test the print? Or ist only the presentation of the Adobe Reader important?
Stefan
as mentioned in my posting above, here are two screenshots of the Adobe Reader at different magnification: Did you test the print? Or ist only the presentation of the Adobe Reader important?
Stefan
LaTeX.org admin
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Re: Difference in how PDF renders in different readers
Wow, Stefan. That's huge. I'm not sure I can convince all of our customers to set the view on our PDFs to that magnification.
Actually, I had it up to 800% and *still* didn't see the lines. Also, as you'll notice the "S" in "Test" seems distorted compared to the rest of the letters.
I've printed the PDFs before and they print fine. However, since about 99% of the world views PDFs in Adobe Reader, we really need it to render correctly in Adobe. Any ideas on what I could do to get these tables to look presentable at "normal" view sizes?

I've printed the PDFs before and they print fine. However, since about 99% of the world views PDFs in Adobe Reader, we really need it to render correctly in Adobe. Any ideas on what I could do to get these tables to look presentable at "normal" view sizes?
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Difference in how PDF renders in different readers
I think I've discovered a work around. This issue has to do with the thickness of the lines that make up the tabular environment. The xcolor package and the \rowcolor tag have the unfortunate result of slightly "spilling over" the row color onto some of the lines that make up the table. As you said Stefan, the lines are still there and at sufficient magnification, they become visible. At about 200% to 300%, you can see the lines and you can tell that there is a difference in apparent thickness. I say "apparent" because at about 400% and above, the lines seem to all be the same thickness.
At first, I thought to "force" all of the lines in the array to be black, but that didn't work (bad idea, but I'd stumbled across something about it in the xcolor official documentation). Then, I found a resource online that described how to control the thickness of the array lines. Here's the link (gotta love Goggle):
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=rulethk
Here's the source code for the table (the full minimal working example is posted as an attachment at my original post in this thread) with the added line in bold:
\begingroup
\centering
\setlength\extrarowheight{4pt}
\setlength{\arrayrulewidth}{1.5pt}
\begin{tabular}{ |>{\small}p{2cm} |>{\small}p{2cm} |>{\small}p{1cm} |>{\small}p{7cm} | } \hline
\rowcolor{olivegreen}\textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} \\ \hline
\textbf{TEST} & T & 00 & Test \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & T & 00 & T = Test \\
\rowcolor{olivegreen!25} & & & T = Test \\
\rowcolor{olivegreen!25} & & & T = Test3 \\ \hline
\textbf{TEST} & T & 00 & Test3.5 \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & T & 00 & Test4 \\ \hline
\textbf{TEST} & T & 00 & Test4.5 \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & & 00 & Test5 \\ \hline
\textbf{TEST} & & 00 & Test \\
\hline
\end{tabular}
\endgroup
The code in the bolded line sets all the lines (vertical and horizontal) to a thickness of 1.5 pts. I tried different thicknesses and this seems to be optimal; making the lines thick enough to view at "normal" viewing sizes but not too thick that they overwhelm the table.
It's not a perfect solution, but it may do for now (having to modify all of the tables in all of my documents...oy vey). I'm stil hoping there's a package I can add to the preamble that will optimize how PDFs render in Adobe Reader, but I haven't found it yet. I'm also posting two screen captures, one at 125% mag and one at 400% mag of my test table, both displayed in Reader, to show how the line thickness looks in those different views.
This would be fun if my "arse" weren't on the line.
At first, I thought to "force" all of the lines in the array to be black, but that didn't work (bad idea, but I'd stumbled across something about it in the xcolor official documentation). Then, I found a resource online that described how to control the thickness of the array lines. Here's the link (gotta love Goggle):
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=rulethk
Here's the source code for the table (the full minimal working example is posted as an attachment at my original post in this thread) with the added line in bold:
\begingroup
\centering
\setlength\extrarowheight{4pt}
\setlength{\arrayrulewidth}{1.5pt}
\begin{tabular}{ |>{\small}p{2cm} |>{\small}p{2cm} |>{\small}p{1cm} |>{\small}p{7cm} | } \hline
\rowcolor{olivegreen}\textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} & \textcolor{white}{\bfseries Test} \\ \hline
\textbf{TEST} & T & 00 & Test \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & T & 00 & T = Test \\
\rowcolor{olivegreen!25} & & & T = Test \\
\rowcolor{olivegreen!25} & & & T = Test3 \\ \hline
\textbf{TEST} & T & 00 & Test3.5 \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & T & 00 & Test4 \\ \hline
\textbf{TEST} & T & 00 & Test4.5 \\ \hline
\rowcolor{olivegreen!25} \textbf{TEST} & & 00 & Test5 \\ \hline
\textbf{TEST} & & 00 & Test \\
\hline
\end{tabular}
\endgroup
The code in the bolded line sets all the lines (vertical and horizontal) to a thickness of 1.5 pts. I tried different thicknesses and this seems to be optimal; making the lines thick enough to view at "normal" viewing sizes but not too thick that they overwhelm the table.
It's not a perfect solution, but it may do for now (having to modify all of the tables in all of my documents...oy vey). I'm stil hoping there's a package I can add to the preamble that will optimize how PDFs render in Adobe Reader, but I haven't found it yet. I'm also posting two screen captures, one at 125% mag and one at 400% mag of my test table, both displayed in Reader, to show how the line thickness looks in those different views.
This would be fun if my "arse" weren't on the line.
- Attachments
-
- test400.png (8.43 KiB) Viewed 11809 times
-
- test125.png (8.53 KiB) Viewed 11814 times
- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Difference in how PDF renders in different readers
Sigh.
It gets worse, again.
I noticed one of the tables was shaded a much brighter green than the others, even though the color settings were exactly the same. It was the only table with a graphic included using the \includegraphics tag:
I took the graphic out and the table reverted to its usual and predicted color.
I opened another PDF that includes just a huge number of tables and graphics and came across the same problem...but intermittently. Some pages with both graphics and tables together looked fine while others, shoved the green to a much brighter shade *and* rendered the graphics much more blue than they should be.
All this is happening in Adobe Reader, of course. In the gnome Document Viewer, the colors are as they should be.
My guess is that all this has something to do with the xcolor package, but I'm still having trouble pinning the problem (and the solution) down. I'm beginning to have "issues" with the folks at Adobe just now.
It gets worse, again.
I noticed one of the tables was shaded a much brighter green than the others, even though the color settings were exactly the same. It was the only table with a graphic included using the \includegraphics tag:
Code: Select all
\begin{center}
\includegraphics[width=0.39\textwidth]{img/problem_graphic.png}
\end{center}
I opened another PDF that includes just a huge number of tables and graphics and came across the same problem...but intermittently. Some pages with both graphics and tables together looked fine while others, shoved the green to a much brighter shade *and* rendered the graphics much more blue than they should be.
All this is happening in Adobe Reader, of course. In the gnome Document Viewer, the colors are as they should be.
My guess is that all this has something to do with the xcolor package, but I'm still having trouble pinning the problem (and the solution) down. I'm beginning to have "issues" with the folks at Adobe just now.

- tripwire45
- Posts: 129
- Joined: Thu Apr 10, 2008 4:35 am
Re: Difference in how PDF renders in different readers
While I'm working on the other issues, I thought I'd restate the problem I'm having with certain letters appearing "smashed" or "stretched" in tables. Fonts seem to render fine in my PDFs when opened in Acrobat, except those in tables. I'm attaching a screen capture with certain letters underlines in red that are the "problem" letters. While I can "fix" the lines in tables by making them a bit thicker, I'm not sure what I can do about this other issue.
Of course, If I could convince people to read the PDF at 300% mag, the problem would correct itself.
Of course, If I could convince people to read the PDF at 300% mag, the problem would correct itself.

- Attachments
-
- kcf.png (9.74 KiB) Viewed 11800 times
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Difference in how PDF renders in different readers
Hi Trip,
try this attachment with the Adobe Reader. But I really don't like the workaround I made ...
Stefan
try this attachment with the Adobe Reader. But I really don't like the workaround I made ...

Stefan
- Attachments
-
- test_guide.pdf
- (94.72 KiB) Downloaded 486 times
LaTeX.org admin