printcap configuration problem

Martin Alejandro Paredes Sanchez mapsware at prodigy.net.mx
Fri Aug 8 06:02:18 UTC 2014


El Sun, 03 Aug 2014 08:35:13 +0300
Beeblebrox <zaphod at berentweb.com> escribió:
> > Both cases are for use with a printer that understands PostScript 
> > natively.  A plain LaserJet 2100 does not,
> Mine does, it's the 2100tn model, has native ps level-II
> http://people.virginia.edu/~cavcomp2/printers/hp/2100/2100.htm
> 

If your printer support PS, you are 90% ready,most of the programs
produce PS at the moment to print

What are you printing?
From what program?

> 
> The ghostscript comment was referring to previous discussion - sorry
> for the confusion: If I want to print in r: 300 x 300, the only way
> that's going to happen is by sending it through ghostscript, if I
> understand correctly? How could I modify psif so that "lpr -Php2100
> -r300 somefile.ps" would result in 1. check if ps 2. adjust for one
> of available resolution options (300 OR 600).
> 

Careful, the command

lpr -Php2100 -r300 somefile.ps

might erase the file "somefile.ps", read the man of lpr

-r      Remove the file upon completion of spooling or upon completion
	of printing (with the -s option).

It does not have a option for resolution

LPR take a file and send to LPD and LPD spool the job in the spool
directory, start the FILTER to process the job and send to the printer

Since LPR only give the file to LPD
LPD only handle the queue (spool)
The FILTER is the only that can modify the job (file printed)

To send options to the filter, you can use the option -Z of lpr

-Z daemon-options
	Some spoolers, such as LPRng, accept additional per-job options
	using a `Z' control line.  When -Z is specified, and -p (pr(1))
	is not requested, the specified daemon-options will be passed to
	the remote LPRng spooler.

But the filter need to take options from LPD control file (till here my
explanation, since my point is, you need to read lpr manual to know what
options can be used with lpr)

If you make a program that understand 300dpi option, you can use the
command

 lpr -Php2100 -Z300dpi somefile.ps

You specify your filter (program) in the printcap file as

if=/usr/local/libexec/filters/psif

You should try apsfilter (is in ports), but I don remember that
apsfilter accept option for resolution

I am working in a input filter for LPR/LPD that accept most of CUPS
options, if you want to try, let me know

-HTH
Martin Paredes


More information about the freebsd-questions mailing list