[texhax] [TexHax] Black/white colour PDF

Pierre MacKay pierre.mackay at comcast.net
Sun May 30 00:50:24 CEST 2010


On 05/29/2010 02:56 PM, Heiko Oberdiek wrote:
> On Thu, May 27, 2010 at 04:57:07PM +0200, Jean-Baptiste Valsamis wrote:
>
>    
>> When I printed my PHD, the printer was supposed to check if the pages
>> contains colour or not. After that, the printer counted 240 pages in coluor
>> and 10 pages in black/white.
>>      
> One question is, what is black for the printer?
> A test file:
>
> \pdfoutput=1
> \catcode`\{=1
> \catcode`\}=2
> \catcode`\#=6
> \count0=1
> \def\test#1{%
>    \shipout\hbox{%
>      \pdfliteral{#1}%
>      \vrule width 10mm height 10mm\relax
>    }%
>    \advance\count0 by 1\relax
> }
> \test{}
> \test{0 g}
> \test{0 0 0 rg}
> \test{0 0 0 1 k}
> \test{1 1 1 0 k}
> \def\test#1{%
>    \shipout\hbox{%
>      \pdfliteral{#1}%
>      \vrule width 40mm height .4pt\relax
>    }%
>    \advance\count0 by 1\relax
> }
> \test{}
> \test{0 G}
> \test{0 0 0 RG}
> \test{0 0 0 1 K}
> \test{1 1 1 0 K}
> \csname @@end\endcsname\end
>
> Run it through pdftex ("pdftex -ini", "pdftex", "pdflatex")
> and check the pages through your printer, which ones are "black/white",
> which are considered "colored"?
>
> Yours sincerely
>    Heiko Oberdiek
>    
I wonder if you need also to make sure that your color mode is CMYK and 
not RGB. It can be hard to specify black in RGB.

Pierre MacKay


More information about the texhax mailing list