|
||||
Quote:
|
|
||||
Hrm, I thought I saw Oko mention foomatic being broken for FreeBSD as well. (Which, at least judging from a one person experience with one printer that was definitely working in November, seems to be the case.)
I may look into this method, though I'm not sure how much time I'm willing to put into it. I don't have any big prejudice against cups, which as worked well for me for quite awhile--to be honest, since Apple bought it. However, whatever happened to foomatic is annoying. I print so infrequently, this is more something I would do just out of curiosity--it is annoying though, that a printer that worked before (in 9.x?) stopped working. If I do try the lpd method, I'll follow up here. |
|
||||
It is not BSD specific. foomatic is broken for LPD spooling period. The major Linux distro use CUPS so hence not much noise. Apparently according to authors of foomatic we should all be using CUPS or not using spooling system at all. My guess it is broken for LPRng as well since LPRng is just LPD on steroids.
Last edited by Oko; 21st December 2014 at 02:38 AM. |
|
||||
Ah, I see, thank you.
One oddity I found was that though CUPS said it was using the 2170W filter, I didn't find such a ppd. I found others in the foomatic directory. In the end, I wound up using a variation on Warren Block's version of using lpd http://www.wonkity.com/~wblock/docs/...dprinting.html. However, as my printer can use postscript, rather than his script to use ghostscript to translate ps to pcl, I used the Handbook's version of a filter script, which just calls enscript to turn a file into ps. (As I can't find a 2170W ppd, I thought that Oko's script wouldn't work for me. Mine's a networked printer, so there are other slight differences, more or less taken from Warren Block's page. It's working for me, at any rate. Annoying though--printing from FreeBSD was trivial for awhile there--I see a post of mine on their forums from November, mentioning how it almost worked out of the box. I'm thinking that was with a 9.x install, or at least, an older version of foomatic and/or cups. Anyway, thank you Oko, I was just going to write it off and your post made me decide to go and check out using lpd, despite my inherent laziness. |
|
||||
My reversion to lpd(8) includes foomatic-rip in "direct" mode, using the JetDirect port 9100.
Code:
# Default printer. Postscript or PDF only, using foomatic-rip (print/cups-filters). lp|m451mw|HP LaserJet Pro 400 model m451mw:\ :lp=9100@printer:\ :if=/usr/local/libexec/foomatic.filter.default:\ :sd=/var/spool/output:\ :lf=/var/log/lpd-errs:\ :sh: # Same printer, using No. 10 Envelope and manual feed. # These are 4.25" high and 9.5" wide. env|m451mw|HP LaserJet Pro 400 model m451mw:\ :lp=9100@printer:\ :if=/usr/local/libexec/foomatic.filter.env10:\ :sd=/var/spool/output-env:\ :lf=/var/log/lpd-errs:\ :sh: Code:
#!/bin/sh /usr/local/bin/foomatic-rip --ppd /etc/foomatic/direct/hp-lj_300_400_color_m351_m451-ps.ppd Code:
#!/bin/sh /usr/local/bin/foomatic-rip --ppd /etc/foomatic/direct/hp-lj_300_400_color_m351_m451-ps.ppd \ -o InputSlot=Tray1_man -o PageSize=Env10 |
|
||||
So, you also have the ppd for your printer. (I also, at one point, tried generating a ppd at openprinting.org and using that with cups to create the printer. That didn't work either. I am able to print
pdfs with lp whatever.pdf without problem--actually, IIRC, that's doing better than it does on Linux, where I think I often wound up with postscript gibberish, and wound up using evince (on a CentOS-6.6 desktop-cum-server). Not sure if it will be useful to put my own printcap file but in case it might help someone else--almost all taken directly from the links I gave earlier. /etc/printcap Code:
lp:\ :lp=:\ :sh:\ :mx#0:\ :rm=192.168.1.51:\ :rp=raw:\ :sd=/var/spool/lpd/lp:\ :if=/usr/local/libexec/ps2pcl:\ :lf=/var/log/lpd-err: Code:
#!/bin/sh /usr/local/bin/enscript -o - NOTE: See my later post--originally the if line was for enscript, however, in fooling around it seems that it requires that script of Warren's that converts from postscript to pcl. Both work and the home machines are running FreeBSD-10.1. I also have an HP multifunction here, (at home) that I only use as scanner. I think I used hplip to get that working, haven't set it up though with the newer installs. Maybe I'll try tomorrow if I have time. Last edited by scottro; 21st December 2014 at 11:44 PM. |
|
||||
Yes, after many years of Ghostscript conversion, I acquired a Postscript printer. The PPD file comes from the manufacturer, HP, and is included in the hpijs subpackage of print/hplip. HP may have produced it but they did not make it something easy to obtain directly, when I went looking for it after I acquired the printer about 14 months ago.
|
|
||||
Quote:
Quote:
Quote:
You can by basic monochromatic laser PostScript printer here in U.S. for under $100. I have seen it as low as $70 these days in OfficeDepot. I am not a big fun of HPLIP. I have several older Epson Perfection scanners which work out of box with default SANE-backends. I am talking scanning on my OpenBSD desktops and laptops. Most newer better devices will be happy to scan to USB or SSD or even more conveniently directly to e-mail so really no drivers or any setup is necessary with UNIX or anything else for that matter. Hell even my kids' HP Photosmart C5250 which we keep around as a memory card reader since ink is insanely expensive will scan into SD card. You can probably find one of those for free or for $3 in Goodwill stores. Last edited by Oko; 21st December 2014 at 05:02 AM. |
|
||||
Thanks, tonight, I am going to remove that enscript line and see what happens. I'll update tonight.
I'm not going to be replacing either printer for awhile--only my wife likes printing in color and she now has something at her studio, an HP multifunction laser, so no more paying insane ink prices. Therefore, the HP I have just works as scanner. I think there is some option to webscan as you mention, but actually, we have so little use for it that I doubt I would bother researching. |
|
||||
PPDs can be useful to printing applications. They inform the application about printer capabilities, and can be very detailed. Mine includes all the possible pre-set paper sizes (413 plus custom), printable area, colorspace (RGB), built-in fonts (85), available RAM (73M) .....
I'm OK with Foomatic dropping LPD as a built-in queue method, because the "direct" method can still be used with LPD. CUPS and the many add-ons provide many more connectivity options and print management capabilities. But ... to get printout from an application to arrive successfully at printer is, under the covers, a little like operating a Rube Goldberg machine. There are a vast number of moving parts. When one of those fail, it's a nightmare trying to conduct problem source identification and resolution. |
|
||||
Well, I don't know what happened, but somehow that broke printing completely. Trying to print something gave me one of those pages of postscript gibberish. So, tried again, both with enscript and with the ps2pcl script of Warren's, but no luck, plus a couple of jams when it started running pages and pages through the printer. (And as it's a cheap printer, I couldn't find a way to cancel it on the printer, though that probably exists, and I couldn't cancel on the comptuer as it had already gone.)
I may play with it next week, but right now I'm in a grouchy mood. I wish it were simple like it was in Linux, but who knows what one might have to give up to get that--I've pontificated about that before, that sometimes ease of use starts making it difficult to do the important things. Maybe I should start a blog to grumble about things. (I always feel SO much better after venting--thanks for listenin' guys. I probably won't play with this till next week now.) |
|
||||
Quote:
|
|
||||
Oh....kay. Well, I'm editing my previous post. I just went back to the beginning and it seems to work with the ps2pcl script of Warren's. So, I'm leaving it alone. I'm not sure what I overlooked when trying that before, maybe forgot to restart lpd, but I'll be happy with this. Looking around, it's surprisingly hard to see a listing of specs, especially for a discontinued printer, that explicitly states if it has postscript or not, the best I could find was that it did pcl6. Oh well, it works, so I'll take it as a win.
Again, thanks to Oko and everyone else who has contributed to this thread. |
|
||||
Yeah, and I just realized, to my complete embarrassment, what happened last night--I am going to blame it on being tired.
As we all know the printcap file is really one long line, separated with backslashes--last night, I just blithely commented out what I was thinking of as a line--that is, I commented out the ps2pcl if line and thought the enscript one was working. It's embarrassing, but also funny, and who knows, this post might help someone avoid the same mistake, especially if they're new and don't realize what a \ in such a file would mean. I also thought about playing with apsfilter and possibly the ppd that I was able to create on openprinting.org, but I can't see my needs requiring it, and am feeling lazy now that the oddness of the whole thing is solved. I figure the problems I was having may have been due to either not restarting lpd or blanking out and not realizing that commented lines weren't getting commented--I probably moved the order of the lines around and as it's one long line, probably changed from the working pf2pcl to the enscript one. Last edited by scottro; 22nd December 2014 at 03:10 AM. Reason: typos |
|
||||
Quote:
I also see in FreeBSD ports enscript-letter and lprps. I am not familiar with those two. Actually I used to have two line home made filter for old LaserJet 4L which speaks PCL5. IIRC first line consisted of suppressing wake up garbage and the second one was essentially calling ghostscript with bunch of parameters. I stole idea from NetBSD documentation. I see that they update documentation and recommend broken foomatic-rip now |
|
||||
As I understood it in the reading I've done recently, enscript translates into postscript from ASCII. The description of lprps is that it is to be used with a postscript printer, which I think we've established is not what I have.
Yeah, looking at the apsfilter page, it does seem as if it's pretty ancient. Unless my printing needs change drastically, the setup I now have is fine. |
Tags |
cups, foomatic-rip, lpd, printcap, printing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lpd printing in Current | shep | OpenBSD Installation and Upgrading | 4 | 20th December 2012 07:30 PM |
unwanted printing - cracking? | lumiwa | FreeBSD Security | 9 | 10th July 2012 01:28 PM |
Printing. The final frontier. | girarde | OpenBSD General | 11 | 5th January 2011 01:03 PM |
Poster printing program | map7 | FreeBSD Ports and Packages | 3 | 7th November 2010 07:41 PM |
Problem with printing | unicyclist | OpenBSD General | 8 | 1st May 2009 07:06 PM |