# XeTeX & Overprinting

My printing house asked me to set black overprint feature on for my book which includes a lot of background images. I have no idea what is overprinting and after spending a long time of googling I found this page explains what is overprinting and how to tun it on in Adobe InDesign. Then I found this command in ConTeXt

\setupcolors[rgb=no,cmyk=yes,spot=yes,state=start,overprint=yes]


I don't find the equivalent in Latex. However, I found overprint package but it doesn't work with XeTeX. Here is an example of what my book look like:

\documentclass[10pt,oneside]{book}
%\usepackage[a5paper, margin=1cm]{geometry}
\usepackage{geometry}
\geometry{
a5paper,
total={148mm,210mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
bindingoffset=0mm,
driver=xetex
}

\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage[pages=some,angle=0,opacity=1]{background}
\usepackage{tikzpagenodes}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,hijricorrection=1]{arabic}
\parindent 0pt
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}
\newfontfamily\chapterfont[Script=Arabic,Scale=1.2]{Tarablus}

\begin{document}

\thispagestyle{plain}
\BgThispage
\backgroundsetup{ contents={\includegraphics[width=0.09\paperwidth,height=0.09\paperheight,keepaspectratio]{7}}, position=current page.center}

\vspace*{3cm}
\begin{flushright}
\Large{أهدي هذا الكتاب إلى أفضل أصدقائي ورفيقة دربي زوجتي}
\end{flushright}

\end{document}


The result when I use Overprint Preview in Acrobat Prof looks like this:

I am looking for help in this issue.

• The most expedient thing I've found to do is to just post-process the .pdf and turn over-printing on for text (one can use PitStop scripts to delimit it to only particular sizes and colours). Really though, the printer should be doing this for you --- it's a standard part of pre-press work. – WillAdams Nov 7 '13 at 12:28

Thanks to Zdenek Wagner to help me in this issue. The answer is zwpagelayout package. The background image should be in CMYK, otherwise overprint will not work. Here is his example:

\documentclass[10pt,oneside]{book}
%\usepackage[a5paper, margin=1cm]{geometry}
%\usepackage{geometry}
%\geometry{
%a5paper,
%total={148mm,210mm},
%left=20mm,
%right=20mm,
%top=20mm,
%bottom=20mm,
%bindingoffset=0mm,
%driver=xetex
%}

\usepackage[a5,margins=20mm,footskip=20pt,overprint,cropmarks,color]{zwpagelayout}
% Notes
% Overprint requires cropmarks, this is a limitation of xdvipdfmx (not needed for other
% drivers
% footskip is the place reserved for pagination, without it the crop marks will be wrong

\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{fancyhdr}
%\usepackage{xcolor} % zwpagelayout does not work with xcolor
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,hijricorrection=1]{arabic}
\parindent 0pt
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}
%\newfontfamily\chapterfont[Script=Arabic,Scale=1.2]{Tarablus}

\begin{document}
\SetOverprint % set the overprint for the whole document
\color{cmykblack} % be sure that black is defined in CMYK, not in grayscale

\thispagestyle{plain}
%\BgThispage
%\backgroundsetup{
%contents={\includegraphics[width=0.09\paperwidth,height=0.09\paperheight,keepaspectratio]
%{
%7}}, position=current page.center}
% Be sure thet the background image is in CMYK, otherwise overprint will not work

% Background made in a different way
\vbox to 0mm{\centerline{\includegraphics[width=1.1\linewidth]{8.pdf}}\vss}

% Note: rgb179.tif was converted to  cmyk179.tif using lcms
% and then to cmyk179.pdf
% The exact commands are
% tifficc -n -i AdobeRGB1998.icc -o eucmyk50.icm rgb179.tif cmyk179.tif
% tiff2ps -e cmyk179.tif | epstopdf --filter --outfile=cmyk179.pdf
% The ICC profiles are distributed with various products

\vspace*{3cm}
\begin{flushright}
\Large{أهدي هذا الكتاب إلى أفضل أصدقائي ورفيقة دربي زوجتي}
\end{flushright}

\end{document}


However, there is a limitation in zwpagelayout. It does not support xcolor package right now which mean I can not use background package.