[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advanced Printer Control?



> 
> I'm configuring a print server for remote clients. I've set up a Debian machine
> with an HP LaserJet 4000 hooked to it via parallel cable. I've installed lprng
> and samba, and can print to it from two types of client:
> 
> 1) From Linux using BSD-style lpr. Text (notwithstanding line feed issues) and
> postscript print fine. I am looking at installing magicfilter.
> 
> 2) From NT using local drivers, via Samba. Works fantastic.
> 
> The issue, is that the NT drivers are able to take full advantage of the
> printer's capabilities. It can do duplex, 2- 4- 8-up printing, etc.
> 
> How can I achieve such control from the Linux clients? I need to be able to
> specify at least duplex, and hopefully a greater subset of the printer's
> capabilities. Linux is working great as a print server to NT clients, but not so
> great to Linux clients.

You can do two things about this:

1) Find out what control codes to send to your printer that will
enable/disable duplex 2-, 4- or 8- up printing, and write a filter that
sends those codes.

2) Use software.
duplex: lpr has an option for muliple copies
$ lpr -#3 bla.ps
will get you three copies of bla.ps.  Note that this is often disabled
by default in /etc/printcap, and you will have to enable it there.

n-up printing:
Plain text files are best printed with enscript
$ enscript bla.txt
Enscript is able to print to rotated pages on one sheet of paper:
$ enscript -2r bla.txt
For postscript files, you can use psnup:
$ psnup -12 bla.ps | lpr
will print 12 pages per sheet on the default postscript printer.
More than 2-up with plain text:
$ enscript -p- bla.txt | psnup -4 | lpr

Of course you can hide all the nice unix geekery to users in scripts.

Single problem: psnup only works with `well-behaved' postscript files,
that follow Adobe's document structure definitions (or
what'sit-called).

> Any advice would be appreciated. I'm not even sure at which level (client?
> server?) this would occur. Pointers to HOWTOs that deal with this, and other
> resources, would be appreciated.
> 
> PS: I can't help but imagine C++ iostream manipulators:
> 
>     cout << unix_line_feeds << file.txt << duplex << 4up << file.ps;

The last example is quite like that, except that it is written in the
other direction.

HTH,
Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)
 Eindhoven Univ. of Technology
 Lab. for Catalysis and Inorg. Chem. (SKA)


Reply to: