Re: Printing (well anything) using lpd...
I know this thread is very old, but I thought this might be useful for the archives -- and maybe for the original poster as well. * Bryan on Sat, Jan 29, 2011 at 10:48:58PM -0600: it was easier to copy the file to a Windows box and print. But I'm tired of having to do this, and have begun researching how to print to a printer on the network. I recently bought a Brother 9840CDW, which supports lpd and postscript. It also allows for FTP of files to queue among other things. It's probably more printer (scanner, fax, copier) than I need, but I'm tired of HP printers and the toner issues they have. It is a really nice printer in Windows, and the scanner is most excellent and fast. And according to the LInux foundation site (http://www.linuxfoundation.org/collaborate/workgroups/openprinting) it works perfectly. Of course, I have to take this with a grain of salt, because of Linux's willingness to add proprietary drivers, firmware, etc. Your printer seems very similar to mine, which is a MFC8380DN. I've combed through the manual, and network-wise it supports everything mine does and some more. As Christian correctly said, BRScript3 is just Brother's fancy name for Postscript -- your printer definitely supports it, and I'm convinced that it supports hassle-free lpd operation as well. Since I detest cups with a fiery vengeance, I'm running my printer on my network with lpd only, and it works like a charm. The crucial point is that you have to use a specific lpd queue for the printer to accept the input as Postscript and not just as generic plain text. The manual for your printer omits this passage, but in several others (including mine) it is given. The manual states (look for LPD+Mac operation) that you have to construct the queue name like this: 'BRN_AT', with the x'es replaced by the MAC address of your printer. In my case, the printcap recipe looks like this: | brother|Brother MFC-9840CDW:\ | :lp=:rm=172.23.13.150:rp=BRN001BA968596A_AT:sd=/var/spool/output/brother:lf=/var/log/lpd-errs Obviously, you have to replace IP address and MAC address by your own. If you know your printer's IP address, then ping it and use `arp -a` to get the MAC address. An even simpler recipe is the JetDirect emulation at Port 9100. There you don't have to fiddle around with print queues, and the printer basically just prints everything it sees on that port, as somebody else already mentioned in this thread: | brother|Brother MFC-9840CDW:\ | :lp=9100@172.23.13.150:sd=/var/spool/output/brother:lf=/var/log/lpd-errs As I said, my printer works perfect with both configurations, using OpenBSD's lpd, and if I feed Postscript via lpr it just prints it. It won't eat PDF, but that's just a manner of using `pdf2ps $file - | lpr` I hope somebody might find this still useful and won't disturb the ashes of this thread anymore. :o) s//un
Re: Printing (well anything) using lpd...
On Mon, Oct 17, 2011 at 09:53, Stefan Unterweger ste...@aleturo.com wrote: I know this thread is very old, but I thought this might be useful for the archives -- and maybe for the original poster as well. As the person who wrote this, I thank you for posting this. I gave up trying to get lpd working, and instead used cups to setup printing. My use was more cathartic, as I thought that my favorite OS shouldn't be hamstrung by something as mundane as printing. I actually bought a 9840 because 1.) it was a color laser, and the toner is expensive, but lasts forever 2.) it had a scanner Your printer seems very similar to mine, which is a MFC8380DN. I've combed through the manual, and network-wise it supports everything mine does and some more. As Christian correctly said, BRScript3 is just Brother's fancy name for Postscript -- your printer definitely supports it, and I'm convinced that it supports hassle-free lpd operation as well. Since I detest cups with a fiery vengeance, I'm running my printer on my network with lpd only, and it works like a charm. The crucial point is that you have to use a specific lpd queue for the printer to accept the input as Postscript and not just as generic plain text. The manual for your printer omits this passage, but in several others (including mine) it is given. The manual states (look for LPD+Mac operation) that you have to construct the queue name like this: 'BRN_AT', with the x'es replaced by the MAC address of your printer. In my case, the printcap recipe looks like this: | brother|Brother MFC-9840CDW:\ | B B B :lp=:rm=172.23.13.150:rp=BRN001BA968596A_AT:sd=/var/spool/output/brother:lf=/ var/log/lpd-errs Obviously, you have to replace IP address and MAC address by your own. If you know your printer's IP address, then ping it and use `arp -a` to get the MAC address. I did not know this... how did you find this out? I read through all the manuals that came with the printer, but didn't see anything about this even on the brother website. Can you supply a link for me, and others? An even simpler recipe is the JetDirect emulation at Port 9100. There you don't have to fiddle around with print queues, and the printer basically just prints everything it sees on that port, as somebody else already mentioned in this thread: | brother|Brother MFC-9840CDW:\ | B B B :lp=9100@172.23.13.150:sd=/var/spool/output/brother:lf=/var/log/lpd-errs that's freaking awesome... I had an HP 6310 that I got rid of recently (mainly because ink for that thing was not worth it) that I couldn't get to print files either. Admittedly, I only print once in a while, but it's nice to not have to SCP to a windows box. I think I may have had my printcap messed up at some point. As I said, my printer works perfect with both configurations, using OpenBSD's lpd, and if I feed Postscript via lpr it just prints it. It won't eat PDF, but that's just a manner of using `pdf2ps $file - | lpr` I will definitely keep that in mind, I did research the pdf2ps for another project I had, but didn't think about it for solving my printing issues. I hope somebody might find this still useful and won't disturb the ashes of this thread anymore.B :o) I don't mind resurrecting zombie threads, especially if new information comes to light, or new knowledge... thanks again. Maybe this evening, I'll give lpd another chance... B B s//un
Re: Printing (well anything) using lpd...
* Bryan on Mon, Oct 17, 2011 at 10:38:57AM -0500: In my case, the printcap recipe looks like this: | brother|Brother MFC-9840CDW:\ | :lp=:rm=172.23.13.150:rp=BRN001BA968596A_AT:sd=/var/spool/output/brother:lf=/var/log/lpd-errs Obviously, you have to replace IP address and MAC address by your own. If you know your printer's IP address, then ping it and use `arp -a` to get the MAC address. I did not know this... how did you find this out? I read through all the manuals that came with the printer, but didn't see anything about this even on the brother website. I've looked through the manual of your printer as well, and indeed there is no mention of this at all. I've actually found it in the manual of my own printer, and only after a thorough search in some obscure footnote. Can you supply a link for me, and others? It's in here: - http://welcome.solutions.brother.com/BSC/public/files/dlf/doc002447/cv_dcp8080n_ukeng_net_b.pdf Search for 'lpd', then you'll find a section of how to get a Mac to print through LPD, and there I found this obscure queue name. (What on earth where they thinking anyway? Something like 'postscript' would have sufficed and would have been much less weird...) s//un -- squeak!
Re: Printing (well anything) using lpd...
Jacob Meuser jake...@sdf.lonestar.org writes: On Tue, Feb 01, 2011 at 03:59:02PM +0100, Manuel Giraud wrote: Jacob Meuser jake...@sdf.lonestar.org writes: foomatic is pretty easy to set up. Thread hijacker here. I tried to setup a lpd/foomatic for a printer over network and always end-up with this kind of message in /var/log/lpd-errs: Well. Searching the web, this seems to be related to this: http://old.nabble.com/foomatic-stops-working-again-td29285534.html#a29287775 And might be already fixed in -current (i think i should shut up and test then). as we're now at 4.9-beta, it's definitely a good time to be testing -current. FWIW it works like a charm with a snapshot and a recent hpijs, foomatic-filters. -- Manuel Giraud
Re: Printing (well anything) using lpd...
On Tue, Feb 1, 2011 at 8:59 AM, Manuel Giraud manuel.gir...@univ-nantes.fr wrote: Jacob Meuser jake...@sdf.lonestar.org writes: foomatic is pretty easy to set up. Thread hijacker here. I tried to setup a lpd/foomatic for a printer over network and always end-up with this kind of message in /var/log/lpd-errs: --8---cut here---start-8--- Feb B 1 13:46:29 K lpd[6548]: restarted foomatic-rip version 4.0.4.217 running... called with arguments: '-w132', '-l66', '-i0', '-n', 'manuel', '-j', 'foo.pdf', '-h', 'K', '/etc/foomatic/HPcolor.ppd' Parsing PPD file ... Added option Resolution Added option PageSize Added option Model Added option PrintoutMode Added option InputSlot Added option Duplex Added option Quality Added option ImageableArea Added option PaperDimension Added option Font Parameter Summary - Spooler: lpd Printer: Shell: /bin/ksh PPD file: /etc/foomatic/HPcolor.ppd ATTR file: Printer model: HP Color LaserJet 4500 hpijs pcl3, 3.10.4.16 Options: foo.pdf Job title: foo.pdf File(s) to be printed: STDIN Printing system options: Pondering option 'foo.pdf' Unknown boolean option foo.pdf. Options from the PPD file: File: STDIN Filetype: PDF Process is dying with Cannot find a writable temp dir., exit stat 9 Cleaning up... Feb B 1 13:46:58 K lpd[24642]: col: filter 'f' exited (retcode=9) Feb B 1 13:48:01 K lpd[24642]: mail sent to user manuel about job foo.pdf on printer col (FILTERERR) Feb B 1 13:48:01 K lpd[24642]: col: job could not be printed (cfA007K) --8---cut here---end---8--- I'm using 4.8 stable with packages. /etc/foomatic/HPcolor.ppd is a copy of /usr/local/share/foomatic/db/source/PPD/HP/hp-color_laserjet_4500-hpijs-pcl3. ppd.gz from the hpijs package. I've also installed foomatic-filters and my /etc/printcap is: --8---cut here---start-8--- col|HP Color: \ B B B B :lp=9100@192.168.0.12:\ B B B B :af=/etc/foomatic/HPcolor.ppd:\ B B B B :if=/usr/local/bin/foomatic-rip:\ B B B B :sd=/var/spool/output:\ B B B B :lf=/var/log/lpd-errs:\ B B B B :sh: --8---cut here---end---8--- Well. Searching the web, this seems to be related to this: http://old.nabble.com/foomatic-stops-working-again-td29285534.html#a29287775 And might be already fixed in -current (i think i should shut up and test then). -- Manuel Giraud I think this was fixed in current: http://marc.info/?l=openbsd-portsm=128893326227486w=2 http://bzr.linuxfoundation.org/loggerhead/openprinting/foomatic/foomatic-filt ers/revision/241 Greetings.
Re: Printing (well anything) using lpd...
Jacob Meuser jake...@sdf.lonestar.org writes: foomatic is pretty easy to set up. Thread hijacker here. I tried to setup a lpd/foomatic for a printer over network and always end-up with this kind of message in /var/log/lpd-errs: --8---cut here---start-8--- Feb 1 13:46:29 K lpd[6548]: restarted foomatic-rip version 4.0.4.217 running... called with arguments: '-w132', '-l66', '-i0', '-n', 'manuel', '-j', 'foo.pdf', '-h', 'K', '/etc/foomatic/HPcolor.ppd' Parsing PPD file ... Added option Resolution Added option PageSize Added option Model Added option PrintoutMode Added option InputSlot Added option Duplex Added option Quality Added option ImageableArea Added option PaperDimension Added option Font Parameter Summary - Spooler: lpd Printer: Shell: /bin/ksh PPD file: /etc/foomatic/HPcolor.ppd ATTR file: Printer model: HP Color LaserJet 4500 hpijs pcl3, 3.10.4.16 Options: foo.pdf Job title: foo.pdf File(s) to be printed: STDIN Printing system options: Pondering option 'foo.pdf' Unknown boolean option foo.pdf. Options from the PPD file: File: STDIN Filetype: PDF Process is dying with Cannot find a writable temp dir., exit stat 9 Cleaning up... Feb 1 13:46:58 K lpd[24642]: col: filter 'f' exited (retcode=9) Feb 1 13:48:01 K lpd[24642]: mail sent to user manuel about job foo.pdf on printer col (FILTERERR) Feb 1 13:48:01 K lpd[24642]: col: job could not be printed (cfA007K) --8---cut here---end---8--- I'm using 4.8 stable with packages. /etc/foomatic/HPcolor.ppd is a copy of /usr/local/share/foomatic/db/source/PPD/HP/hp-color_laserjet_4500-hpijs-pcl3.ppd.gz from the hpijs package. I've also installed foomatic-filters and my /etc/printcap is: --8---cut here---start-8--- col|HP Color: \ :lp=9100@192.168.0.12:\ :af=/etc/foomatic/HPcolor.ppd:\ :if=/usr/local/bin/foomatic-rip:\ :sd=/var/spool/output:\ :lf=/var/log/lpd-errs:\ :sh: --8---cut here---end---8--- Well. Searching the web, this seems to be related to this: http://old.nabble.com/foomatic-stops-working-again-td29285534.html#a29287775 And might be already fixed in -current (i think i should shut up and test then). -- Manuel Giraud
Re: Printing (well anything) using lpd...
On Tue, Feb 01, 2011 at 03:59:02PM +0100, Manuel Giraud wrote: Jacob Meuser jake...@sdf.lonestar.org writes: foomatic is pretty easy to set up. Thread hijacker here. I tried to setup a lpd/foomatic for a printer over network and always end-up with this kind of message in /var/log/lpd-errs: Well. Searching the web, this seems to be related to this: http://old.nabble.com/foomatic-stops-working-again-td29285534.html#a29287775 And might be already fixed in -current (i think i should shut up and test then). as we're now at 4.9-beta, it's definitely a good time to be testing -current. -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org
Re: Printing (well anything) using lpd...
Jan Stary h...@stare.cz schrieb: fo just forces a form feed; it doesn't turn PS support on/off or whatever. Certainly not, but it seems the printer is picky about recognizing PostScript as such. I don't know what data actually hits the wire, maybe there is some bogus data sent before the actual PostScript, but the form feed apparently cures that. Funnily, I only need this under NetBSD. Under OpenBSD, it does not have any effect, printing always works, or rather works even worse but with pleasant effect: first, an essentially blank page with a few characters sprinkled across is printed, but then the PostScript sent is printed correctly. As this is still a problem for me and I don't know how to fix it, maybe I may hijack this thread and ask for a possible solution? Thanks, Dennis den Brok
Re: Printing (well anything) using lpd...
On Mon, Jan 31, 2011 at 09:37:24AM +, Dennis den Brok wrote: Jan Stary h...@stare.cz schrieb: fo just forces a form feed; it doesn't turn PS support on/off or whatever. Certainly not, but it seems the printer is picky about recognizing PostScript as such. I don't know what data actually hits the wire, maybe there is some bogus data sent before the actual PostScript, but the form feed apparently cures that. Funnily, I only need this under NetBSD. Under OpenBSD, it does not have any effect, printing always works, or rather works even worse but with pleasant effect: first, an essentially blank page with a few characters sprinkled across is printed, but then the PostScript sent is printed correctly. As this is still a problem for me and I don't know how to fix it, maybe I may hijack this thread and ask for a possible solution? Thanks, Dennis den Brok printcap sh is your friend. -Otto
Re: Printing (well anything) using lpd...
Otto Moerbeek o...@drijf.net schrieb: printcap sh is your friend. It is indeed, thank you. -- Dennis den Brok
Re: Printing (well anything) using lpd...
On Mon, Jan 31, 2011 at 09:37:24AM +, Dennis den Brok wrote: Jan Stary h...@stare.cz schrieb: fo just forces a form feed; it doesn't turn PS support on/off or whatever. Certainly not, but it seems the printer is picky about recognizing PostScript as such. I don't know what data actually hits the wire, maybe there is some bogus data sent before the actual PostScript, but the form feed apparently cures that. Funnily, I only need this under NetBSD. Under OpenBSD, it does not have any effect, printing always works, or rather works even worse but with pleasant effect: first, an essentially blank page with a few characters sprinkled across is printed, but then the PostScript sent is printed correctly. As this is still a problem for me and I don't know how to fix it, maybe I may hijack this thread and ask for a possible solution? :sh: ? -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 01:51:15PM -0800, Sean Kamath wrote: %! newpath clippath stroke showpage These four commands were the smallest PostScript I could figure out to send to a printer to print something without burning up tons of toner. It should produce a small line all the way around the page. You want to set the linewidth too... printers with a high resolution (1200-2400 dpi) may give you a hard time seeing the line.
Re: Printing (well anything) using lpd...
I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) Try using gs to convert your postscript files to pcl3 and feeding those to lpr. $ gs -dNOPAUSE -sDEVICE=pcl3 -sOutputFile=/tmp/junk%d.pcl3 letter.ps $ lpr /tmp/junk*.pcl3 --patrick On Sat, Jan 29, 2011 at 8:48 PM, Bryan bra...@gmail.com wrote: *tried sending this to the newbies list, but was kicked back* I have been hampered with this for a few years now, and at most times, it was easier to copy the file to a Windows box and print. But I'm tired of having to do this, and have begun researching how to print to a printer on the network. I recently bought a Brother 9840CDW, which supports lpd and postscript. It also allows for FTP of files to queue among other things. It's probably more printer (scanner, fax, copier) than I need, but I'm tired of HP printers and the toner issues they have. It is a really nice printer in Windows, and the scanner is most excellent and fast. And according to the LInux foundation site (http://www.linuxfoundation.org/collaborate/workgroups/openprinting) it works perfectly. Of course, I have to take this with a grain of salt, because of Linux's willingness to add proprietary drivers, firmware, etc. I am running a -current built with a vanilla GENERIC.MP (dmesg and printcap below). It's valid as of the 24th of January 2011. I have googled several sites, and found a site that was able to help me get a running config. This meant I was able to successfully send something over my network to the printer. I've sent a copy of the /etc/printcap to the printer, and while it does print the first line of the text correctly, the next line begins where the first line ends, but one line down example: blah blah blah blah blah blah the interesting thing is, the burst page, which prints after the job completes, prints correctly, with lines printing correctly. Truly frustrating. And in a moment of ignorance, I wasted about 50 pages of paper when I sent a PDF to the printer. Tons of garbage on the the page, sometimes on both sides. I was able to purge the queue with 'lpc' but ended up powercycling the printer to kill the printing. I've been reading the printcap man page, lpd, lpr, and the following sites: http://www.linuxfoundation.org/collaborate/workgroups/openprinting http://www.wonkity.com/~wblock/docs/html/lpdprinting.html http://www.digitalissues.co.uk/html/os/unix/bsd.html (this helped me get connected to my networked printer) http://onlamp.com/pub/a/bsd/2004/07/08/FreeBSD_Basics.html?page=1 (Darrin Chandler's blog directed me here when he was having issues) I've been to other sites and forums where people are using samba to print. But I am having enough trouble with a simple text file to setup samba just to print. Has anyone been able to print regular text, pdfs, and possibly images on a printer? I tried using 'pdf2ps', but this only cut down the amount of wasted paper with gibberish on it by 25 or so pages. I've got the network portion down, but I think that I don't know enough about how filters work. Do people create their own, or are there any 'recipes' out there that I can modify to work with my printer? If you have a site that I should be reading, or a man page that I missed, please let me know, and I'll study it. I do have ghostscript installed, and I tried using apsfilter, but it didn't appear to work. I configured everything, using the GS Driver option #2, but everything still printed the same gibberish and text still printed like the above. Regards, Bryan /etc/printcap: # $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $ #lp|local line printer:\ # :lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs: lp|9840CDN:\ :sd=/var/spool/output/9840CDN:\ :lp=:\ :rm=9840CDN:\ :rp=9840CDN: '9840CDN' is the printer, I put it wrong in both my printcap, and in /etc/hosts. The printer is the *9840CDW* dmesg: OpenBSD 4.9-beta (GENERIC.MP) #34: Mon Jan 24 12:26:44 CST 2011 r...@obsd-amd64.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 3707031552 (3535MB) avail mem = 3594342400 (3427MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6530 (57 entries) bios0: vendor Dell Inc. version A24 date 08/19/2010 bios0: Dell Inc. Latitude E6500 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC SSDT acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0) USB5(S0) USB6( S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4) RP02(S4) RP03(S4) RP04(S3) RP05(S3) RP06(S5) LID_( S3) PBTN(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz, 2660.46 MHz
Re: Printing (well anything) using lpd...
To test, try manually converting whatever you want to print with ghostscript, and then printing the result. I found that the filter script included with ghostscript didn't work, but with some hacking I got it to work. It does some horrible shell hacks to autoconfig, and if you just edit in the correct gs filter for your device it should work fine.
Re: Printing (well anything) using lpd...
patrick keshishian pkesh...@gmail.com wrote: I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) It's PostScript 3, but Brother didn't buy the firmware from Adobe and used a different implementation. -- Christian naddy Weisgerber na...@mips.inka.de
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 01:17, patrick keshishian pkesh...@gmail.com wrote: I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) Try using gs to convert your postscript files to pcl3 and feeding those to lpr. $ gs -dNOPAUSE -sDEVICE=pcl3 -sOutputFile=/tmp/junk%d.pcl3 letter.ps $ lpr /tmp/junk*.pcl3 --patrick It supports Postscript, and even has it's own lpd running so that you can FTP files to it to print. Huh... I had never actually tried the upload via FTP, but when I did that, the file didn't print correctly either. With the way my printcap is setup, I'm not actually doing anything to the files before they are sent to the printer. So the Printer's filters aren't working either? I think I may need to check the printer as well as my laptop config...
Re: Printing (well anything) using lpd...
Bryan bra...@gmail.com wrote: I recently bought a Brother 9840CDW, which supports lpd and postscript. It's valid as of the 24th of January 2011. I have googled several sites, and found a site that was able to help me get a running config. This meant I was able to successfully send something over my network to the printer. There's an example entry remote line printer in /etc/printcap. All you need to do is uncomment it and put in the DNS name of the printer. I've sent a copy of the /etc/printcap to the printer, and while it does print the first line of the text correctly, the next line begins where the first line ends, but one line down You say it's a PostScript printer but you didn't send it PostScript, so what did you expect? Actually, your printer happily accepts plain text. However, Unix terminates lines by a simple ASCII line feed character (0x0A, '\n'). Printers interpret this literally as a line feed and expect an additional carriage return character (0x0D, '\r') to also start printing from the beginning of the line. You could use for instance this to add the carriage returns: $ perl -lpe '$_.=\r' file | lpr Or you can use a2ps or mpage from ports to turn plain text into PostScript. And in a moment of ignorance, I wasted about 50 pages of paper when I sent a PDF to the printer. You say it's a PostScript printer but you didn't send it PostScript, so what did you expect? Grab xpdf from ports to view and print the PDF file. xpdf will convert PDF to PostScript for printing. I've got the network portion down, but I think that I don't know enough about how filters work. Do people create their own, or are there any 'recipes' out there that I can modify to work with my printer? There are two approaches here. (1) You take care to only send PostScript files to the printer. This isn't much of an inconvenience, since any X11 program with a print button will likely generate PostScript. (2) You install something like apsfilter or magicfilter from ports to act as an input filter that will try to recognize the type of a file and automatically convert it to PostScript before passing it on to the printer. Personally I find (1) to be sufficient and (2) not worth the hassle, but your milage may vary. -- Christian naddy Weisgerber na...@mips.inka.de
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 10:10, Christian Weisgerber na...@mips.inka.de wrote: patrick keshishian pkesh...@gmail.com wrote: I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) It's PostScript 3, but Brother didn't buy the firmware from Adobe and used a different implementation. -- Christian naddy Weisgerber B B B B B B B B B B B B B na...@mips.inka.de So I'm going to have to mess with the filters to get .ps files to print with the implementation of BR Script? Guess it won't kill me to figure that out...
Re: Printing (well anything) using lpd...
On Sat, Jan 29, 2011 at 11:48 PM, Bryan bra...@gmail.com wrote: I have been hampered with this for a few years now, and at most times, it was easier to copy the file to a Windows box and print. But I'm tired of having to do this, and have begun researching how to print to a printer on the network. I recently bought a Brother 9840CDW, which supports lpd and postscript. It also allows for FTP of files to queue among other things. It's probably more printer (scanner, fax, copier) than I need, but I'm tired of HP printers and the toner issues they have. It is a really nice printer in Windows, and the scanner is most excellent and fast. And according to the LInux foundation site (http://www.linuxfoundation.org/collaborate/workgroups/openprinting) it works perfectly. Of course, I have to take this with a grain of salt, because of Linux's willingness to add proprietary drivers, firmware, etc. While I think it's possible to print using lpd, and people have done it, I found it to be about 10x easier to install cups and use that. You go to localhost:631, type in the printer's name, upload a ppd file downloaded from linuxprinting, and done. You can make lpd and postscript work if you know how they work, but figuring things out if you don't can take a long time.
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 10:47, Christian Weisgerber na...@mips.inka.de wrote: Bryan bra...@gmail.com wrote: I recently bought a Brother 9840CDW, which supports lpd and postscript. B It's valid as of the 24th of January 2011. B I have googled several sites, and found a site that was able to help me get a running config. B This meant I was able to successfully send something over my network to the printer. There's an example entry remote line printer in /etc/printcap. All you need to do is uncomment it and put in the DNS name of the printer. I've sent a copy of the /etc/printcap to the printer, and while it does print the first line of the text correctly, the next line begins where the first line ends, but one line down You say it's a PostScript printer but you didn't send it PostScript, so what did you expect? I did convert a pdf to ps using 'pdf2ps', but it still printed gibberish. I installed xpdf, and I see that now there is a 'pdftops' Actually, your printer happily accepts plain text. B However, Unix terminates lines by a simple ASCII line feed character (0x0A, '\n'). Printers interpret this literally as a line feed and expect an additional carriage return character (0x0D, '\r') to also start printing from the beginning of the line. B You could use for instance this to add the carriage returns: $ perl -lpe '$_.=\r' file | lpr I had an example text file with the following output in it... !#$%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef #$%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg #$%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh $%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi %'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij with your bit of perl, it prints correctly. Without it, it prints with the output similiar to below. Or you can use a2ps or mpage from ports to turn plain text into PostScript. And in a moment of ignorance, I wasted about 50 pages of paper when I sent a PDF to the printer. You say it's a PostScript printer but you didn't send it PostScript, so what did you expect? Grab xpdf from ports to view and print the PDF file. B xpdf will convert PDF to PostScript for printing. Yea, that failed too... here is a rough example of what it looks like: %!PS-Adobe-3.0 % Produced by xpdf/pdftops 3.02 %%Creator: Qt 3.3.8 and i power cycled the printer before I lost another 9 or ten pages. I created the pdf in kword, and it has one line that says This is a test to print. Renders just fine in xpdf and zathura, but the printer prints the above. This is similiar to how the text file I sent last night looks like. There are two approaches here. (1) You take care to only send PostScript files to the printer. B B This isn't much of an inconvenience, since any X11 program with B B a print button will likely generate PostScript. (2) You install something like apsfilter or magicfilter from ports B B to act as an input filter that will try to recognize the type B B of a file and automatically convert it to PostScript before B B passing it on to the printer. Personally I find (1) to be sufficient and (2) not worth the hassle, but your milage may vary. If xpdf didn't work, I doubt any program with a 'print' button is going to just work.
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 12:57:20PM -0500, Ted Unangst wrote: On Sat, Jan 29, 2011 at 11:48 PM, Bryan bra...@gmail.com wrote: I have been hampered with this for a few years now, and at most times, it was easier to copy the file to a Windows box and print. But I'm tired of having to do this, and have begun researching how to print to a printer on the network. I recently bought a Brother 9840CDW, which supports lpd and postscript. It also allows for FTP of files to queue among other things. It's probably more printer (scanner, fax, copier) than I need, but I'm tired of HP printers and the toner issues they have. It is a really nice printer in Windows, and the scanner is most excellent and fast. And according to the LInux foundation site (http://www.linuxfoundation.org/collaborate/workgroups/openprinting) it works perfectly. Of course, I have to take this with a grain of salt, because of Linux's willingness to add proprietary drivers, firmware, etc. While I think it's possible to print using lpd, and people have done it, I found it to be about 10x easier to install cups and use that. cups may be a little eaier to set up, but when I used it a lot, it was an endless source of headaches to keep running. You go to localhost:631, type in the printer's name, upload a ppd file downloaded from linuxprinting, and done. careful. those downloaded ppds may expect a different configuration of software packages than what's in OpenBSD's packages. ppds and the tools to create them are provided in the OpenBSD packages collection. You can make lpd and postscript work if you know how they work, but figuring things out if you don't can take a long time. foomatic is pretty easy to set up. basically any printer that is supported by any kind of free software will work. check out openprinting.org's printer database. (the foomatic developers are also responsible for openprinting.org.) it'll tell you what you need to print with your printer. then follow the directions (i.e. basically cut-n-paste) in /usr/local/share/doc/pkg-readmes/foomatic-*. I've used lpd/foomatic for epson and hp printers (gutenprint and hpijs/hplip drivers). often people claim they only work with cups, but this is simply not true. fwiw, cups uses foomatic internally. that's how it supports all those printers. -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 7:30 AM, Bryan bra...@gmail.com wrote: On Sun, Jan 30, 2011 at 01:17, patrick keshishian pkesh...@gmail.com wrote: I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) Try using gs to convert your postscript files to pcl3 and feeding those to lpr. $ gs -dNOPAUSE -sDEVICE=pcl3 -sOutputFile=/tmp/junk%d.pcl3 letter.ps $ lpr /tmp/junk*.pcl3 --patrick It supports Postscript, and even has it's own lpd running so that you can FTP files to it to print. You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. I have a brother printer at home. It does not support postscript, only PCL-3. I print using lpd in base (no need for disgusting software such as CUPS). I have a HP printer at the office that _does_ support postscript and when I feed it postscript documents they print as expected. Have fun playing with filters and configurations. --patrick Huh... I had never actually tried the upload via FTP, but when I did that, the file didn't print correctly either. With the way my printcap is setup, I'm not actually doing anything to the files before they are sent to the printer. So the Printer's filters aren't working either? I think I may need to check the printer as well as my laptop config...
Re: Printing (well anything) using lpd...
patrick keshishian pkesh...@gmail.com schrieb: You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. This may actually depend on the configuration. For instance, a Kyocera Mita FS1030-D, without fo in its printcap(5) entry, produces output similar to the original poster's printer. (This under NetBSD, though.) -- Dennis den Brok
Re: Printing (well anything) using lpd...
On Jan 30, 2011, at 12:06 PM, patrick keshishian wrote: It supports Postscript, and even has it's own lpd running so that you can FTP files to it to print. You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. A really minor nit: The printer *may* support PostScript, but only in a specific fashion. For example, many printers from the mid-90's only recognized the %! immediately preceded by a ^D or a new connection (any data send between the two (i.e., a ^D followed by a NL then a !%, or a new connection with a control character sent before the %!, would switch it to PCL). Likewise, some printers default to a PCL queue with LDP unless you explicitly name the queue you're printing to ps or postscript. Debugging this crap is a pain in the ass, but not impossible. If you want to check your printers to confirm it prints postscript, send it these two lines: %! newpath clippath stroke showpage These four commands were the smallest PostScript I could figure out to send to a printer to print something without burning up tons of toner. It should produce a small line all the way around the page. You can send that to the printer with FTP. If it works as expected, then your printer supports PostScript. If it doesn't. . . Well, maybe you need to read the docs on your printer to figure out how to send it PostScript. Also, most printers will have a config page you can print out from the front panel. One thing that should show on the Config Page is the PostScript version. That's another way to tell if your printer supports PostScript. Your printer might also accept connections on port 9100 -- you can literally telnet to that port and type the above commands. I don't know if OpenBSD's lpr command can connect to a remote server directly, as Sun's can. You can telnet to the LPD port and try and fake it, but you have to know the magic NULL-prefixed commands. Your best bet is to scour the documentation for your printer. Good luck. Sean
Re: Printing (well anything) using lpd...
On Sun, Jan 30, 2011 at 15:51, Sean Kamath kam...@geekoids.com wrote: On Jan 30, 2011, at 12:06 PM, patrick keshishian wrote: It supports Postscript, and even has it's own lpd running so that you can FTP files to it to print. You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. A really minor nit: The printer *may* support PostScript, but only in a sp34ecific fashion. Yea, the printer doesn't do Postscript (ARRRGGHHH!), but after I configured cups, which was not too painful, I've been able to print the .ps file, and the .pdf file that I had created earlier. I was even able to print the .png that I had in the directory. I printed across three pages, but it printed... the only thing that didn't print was a .doc that I had, which did not print in kword, but libreoffice works just fine. Honestly, this is leaps and bounds ahead of where I was two weeks ago. I still want to figure out the lpd, but for now, cups is working fine with the ppd supplied by Brother...
Re: Printing (well anything) using lpd...
On Jan 30 10:23:29, Bryan wrote: On Sun, Jan 30, 2011 at 10:10, Christian Weisgerber na...@mips.inka.de wrote: patrick keshishian pkesh...@gmail.com wrote: I'm not sure your printer support Postscript. It supports PCL-6 and BR-Script 3 (whatever the hell the latter may be) It's PostScript 3, but Brother didn't buy the firmware from Adobe and used a different implementation. -- Christian naddy Weisgerber B B B B B B B B B B B B B na...@mips.inka.de So I'm going to have to mess with the filters to get .ps files to print with the implementation of BR Script? Guess it won't kill me to figure that out... If your printer really speaks postscript, you don't have to mess with anything. If it prints the PS source instead of the document, it probably does not support postscript.
Re: Printing (well anything) using lpd...
On Jan 30 21:47:40, Dennis den Brok wrote: patrick keshishian pkesh...@gmail.com schrieb: You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. This may actually depend on the configuration. Whether a given printer supports postscripts is of course not a matter of configuration. For instance, a Kyocera Mita FS1030-D, without fo in its printcap(5) entry, produces output similar to the original poster's printer. (This under NetBSD, though.) fo just forces a form feed; it doesn't turn PS support on/off or whatever.
Re: Printing (well anything) using lpd...
On Jan 30 19:30:46, Bryan wrote: On Sun, Jan 30, 2011 at 15:51, Sean Kamath kam...@geekoids.com wrote: On Jan 30, 2011, at 12:06 PM, patrick keshishian wrote: It supports Postscript, and even has it's own lpd running so that you can FTP files to it to print. You keep saying and thinking that it supports post script. It does not. Otherwise feeding it a postscript file would print the document, not the postscript text/source. A really minor nit: The printer *may* support PostScript, but only in a sp34ecific fashion. Yea, the printer doesn't do Postscript (ARRRGGHHH!), but after I configured cups, which was not too painful, I've been able to print the .ps file, and the .pdf file that I had created earlier. I was even able to print the .png that I had in the directory. I printed across three pages, but it printed... the only thing that didn't print was a .doc that I had, which did not print in kword, but libreoffice works just fine. Honestly, this is leaps and bounds ahead of where I was two weeks ago. I still want to figure out the lpd, but for now, cups is working fine with the ppd supplied by Brother... With the same PPD file, you should be able to print with lpd. This is what works for me eith a non-postcript HP printer (the PPD file coes from one of the foomatic* packages): lp|HP Color laserJet 2600n:\ :lp=/dev/ulpt0:\ :af=/etc/foomatic/HP-Color_LaserJet_2600n.ppd:\ :if=/usr/local/bin/foomatic-rip:\ :sd=/var/spool/output:\ :lf=/var/log/lpd-errs:\ :sh: