filters problem?
Kurt Pfeifle
kpfeifle at danka.de
Sat Jul 8 04:08:22 PDT 2006
Marco <marco.esposito at roma1.infn.it> wrote (Friday 07 July 2006 17:56):
> Hi, i have a problem with my cups server... :P
>
> My print server considers this file a text:
>
>
> initgraphics
If you insert as first line this
%!
it will for sure be considered a PostScript file by your CUPS server.
> 0.072 0.072 scale %units are mils
> 0 rotate
> 250 1500 translate
> /vsml /Helvetica findfont 97 scalefont def
> /smal /Helvetica findfont 139 scalefont def
> /larg /Helvetica findfont 194 scalefont def
> /vlrg /Helvetica findfont 250 scalefont def
> 1
> 9 setlinewidth
> 3590 2763 moveto
> 3574 2758 lineto
> 3564 2748 lineto
> 3559 2738 lineto
> 3554 2717 lineto
> 3554 2702 lineto
> 3559 2681 lineto
> 3564 2671 lineto
> 3574 2661 lineto
>
> .....
>
>
> 6540 3420 lineto
> 6499 3461 lineto
> 6458 3420 lineto
> 6499 3379 lineto
> stroke
> copypage
> erasepage
>
>
>
> The file name is top.ps (note extension).
Yes, usually the ".ps" extension should suffice to let it be
acknowledged as a PS file in CUPS...
> If i open this file with ghostview i see a simple graphic, but if i print it go out only postscript
> code!
>
> Filters problem?
No, an auto-typing problem!
> my mime.types
>
>
> #
> # "$Id: mime.types,v 1.30 2004/09/23 14:30:19 mike Exp $"
[....]
> application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
> contains(0,128,<1B>%-12345X) \
> (contains(0,1024,"LANGUAGE=POSTSCRIPT") \
> contains(0,1024,"LANGUAGE = Postscript") \
> contains(0,1024,"LANGUAGE = PostScript") \
> contains(0,1024,"LANGUAGE = POSTSCRIPT"))
[....]
> text/plain txt printable(0,1024)
The mime.types rule for PostScript detection is what it should be, and
a *.ps extension should suffice... So in theory, it should work just
fine.
In practice however, it looks like CUPS does not follow its own rules
for auto-typing files here. Dunno why...
IMHO this is a bug and should be submitted to
http://www.cups.org/str.php
for further investigation.
Cheers,
Kurt
More information about the cups
mailing list