lp behaves differently if you cat a file to it

demian at csbs.utah.edu demian at csbs.utah.edu
Fri Oct 8 14:21:37 PDT 2004


Helge Blischke wrote:
> james_hurford at yahoo.co.uk wrote:
> >
> > One of my users has notcied the following behaviour
> >
> > The CUPS lp command behaves differently for these two commands:
> >
> >    lp -d myprinter filename
> >    cat filename | lp -d myprinter
> >
> > In the top command the file prints just fine on A4 paper to the printer (HP laser 4100).
> >
> > When the second command is used the printer tries to print from a different tray and asks for letter size paper to be used.
> >
> > How can I stop this from happening ?
> >
> > It needs to work the same both ways as some very expensive EDA software (Cadence) prints using the second command
>
> Please post an URL to a sample file that shows this error
> (looking into the source code of CUPS's lp command, this error
> seems impossible to me; I rather suspect your expensive application
> behaves strangely).
>
> Helge
>
> --
> Helge Blischke
> Softwareentwicklung
> SRZ Berlin | Firmengruppe besscom
> http://www.srz.de
> tel: +49 30 75301-360



Helge,

I don't run linux or CUPS yet, but other, (solaris) lp commands require the -c option to get around permissions issues. The -c option copies the file before it is submitted to the spool. Do you get the same functionality for cat file |lp  as you do with lp -c file?

a thought,

-d




More information about the cups mailing list