Re: lpr duplex printing
On Tue, 10 Jan 2017 12:15:18 -0500 Predrag Punosevacwrote: > Hi Misc, > > I wonder if somebody could educate me on duplex printing with lpr > command from the base What I do is set up multiple printer definitions for the same hardware printer. One definition tells the printer to print duplex, the other doesn't. So when I do: lpr -P lp_oneside myfile my file is printed one sided, but when I: lpr -P lp_duplex myfile my file is printed on both sides. SteveT Steve Litt December 2016 featured book: Rapid Learning for the 21st Century http://www.troubleshooters.com/rl21
Re: lpr duplex printing
gweswrote: > > >I wonder if somebody could educate me on duplex printing with lpr > >command from the base > > > What does actually happen with the document when I use switch -s2 in > > a2ps? > > > Thanks > > Predrag > > lpr is very minimal. It could have a filter added > to send a file through a2ps on its way to the physical printer. > You could wrap a one or two line shell script > around lpr to do the same thing. > > a2ps generates postscript for the text input > It adds a flag to print duplex in that postscript. > The printer interprets that and does what you asked. > > You can send a postscript command string to set the > printer into duplex mode and another to reset it. > I don't remember it offhand. It's one or two lines > to set a value into devicedict or systemdict. > If you look at the a2ps sources it's in there. > > Geoff Steckel Thanks a bunch! Bruno was onto something. Somebody pointed out to me off the list that %! <>setpagedevice at the beginning of a PostScript file I am trying to print is all I really need. Predrag
Re: lpr duplex printing
>I wonder if somebody could educate me on duplex printing with lpr >command from the base > What does actually happen with the document when I use switch -s2 in > a2ps? > Thanks > Predrag lpr is very minimal. It could have a filter added to send a file through a2ps on its way to the physical printer. You could wrap a one or two line shell script around lpr to do the same thing. a2ps generates postscript for the text input It adds a flag to print duplex in that postscript. The printer interprets that and does what you asked. You can send a postscript command string to set the printer into duplex mode and another to reset it. I don't remember it offhand. It's one or two lines to set a value into devicedict or systemdict. If you look at the a2ps sources it's in there. Geoff Steckel
Re: lpr duplex printing
Le mardi 10 janv. 2017 à 12:15:18 (-0500), Predrag Punosevac a écrit: > Hi Misc, > > I wonder if somebody could educate me on duplex printing with lpr > command from the base > > predrag@oko$ uname -a > OpenBSD oko.bagdala2.net 6.0 GENERIC.MP#2 amd64 > > I use LPD spooling with the network printer Brother HL-L5250DN which is > duplex capable. More over I have no problem printing duplex with the > command > > a2ps -Prp -1 -s2 filename.ps > > Obviously a2ps is using the same LPD. However I read lpr man pages > several times over and it seems that lpr has no switch for duplex > printing. > > What does actually happen with the document when I use switch -s2 in > a2ps? Duplex is not the role of lpr. a2ps add a line in your PS file starting with /Duplex (can't remember the exact syntax). Bruno -- ╔═ ╔═║║ ║╔═ ╔═║ ╔═ ╝╔═║╔═║╔═╝╔═║╔═ ╔═╝╔═╝║ ╝ ╔═║╔╔╝║ ║║ ║║ ║ ║ ║ ╔═║╔╔╝║ ╔═║║ ║║ ║╔═╝║ ║ ══ ╝ ╝══╝╝ ╝══╝ ══ ╝ ╝╝ ╝══╝╝ ╝╝ ╝══╝══╝══╝╝