How to print landscape files from another server via LPD?

Helge Blischke h.blischke at acm.org
Tue Jul 27 14:18:48 PDT 2010


John MacLerran wrote:

> Dear CUPS Forum members
> 
> I'm trying to set up a queue in CUPS to print landscape all the time. I
> have searched the documentation and forums, and found several similar
> questions, but the solutions presented there did not help.
> 
> The reason I need this is that our ERP system sends its reports in 132
> column landscape format by default, and I'm trying to set up  a CUPS queue
> that will accept that output and print it. Alternatively, I'm trying to
> get a defnintive answer of "no, this can't be done", so that I can present
> other, better options (like pdf printing and electronic delivery of
> reports), and still have done due diligence.
> 
> There are a few wrinkles, however. Our ERP servers are running Solaris 10,
> using LPD to send the output to a linux box that acts as our print server.
> 
> On Solaris, the print queue is configured like this (the lines don't
> wrap):
> 
> ccenterapp_land:\
>         :printer-uri-
supported=lpd\://anaerobic.isu.edu/printers/ccenterapp_land#Solaris:\
>         :bsdaddr=anaerobic.isu.edu,ccenterapp_land,Solaris:
> 
> (Anaerobic is our Linux box. It is Red Hat Enterprise 5.5 and cups 1.3.7,
> patch level 18, the Red Hat default.)
> 
> On Linux, our lpoptions file for this queue looks like this (again, no
> wrap in the real file):
> 
>      Default ccenterapp_land landscape=true cpi=14 lpi=8 page-left=36
>      page-right=36      page-top=36 page-bottom=36
> 
> 
> When I send a 132-column text file from Linux, it prints correctly --
> output is flipped landscape, and extends out to the 132-column mark, using
> this lp command:
> 
> lp -d ccenterapp_land testprint.txt
> 
> However, when I send that exact same test file from the Solaris boxes,
> using the same lp command, I get output that is partially correct.  It is
> flipped landscape, but the lines are wrapped into portrait margins -- 101
> columns, to be exact.
> 
> I specified various options in the cups-lpd config file (xinitd, I think,
> I'm not the linux box's sysadmin), but, frankly, I'm not sure what options
> to try, and neither a search here, nor a google search, turned up a list
> of what options are valid.
> 
> The current cups-lpd config entry looks like this:
> 
>     service printer
>     {
>         disable = no
>         socket_type = stream
>         protocol = tcp
>         wait = no
>         user = lp
>         server = /usr/lib/cups/daemon/cups-lpd
>         server_args  = -o job-sheets=none,none
>      }
> 
> In the server_args parameter, I've tried the following options:
> 
>  -o document-format=application/octet-stream  -- as indicated by the man
>  page
>  -o document-format=application/vnd.cups-raw  -- from a google search
>  -o landscape                                 -- a s.w.a.g. on my part
> 
> Neither of which helped. The vnd.cups-raw one really clobbered the output
> -- reducing it to one line, portrait, that ran off the right side of the
> page and was dropped.
> 
> What am I missing? How can I make the linux queue print landscape, all 132
> columns, without wrapping, when the file is sent from Solaris?
> 
> Thank you
> -John MacLerran
> macljohn at isu.edu

I think you are using the default system V printing system on your solaris 
box. In that system, every print queue is associated with one or more of the 
following descriptions:
- printer type
- content type (ASCII, PostScript, etc)
- form name (especially for ASCII content type defining cpi, width (chars 
per line, etc.)

Please post how the respective printer on your Solaris box is defined with 
respect to these attributes. Perhaps you only need to modify one of these.

Helge






More information about the cups mailing list