[pdftex] Color dependence of included pdf images

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Mon Aug 13 02:58:44 CEST 2001


I got a bugreport by Marcus Eger and report the result
of the examination:

Colors in included pdf images can be dependent on
the current text color, here a minimal test model:

%%% cut %%% stroke.ps %%% cut %%%
%%BoundingBox: 100 100 200 200
100 100 moveto
200 200 lineto
%%% cut %%% stroke.ps %%% cut %%%

%%% cut %%% test.tex %%% cut %%%
Black color


Red color


Workaround with \verb|\textcolor{black}{...}|


End in red
%%% cut %%% test.tex %%% cut %%% test.tex

This could be fixed in pdftex.def by setting the
color explicitly to black. But the disadvantage
would be that then this effect could not be
used as feature.

For example the image can contain some text or
drawings without explicit use of colors. Then
it integrates into the current environment
very well: If the text on the page is black
on white, the image also is black on white.
If \pagecolor is used with current color
white, the image would be draw itself in
white also.

Therefore I think the best is to let pdftex.def
unchanged and use
for pdf images that are generated with
default color black in mind.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

More information about the pdftex mailing list