[cups.general] eps printing broken

Kurt Pfeifle kpfeifle at danka.de
Tue Jun 27 09:28:24 PDT 2006


David Bishop <dbishop at micron.com> wrote (Tuesday 27 June 2006 16:53):


First off, please note that Foomatic is a third party addon to CUPS. 
It is not created by CUPS.org, but by Linuxprinting.org, and is only 
supported by Linuxprinting.org.

Second, it would be interesting to see the type of EPS files you are
using, and what program produced them.

That said, I'll try to answer your questions...

> Ideally, I would like to
> be able to have users send eps files via lp, without anything else needed on
> their part.  I assumed (incorrectly?) that cups would do any filtering
> necessary without further tweaking.  If that is *not* the case, then how
> would I go about adding something that says 'if incoming file is eps, run
> ps2ps on it'?

Look at "man mime.types" and "mime.convs".

You can also create your separate "eps.types" and "eps.convs" files 
to innoculate them from being overwritten by upgrades.

In general,
  -- in the .types file you define the rule(s) how to recognize an EPS
     file,
  -- in the .convs file you define the filter that should be applied to
     the EPS file.

You'll see that your mime.types contains a rule to recognize EPS files
as "application/postscript" and that mime.convs will direct this mime
type to go through the CUPS "pstops" filter which in turn then emits 
"application/vnd.cups-postscript".

IIRC, you had stated you print with foomatic-rip?

Your printer's Foomatic PPD should contain a line like

   *cupsFilter:  "application/vnd.cups-postscript 0 foomatic-rip"

which says that the pstops result will then go to the foomatic-rip 
filter.

So it *seems* that "ps2ps" succeeds where "pstops" fails. My suspicion
is that your EPS files are not really EPS spec compliant.

What you could do:

 a) define a rule that recognizes your b0rken EPS files in a
    "my_eps.types" file as "application/vnd.my-eps"
 b) use your "ps2ps" as the filter, that handles your new mime
    type and produces "application/postscript", defined in 
    "my_eps.convs"
 c) to succeed in using ps2ps as a cups filter, you need to 
    use a wrapper script "ps2ps.sh" that calls the real "ps2ps"
    and that conforms to the expected behaviour of CUPS filters
    (see "man filter").

I can't tell for sure what the content for your my_eps.types file 
should be without knowing more about your EPS files.

Your "my_eps.convs" would look like this:

  application/vnd.my-eps application/postscript  0  ps2ps.sh

This would effectivly construct a filtering chain of

  EPS=application/vnd.my-eps -->                 # my_eps.types
  --> (ps2ps.sh) --> application/postscript -->
  --> (pstops) --> application/vnd.cups-postscript -->
  --> (foomatic-rip) --> printer

instead of your current one

  EPS=application/postscript -->                 # mime.types
  --> (pstops) --> application/vnd.cups-postscript -->
  --> (foomatic-rip) --> printer

But your problem may be much simpler... just let us see the EPS
files that fail to print...

Cheers,
Kurt






More information about the cups mailing list