DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th October 2020
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default lpr and duplex printing

So I have a Brother laser, which digests PS output from apps pretty well. This is good.

Sometimes I have a multiple page PDF to print, though, and LibreOffice -current wants to make those into drawings and do stupid things to the margins, individually,

on

every

single

page.

lpr will print the file, but the OpenBSD lpr doesn't seem to have an -o (options) switch, let alone -o sides=two-sided-long-edge.

How do people deal with this?
Reply With Quote
  #2   (View Single Post)  
Old 25th October 2020
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Don't have a duplex printer myself, so I can't test. There's a trick mentioned on misc@ where you have to add
Code:
%!
<</Duplex true>>setpagedevice
to the beginning of the postscript file you send to your printer. That means you'd have to set up a little input filter that inserts that line to the beginning of your postscript input after the conversion from PDF format but before it gets sent to the printer. Shouldn't be too hard to implement.

Some web hints suggest just putting the second line inbetween the page setup lines:
Code:
%%BeginPageSetup
<< /Duplex true >> setpagedevice
%%EndPageSetup
You could try editing a postscript document manually first, and see if it works. And if it does write your own input filter.

PS: A test file grabbed from the web:

Code:
%!
<<
  /Duplex true
>> setpagedevice

/Courier 72 selectfont
72 648 moveto
(PAGE 1) show
showpage

72 648 moveto
(PAGE 2) show
showpage
Good luck experimenting and don't forget to report back.
Reply With Quote
  #3   (View Single Post)  
Old 26th October 2020
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default

Quote:
Originally Posted by fvgit View Post
Don't have a duplex printer myself, so I can't test. There's a trick mentioned on misc@ where you have to add
Code:
%!
<</Duplex true>>setpagedevice
to the beginning of the postscript file you send to your printer. That means you'd have to set up a little input filter that inserts that line to the beginning of your postscript input after the conversion from PDF format but before it gets sent to the printer. Shouldn't be too hard to implement.

Some web hints suggest just putting the second line inbetween the page setup lines:
Code:
%%BeginPageSetup
<< /Duplex true >> setpagedevice
%%EndPageSetup
You could try editing a postscript document manually first, and see if it works. And if it does write your own input filter.

PS: A test file grabbed from the web:

Code:
%!
<<
  /Duplex true
>> setpagedevice

/Courier 72 selectfont
72 648 moveto
(PAGE 1) show
showpage

72 648 moveto
(PAGE 2) show
showpage
Good luck experimenting and don't forget to report back.
Tested this file, and it worked. More later
Reply With Quote
  #4   (View Single Post)  
Old 26th October 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

On a Brother HL-5450DN, I setup foomatic-rip as a filter.
http://daemonforums.org/showthread.php?t=8710

Then added print queues for duplex letter and #10 envelopes.

My /usr/local/libexec/br_filter_duplex

Code:
#!/bin/sh

/usr/local/bin/foomatic-rip -P Brother-HL-5450DN \
 -ppd /etc/foomatic/direct/Brother-HL-5450DN-BR-Script3.ppd \
 -o PageSize=Letter -o DuplexNoTumble
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LPD printing Oko Guides 28 10th May 2020 12:01 AM
Printing beavers OpenBSD General 3 11th July 2018 01:10 AM
How to set1000base with full-duplex ? sharris FreeBSD General 5 30th May 2011 10:00 AM
Problem with printing unicyclist OpenBSD General 8 1st May 2009 07:06 PM
gem Collisions, duplex mismatch? tad1214 FreeBSD General 1 8th July 2008 02:32 AM


All times are GMT. The time now is 09:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick