Setting the CUPS parameters from the file to be printed
Scott Vetter
svetter at ameritech.net
Sun Feb 10 06:45:08 PST 2013
> Scott Vetter wrote:
>
> > Is it possible to set the printer options with the input file (i.e. file
> > to be printed)? For example, I have a file to be printed and would like
> > the first line or two would contain how the printer's option to be set.
> > Is this possible? If so, how?
> >
> > Thanks!
>
> In case of PostScript jobs, yes. Insert immediately after the line starting
> with
> %!
> or
> %!PS-Adobe
> (which specifies the following is a PostScript job) one or more lines of the
> form
> %cupsJobTicket: attr1=value1 attr2=value2 ... attrN=valueN
>
> where attrx=valuex denote (nearly) any option which can be specified in a lp
> or lpr command, like
> media=A4
> or
> sides=two-sided-long-edge
> etc.
>
> See also
> http://www.cups.org/documentation.php/doc-1.6/spec-postscript.html#OPTIONS
>
> THis feature has been implemented at first (as far as I know) in cups 1.3.
>
> Helge
>
Thank you Helge!
But how do I know if it is a PostScript job? From the one application it is just text printing.
More information about the cups
mailing list