[cups.general] Handling text files with CUPS?
David Miller
millerdc at fusion.gat.com
Thu Mar 6 11:51:44 PST 2008
On Mar 6, 2008, at 3:47 AM, Tim Waugh wrote:
> On Wed, 2008-03-05 at 11:25 -0800, David Miller wrote:
>> I recently changed my CUPS print server from RHEL4 to RHEL5 and now
>> I'm seeing much different results when printing text files from the
>> command line using a plain lp command.
>
> The reason is that a different filter is being used. Whereas Red Hat
> Enterprise Linux 4 uses the CUPS 'texttops' filter, Red Hat Enterprise
> Linux 5 uses 'texttopaps', a filter based on the paps text formatter:
> http://paps.sourceforge.net/
>
> This filter is used for text/plain format files.
>
> You can edit the file /etc/cups/mime.convs on the CUPS print server so
> that the CUPS texttops filter is used for text/plain files. Find this
> line:
>
> text/plain application/postscript 33 texttopaps
>
> and change it to:
>
> text/plain application/postscript 33 texttops
>
Changing this worked! thank you.
>> The funny thing is that if the server does not have the lpoptions
>> file
>> and the RHEL clients do, the fonts come out larger or bolder. It
>> would
>> appear that the RHEL systems are converting the file to postscript
>> before shipping it off to the print server at which point the print
>> server is also doing something to the file. The HP-UX box sends the
>> file as text so it is only manipulated by the print server.
>>
>> How do I make my RHEL clients stop manipulating the job and let the
>> server handle it?
>
> How are the queues set up on the clients? If they are discovered
> automatically ('CUPS browsing'), the job should be sent to the server.
> If you have explicitly added queues to the clients, perhaps they are
> set
> as PostScript queues, forcing the local machine to convert to
> PostScript
> before submitting the job to the server.
>
The RHEL clients only have had one change besides the addition of the
lpoptions file in /etc/cups. I edited the /etc/cups/client.conf file
and added the hostname of my print server. I have over 50 printers and
each printer has more than one print queue setup on the server. For
example I have three queues for hplj5 which is an HP 8100. hplj5,
hplj5_11x17, hplj5_duplex. This allows my users to not have to
remember all the different options for each hp or xerox printer. This
is the easiest method for me. As soon as I add the client.conf I can
do an lpstat -p and all the queues show up.
>> Also how do I change the job on the server to use
>> smaller fonts, and stop wrapping lines.
>
> You can set 'network default options' on the CUPS server. This is
> similar to lpoptions, except that the options are applied (as
> defaults,
> i.e. if the options are not already set) to jobs at the server end
> rather than the client end.
>
> To set these, start the printing configuration tool
> (System->Administration->Printing from the main menu) and go to the
> 'Job
> Options' tab.
>
> Add the option 'wrap=false' to turn off line-wrapping.
>
I noticed that those options get added to the printers.conf file. I
have gone in and added the following options to all the printers.
Option page-top 50
Option page-right 10
Option page-left 50
Option page-bottom 50
Option cpi 12
Option lpi 7
Option wrap false
Now all the RHEL clients adhere to them without having their own
lpoptions file. Is there a way to make those options global for every
printer? having to add those for each printer is a pain.
One thing I noticed is that my HP-UX box still prints a banner page
even though I have "JobSheets none none" for all the printers in the
printers.conf file on the server. I have even tried "Option JobSheets
none", "Option JobSheets false", "Option job-sheets false", "Option
job-sheets none". The only thing that stops them is using an lpoptions
file on the server and doing "Dest hplj5 job-sheets=none".
Thank you very much for helping me out.
David Miller.
>
More information about the cups
mailing list