How to print landscape files from another server via LPD?

Helge Blischke h.blischke at acm.org
Wed Jul 28 11:57:19 PDT 2010


John MacLerran wrote:

>> John MacLerran wrote:
>>
>> >> 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
>> >>
>> >>
>> > ------
>> > Thanks Helge.
>> > I'm not sure those attributes are set up for this print queue.
>> >
>> > I looked in this directory:
>> > /var/spool/lp/admins/lp/printers/
>> > and saw directories for some of our printers -- the ones that are
>> > defined locally on the Solaris box, but the queue in question is not
>> > related to a printer that is local on the Solaris box (which is named
>> > Poseidon), but is just a 'remote' queue that resides on Anerobic, a
>> > completely different server.
>> >
>> > I've asked our unix sysadmin if he's aware of another directory where
>> > those attributes reside, and we'll check for them.  Do you know if the
>> > /var/spool/lp/admins/lp/printers/ directory is the one I should be
>> > looking in? -john -----------
>>
>> John,
>>
>> I currently do not have access to a real Solaris 10 box, which means I'm
>> not able to do real tests on that issue.
>> But you could try the following:
>> - stop the respective printer on your print server
>> - print a (small) sample file from your Solaris box
>> - post (an URL to) both the job's control and data file from the
>>   Linux box (the cxxxxx and the dxxxxx-001 file from the
>>   /var/spool/cups directory).
>>
>> Looking into these files, I should be able to determine if the unwanted
>> wrapping occurs on the Solaris or the Linix box and, perhaps, give hints
>> how to settle down this issue.
>>
>> Helge
>>
> ---
> Thanks, Helge.
> You can view the files at:
> http://www.isu.edu/~macljohn/c11535
> http://www.isu.edu/~macljohn/d11535-001
> 
> To me, the data in d11535-001 does not look wrapped. I'm not sure what I'm
> looking at in the control file, but it doesn't look obviously wrong.
> 
> -john
> ---------------

John,

the two files look OK, so the job should print OK. For further 
investigation, could you , on the Linux box, execute the command
cupsctl --debug-logging
and print this (or a similar) job (with the printer enaqbled, of course), 
then, if the print is finished, execute
cupsctl --no-debug-logging
and post (an URL to) the current /var/log/cups/error_log ?
>From that log file, I hope to be able to determine what your CUPS is really 
doing.

Helge





More information about the cups mailing list