Re: Input Filter and LPD
> On Oct 19, 2020, at 18:26, Predrag Punosevac wrote: > > CUPS is not needed around here. Possibly it will not be needed sometime in the future: https://www.theregister.com/2020/10/15/apple_cups_develoment/
Re: Input Filter and LPD
Ian Darwin wrote: > > Just for the Internet Archive. This is fixed in 6.8 release. Printing > > works as expected. CUPS is not needed around here. > > Not to complain, but curious: can you send any combination of plain text, > postscript and PDF via lpd? If so, what input filter(s) are you using? > > Thanks! Hi Ian, Yes, I can! oko# cat /etc/printcap # Remote printer must use jetdirect since foomatic-rip doesn't speak LPD rp|HL-5250DN:\ :lp=9100@192.168.3.15:\ :if=/etc/foomatic-rip/script_brother.sh:\ :sh:sd=/var/spool/output/brother:\ :lf=/var/log/lpd-errs: oko# cat /etc/foomatic-rip/script_brother.sh #!/bin/sh /usr/local/bin/a2ps -BRq --columns=1 -o - | \ /usr/local/bin/foomatic-rip -P HL-5250DN --ppd \ /etc/foomatic-rip/direct/brother-hl-5250dn-postscript-brother.ppd predrag@oko$ head .xpdfrc # Set the default PostScript file or command. psFile "|a2ps -Prp -1 -s2" psPaperSizeletter # launch URLs in Firefox urlCommand "firefox-esr '%s'" # launch movie annotations in mplayer movieCommand "/usr/local/bin/mplayer %s" Best, Predrag
Re: Input Filter and LPD
punoseva...@gmail.com (Predrag Punosevac), 2020.06.08 (Mon) 23:57 (CEST): > It seems that there is another change on 6.7 perhaps among packages > which broke printing for me. I am using built in LPD to print onto the > network connected Brother HL-5250DN. I am getting row PostScript output > on the printer instead of the document. Just for the Internet Archive. This is fixed in 6.8 release. Printing works as expected. CUPS is not needed around here. Best, Predrag
Re: Input Filter and LPD
Marcus MERIGHI wrote: > punoseva...@gmail.com (Predrag Punosevac), 2020.06.08 (Mon) 23:57 (CEST): > > It seems that there is another change on 6.7 perhaps among packages > > which broke printing for me. I am using built in LPD to print onto the > > network connected Brother HL-5250DN. I am getting row PostScript output > > on the printer instead of the document. > > I think I've seen the same. Though I could still print simple text > files, like "cat foo.txt | lpr". Hi Marcus, Thanks for confirming the issue. I am 95% sure that this is related to the upgrade of cups-filters package. Namely, there are two packages involved with my printing setup. a2ps and cups-filters a2ps has not been changed since 6.6 relase and it is still the same old a2ps-4.14p15 However, cups-filters is significantly "upgraded". OpenBSD 6.6 was shipped with cups-filters-1.25.6. OpenBSD 6.7 was shipped with cups-filters-1.27.4p0. Looking through internet archive and the commit log https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/print/cups-filters/Makefile cups-filters-1.27 branch was nothing but the trouble. I am not sure why upstream quickly ditched cups-filters-1.26. When I say trouble I really mean it. This thing broke printing on CentOS and Ubuntu not just on OpenBSD. I upgraded my package to cups-filters-1.27.5 and that didn't fix the problems for me. I tried yesterday to go back to the last 1.25 version cups-filters-1.25.13 I was unable to compile program quickly. It requires more work. I am surprised to find out that I am the first one reporting the issue as I would expect more people to use LPD than CUPS. I fixed cups-filter package probably would be worth of stable binary package effort. Best, Predrag > Printing PDFs from xournal failed, with raw PS output as you describe. > > The machine is currently not available, probably online this afternoon, > will post the configs then. > > I guess you want to avoid it, but cups still works on that machine. > > Marcus
Re: Input Filter and LPD
punoseva...@gmail.com (Predrag Punosevac), 2020.06.08 (Mon) 23:57 (CEST): > It seems that there is another change on 6.7 perhaps among packages > which broke printing for me. I am using built in LPD to print onto the > network connected Brother HL-5250DN. I am getting row PostScript output > on the printer instead of the document. I think I've seen the same. Though I could still print simple text files, like "cat foo.txt | lpr". Printing PDFs from xournal failed, with raw PS output as you describe. The machine is currently not available, probably online this afternoon, will post the configs then. I guess you want to avoid it, but cups still works on that machine. Marcus
Input Filter and LPD
It seems that there is another change on 6.7 perhaps among packages which broke printing for me. I am using built in LPD to print onto the network connected Brother HL-5250DN. I am getting row PostScript output on the printer instead of the document. This is the relevant printcap entry rp|HL-5250DN:\ :lp=9100@192.168.3.15:\ :if=/etc/foomatic-rip/script_brother.sh:\ :sh:sd=/var/spool/output/brother:\ :lf=/var/log/lpd-errs: Note that I am using jetdirect protocol since foomatic-rip doesn't speak LPD. This is my magic input filter (if) script which was needed after the support for LPD was removed from foomatic-rip #!/bin/sh /usr/local/bin/a2ps -BRq --columns=1 -o - | \ /usr/local/bin/foomatic-rip -P HL-5250DN --ppd \ /etc/foomatic-rip/direct/brother-hl-5250dn-postscript-brother.ppd and this is the relevant /usr/local/share/doc/pkg-readmes/cups-filters paragraph Input filter script --- Non-postscript files must be converted before being sent to foomatic-rip(1). Several packages can be used for that, a2ps being the most complete. Note that a2ps(1) requires external helper tools for converting files. They can be configured under /etc/a2ps{,-site}.cfg. By default, converting images requires the ImageMagick package. Here's a sample converter script: ---8<--- #!/bin/sh /usr/local/bin/a2ps -BRq --columns=1 -o - | \ /usr/local/bin/foomatic-rip -P samsung-ml2850d ---8<--- Additional options can be passed to foomatic-rip(1). e.g. - to print in duplex mode: -o duplex - to set the page size to letter: -o pagesize=letter Default options can be set by editing the PPD file. To use the above script as an input filter for lpd(8), see the next sections (make sure the script is executable). lpd(8): USB printer printcap(5) example --- lp|samsung|Samsung-ML-2850D:\ :lp=/dev/ulpt0:\ :if=/path/to/script.sh:\ :sd=/var/spool/output:\ :lf=/var/log/lpd-errs:\ :sh: lpd(8): network printer printcap(5) example --- rp|samsung|Samsung-ML-2850D:\ :lp=9100@1.2.3.4:\ :if=/path/to/script.sh:\ :sd=/var/spool/output:\ :lf=/var/log/lpd-errs:\ :sh: (where 1.2.3.4 is the printer IP address and 9100 the printer stream port) foomatic-rip(1) does *not* speak LPD (port 515). If the printer does not support raw printing over port 9100, it must be setup locally on a print server (see above for an example using USB) then accessed over LPD by the clients (there is no need to setup any print filter on the clients since it will run on the print server). What am I missing? Predrag