[cups.general] Page Width Option

Helge Blischke h.blischke at srz.de
Sat Jul 28 08:29:30 PDT 2007


Kurt Pfeifle wrote:
> Tran, Vince T wrote:
> 
> 
>>Sorry to bother you, but could you elaborate a little more? 
> 
> 
> CUPS is uses PostScript as the central hub format for printing. What
> your post implies is that you are basically sending ASCII text files
> and you want a way to control the width of the lines on the page.
> 
> CUPS automatically converts all text into PostScript, using its own
> "texttops" filter. That filter supports options like "prettyprint=true",
> "page-top=22", "page-left=33", "page-bottom=41", "page-right=12" (for
> margins), "lpi=5.8" (lines per inch) and "cpi=8.7" (characters per
> inch), but not "width".
> 
> Now, if your ASCII is more like an early version of PCL, it will have
> embedded a few control/escape sequences, which the texttops filter
> will not like.
> 
> However, the legacy "interface" scripts used on ancient $unix* systems
> were perfectly capable of handling that input and converting it into
> $whatever_your_target_printer likes. (You just cannot use any other
> filter, or a PPD with the same print queue; every conversion you'd
> need to do needs to be scripted into the interface script).
> 
> So, CUPS supports the installation of interface-script driven print
> queues, using the exactly same interface script you used before, simi-
> lar to:
> 
>    lpadmin -p printername \
>           [-L "Building 7 -- 2nd Floor" ] \
>           [-D "LaserJet driven by interface script ] \
>           [-o some.other.supported.option=value ] \
>            -v socket://ip_address \
>            -E \
>            -i /path/to/interface-script.sh \
> 
> About some general ideas about interface scripts (in case you don't
> know them), see
> 
>   http://playground.sun.com/printing/documentation/interface.html
> 
> So, in CUPS (which uses as a hub jobformat PostScript, and PPDs for
> controlling job options) there is a backward-compatible way to sup-
> port migration from legacy System V systems (I know Solaris doesn't
> exactly use a System V printing system, but it still can be made to
> support it).
> 
> 
>>Use lpadmin 
>>with -i option when creating print queue?  Thanks.
>>
>>
>>Vince Tran
>>Emory University AAIT
>>404.727.5350
>>
>>-----Original Message-----
>>From: cups-bounces at easysw.com [mailto:cups-bounces at easysw.com] On Behalf Of Kurt Pfeifle
>>Sent: Friday, July 27, 2007 1:40 PM
>>To: cups at easysw.com
>>Subject: Re: [cups.general] Page Width Option
>>
>>Tran, Vince T wrote:
>>
>>>We’ve recently migrated from Solaris 9 to RHEL 4, but lpr in CUPS
>>>doesn’t support a very important option used here in our shop – width
>>>option.  In Sol 9, one can send lpr with –w option for width of page,
>>>but one can no longer do this in CUPS.  I’ve seen a lot of options in
>>>CUPS, but there’s not one to where you can specify the page width.  Has
>>>anyone find a way to do this?  Thanks.
>>
>>You can use your interface scripts from Solaris in CUPS too (or create
>>a new one that supports your -w option SystemV-style...).
>>
>>See "man lpadmin". Install interface scripts with the "-i" option to
>>lpadmin when creating the print queue.
> 
> 
> 

The native Solaris lpr command ignores the -w option unless combinded
with the -p option (which uses the pr command as a filter).

Thus, it should be easy to write a little script that pipes the
file to be printed through pr and CUPS's lpr.

You could even configure CUPS ti use pr (wrapped by a script to match
CUPS's filter conventions) as a default filter for your text-only
printers, but that is a little more work.

Helge


-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list