[pdftex] bitmap with clipping path

Stephan Lehmke Stephan.Lehmke at cs.uni-dortmund.de
Thu Apr 4 12:18:40 CEST 2002

Hi all,

I have the following problem:

I'm trying to move a catalogue which is currently made 
by hand in quark to data-based generation using pdftex
as `print engine'.

One problem are product photos. So far, the raw photos are 
augmented with a `clipping path' in photoshop. In quark,
the clipped out parts are underlaid with a special (pantone)
color. No problem with color separation and printing, of

But how to move this process to pdftex?

If I can get my hands on a pdf image combining the bitmap with
the special color, all is well. At least it looks like
crackerjack can separate the colors ok.

But how to get at the pdf?

I know it can be done because Quark at least can save to pdf
including the special color.

But photoshop for instance when saving to pdf seems to replace
the special color by a CMYK approximation.

Unfortunately, assembling every photo in Quark is not an option
for this task.

What I need is this:

In the beginning, there is a photo augmented with a clipping path 
in photoshop.

In the end, there is a document processed by pdftex, containing the
correctly clipped bitmap underlaid with the special color.

Inbetween, there is any kind of (scriptable) process in which 
the photoshop image is made digestible for pdftex...

But how to go about it?

Photoshop can save in different formats, among them eps, but 
it seems neither ghostscript nor distiller can make anything
out of the clipping path contained in the eps...

It is also possible to convert the clipping path into a mask
(color or alpha channel), but how to process this information?

In principle all I need is any kind of (scriptable) process
which takes a masked or clipped bitmap and a colored patch
of the right pantone color and overlays the two, yielding a
correct pdf image.

I see several options, but have no idea which one would be

a) Do it with pdftex.

Seems impossible because AFAIK pdftex supports neither 
clipping paths nor masks.
How much work would it be - compared to other solutions -
to teach it?

b) Do it with ghostscript.

Is there a way in which one could get ghostscript to
respect the clipping path or mask?

c) postprocess photoshop pdf

In principle, the photoshop-produced pdf is ok, only the
pantone color is replaced by a cmyk color (maybe a newer
version of photoshop can do better? or does this depend
on the version of distiller involved in saving to pdf
from photoshop?).
Can one postprocess the pdf, replacing the color?

d) construct pdf directly 

Could one take the masked bitmap and _directly_ construct
a pdf containing the bitmap with appropriate background?

e) use a tool

If I didn't overlook something, the `usual' scriptable tools
like gimp or ImageMagic can't handle additional color channels.

Maybe there is a tool especially for this task?

f) something I didn't think of...

All in all, I'd love most to hear from somebody who has already
had and overcome this particular problem.
It shouldn't be too uncommon for people making `real' printed
documents (I have to confess all this is quite new for me.
Please forgive if I'm sounding rather naive).

If the problem is exotic or noone found a solution yet, could
anyone in the know indicate which way to go?

Any hints or pointers are much appreciated.

regards and many thanks in advance

  Stephan Lehmke     		 Stephan.Lehmke at cs.uni-dortmund.de
  Fachbereich Informatik, LS I	 Tel. +49 231 755 6434 
  Universitaet Dortmund		 FAX 		  6555
  D-44221 Dortmund, Germany             

More information about the pdftex mailing list