2

I recently had a book printed, where I used fading lines in the header. In the PDF it looks correct, bu in the actual print, the lines on the left pages didn't fade as much as the lines on the right pages, so the lines seems "cut" (apologies for blurred pictures):

incomplete fadings in printed version http://itlars.no/tex/fadings.jpg

The code is, I think, identical, so I can't understand why..? This is how it looks in the PDF:

correct fadings in pdf http://itlars.no/tex/fadings_pdf.jpg

And an MWE:

\documentclass[11pt, titlepage, openany]{book}

\usepackage[textwidth=13cm, left=3cm, bottom=2cm, top=2.5cm, headsep=1.1cm, paperwidth=20cm, paperheight=27cm, layoutwidth=19cm, layoutheight=26cm, layouthoffset=0.5cm, layoutvoffset=0.5cm, showcrop, asymmetric]{geometry}
\usepackage{fancyhdr} 
\usepackage{tikz} 
\usetikzlibrary{fadings}
\usepackage{lipsum} 

% Headers
\definecolor{gray}{cmyk}{0,0,0,0.4}
\definecolor{darkgrey}{cmyk}{0,0,0,0.6}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\fancyhead{} % Remove head fields
\fancyfoot{} % Remove foot fields

\setlength{\headheight}{24pt}
\fancyhead[RO]{\sffamily\bfseries\footnotesize\textcolor{gray}\leftmark\hspace{0.3cm}\sffamily\bfseries\normalsize\textcolor{darkgray}\thepage}
\fancyhead[LE]{\sffamily\bfseries\textcolor{darkgray}\thepage\hspace{0.3cm}\sffamily\bfseries\footnotesize\textcolor{gray}\leftmark}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\renewcommand{\headrule}{%
\vskip-\baselineskip\vskip4pt
\ifodd\count0\hfill\begin{tikzpicture}
    \fill[darkgray,path fading=west] (0,0) rectangle (4.98,0.02);
\end{tikzpicture}\else\begin{tikzpicture}
    \fill[darkgray,path fading=east] (0,0) rectangle (4.98,0.02);
\end{tikzpicture}\fi}

\begin{document}

\chapter{Test chapter}
\lipsum
\lipsum
\lipsum

\end{document}

Any help would be deeply appreciated.

Best Regards Lars

closed as unclear what you're asking by Sebastiano, user156344, Mensch, Circumscribe, Stefan Pinnow Mar 3 at 14:29

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • It looked fine when I printed it. Maybe the problem is in your printer. – John Kormylo Apr 25 '16 at 13:22
  • Sorry, I should have specified that it's the actual book print that is the problem. Regular prints from the PDF are fine. – Lars Nersveen Apr 25 '16 at 17:23