From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.belnet.be!feed1.news.innet.be!INbe.net!stns.news.pipex.net!cold.news.pipex.net!pipex!hose.news.pipex.net!pipex!rill.news.pipex.net!pipex!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!hunter.premier.net!uunet!in1.uu.net!199.170.183.55!brighton.openmarket.com!decwrl!purdue!oitnews.harvard.edu!cfauvcs5.harvard.edu!not-for-mail From: Alexander V. Panasyuk Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Dumbfounded by Solaris lp Date: 24 Feb 97 00:50:31 GMT Organization: Harvard University University Information Systems Lines: 85 Message-ID: <3310e5d7.0@cfanews.harvard.edu> References: <330B96CF.41C67EA6@hiwaay.net> Reply-To: panasyuk@cfa.harvard.edu NNTP-Posting-Host: cfanews.harvard.edu FCC: /SUNOS/panasyuk/Mail/out.posts X-Newsreader: TIN [UNIX 1.3 unoff BETA release 961006] Xref: news.unizar.es comp.sys.sun.admin:21335 comp.lang.postscript:9404 David Kelly wrote: > I have an HP LaserJet III on a little HP LaserJet print server that is > giving me fits attempting to print to. The printer worked fine when it > was directly attached to the Solaris 2.5.1 system but the brain-dead > Windows NT 3.51 systems couldn't/wouldn't print right thru the Sun. So > we added the print server and the NT systems are happy. But the Sun > systems are not. > And while I'm at it, I'm trying to insert Ghostscript into the Sun's lp > system. Or unix2dos. As the HP printer want's CR/LF lines and the Sun is HOW TO CONFIGURE PRINTER SUPPORTED BY GHOSTSCRIPT AS A POSTSCRIPT PRINTER UNDER SOLARIS by Alexander Panasyuk. Following is extremely simplified procedure which allowed me to connect my Epson Stylus as a postscript printer under Solaris. I believe that similar procedure can be used for HP's and quite a few others. The only trouble with this approach is that fonts coming with ghostscript are not very aesthetic. Try to find better ones. I am not taking any responsibility for what may happen to your printer, system, state of mind or valet if you follow these instructions. Worked for me, though. 1) Write filter description file and put it into /etc/lp/fd directory. Name it whatever you want, e.g. "stylus.fd". Content may be like this: # Beginning of the file - this is just a comment Input types: postscript Output types: ESC Printer types: any Printers: any Filter type: fast Command: /opt/bin/gs -q -dSAFER -dNOPAUSE -dMicroweave -sDEVICE=stcolor -r360x360 -sOutputFile=- stcolor.ps - # End of the file Instead of ESC you can use any word you believe describes language your printer understands. Example above was used by me for Epson Stylus which understands Epson ESC-codes language. I guess "PCL" would be proper for HP's. What particular word does not really matter as long as you use it consistently. Don't use types already defined in the system, like "PS" or "postscript". As a "Command:" you specify whatever is required to convert postscript to this language. You would better use full path names for the executables. 2) Register filter with printing system. lpfilter -f stylus -F stylus.fd Here "stylus.fd" is the name of the file you created in 1), "stylus" is the name of the filter which can be whatever you like (just watch for names already defined - "lpfilter -f any -l" should print them). 3) Register printer admin -p st -v /dev/bpp0 -I ESC Here "st" is the name of the printer you will be using in "lp" command - again, it's your choice. Substitute the name of device your printer is connected to instead of "/dev/bpp0". "ESC" is "Output type" from 1). If your printer understands plain ASCII you can use "admin -p st -v /dev/bpp0 -I ESC,simple" instead, but I haven't tried it. I had to reset "/dev/bpp0" to be owned by "lp" with permission "600" - may be you have to as well. Now: enable st accept st and you are in business ( hopefully ). Regards, Sasha. / Dr. Alexander V. Panasyuk|Harvard-Smithsonian Center for Astrophysics \ \ panasyuk@cfa.harvard.edu | "A good dede is never unpunisshed." / From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.belnet.be!feed1.news.innet.be!INbe.net!stns.news.pipex.net!cold.news.pipex.net!pipex!rill.news.pipex.net!pipex!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!HiWAAY.net!usenet From: David Kelly Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Dumbfounded by Solaris lp Date: Sun, 23 Feb 1997 22:07:17 -0600 Organization: Amateur Radio N4HHE, Madison, AL Lines: 64 Message-ID: <331113F5.2781E494@hiwaay.net> References: <330B96CF.41C67EA6@hiwaay.net> <3310e5d7.0@cfanews.harvard.edu> NNTP-Posting-Host: max7-77.hiwaay.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.2-GAMMA i386) To: panasyuk@cfa.harvard.edu Xref: news.unizar.es comp.sys.sun.admin:21343 comp.lang.postscript:9410 Alexander V. Panasyuk wrote: > > David Kelly wrote: > > I have an HP LaserJet III on a little HP LaserJet print server that is > > giving me fits attempting to print to. The printer worked fine when it > > was directly attached to the Solaris 2.5.1 system but the brain-dead > > Windows NT 3.51 systems couldn't/wouldn't print right thru the Sun. So > > we added the print server and the NT systems are happy. But the Sun > > systems are not. > > > And while I'm at it, I'm trying to insert Ghostscript into the Sun's lp > > system. Or unix2dos. As the HP printer want's CR/LF lines and the Sun is > > HOW TO CONFIGURE PRINTER SUPPORTED BY GHOSTSCRIPT > AS A POSTSCRIPT PRINTER UNDER SOLARIS > > by Alexander Panasyuk. > > Following is extremely simplified procedure which allowed me to > connect my Epson Stylus as a postscript printer under Solaris. I > believe that similar procedure can be used for HP's and quite a few > others. The only trouble with this approach is that fonts coming with > ghostscript are not very aesthetic. Try to find better ones. [...] > 3) Register printer > > admin -p st -v /dev/bpp0 -I ESC Shouldn't "admin" be "lpadmin"? However, the crux of my problem appears to be that my printer is a *remote* printer and filters are not applied locally before being forwarded. The little HP JetDirect network adapter is not capable of executing the filter Solaris is chosing. It appears my solution is to install the printer as if it was a local printer attached to /dev/null. Also install it with another name as a remote printer. Then to jump into the fake local printer's interface script and reprint its jobs thru "lp -p remote-printer file(s)" I found a perl script named "netprint" in my FreeBSD system. Looks attractive to use it to forward to the JetDirect rather than looping back thru the lp system a second time. Also saw a similar binary utility in a Linux distribution. If we already have perl on the system I'll use netprint. OTOH, does anyone know what/where Solaris finally sends the file to a remote printer? What utility or script? Is is separate and usable or is it embedded somewhere in the lp system where one can't us it in this situation? FYI: this is one of the things I like better about SGI's SysV lp system, even remote prints go thru an interface script that the sysadmin can alter to suit. But thanks for the basic lp installation instructions. I've filed them away with my other notes so the next poor soul who has to maintain this thing might have a clue as to what is going on. -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.uoregon.edu!tezcat!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!uuneo.neosoft.com!fudd.jsc.nasa.gov!news.jsc.nasa.gov!NewsWatcher!user From: cameron#d#stephen@ssdgwy.mdc.com (Stephen Cameron) Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Dumbfounded by Solaris lp Date: Mon, 24 Feb 1997 08:02:40 -0600 Organization: mcdonnell douglas Lines: 30 Message-ID: References: <330B96CF.41C67EA6@hiwaay.net> <3310e5d7.0@cfanews.harvard.edu> <331113F5.2781E494@hiwaay.net> NNTP-Posting-Host: 139.169.215.225 Xref: news.unizar.es comp.sys.sun.admin:21354 comp.lang.postscript:9417 In article <331113F5.2781E494@hiwaay.net>, David Kelly wrote: I've had some problems with these HP printers with the JetDirect boards too. I finally figured out that if you specify a remote printer name of "test" (the "rp" option in /etc/printcap, don't recall where this is specified in solaris) you can get a reasonable line printer emulator. (linefeeds are interpreted correctly.) Strangely if you send a postscript file to this "text" printer, you get NO output. I would have expected it to either 1) figure out that it's postscript, and interpret the postscript, or 2) figure out that it's postscript, but print it as text anyway since I specified the "text" printer. This third option of doing nothing seems insane, but that's what it does. Another problem I have is if I make another printcap entry for the printer with a name besides "text", it will print postscript, but sometimes on 11x17 when the image will easily fit on 8 1/2x11. I've FTP'd a postscript file from a Macintosh (output of MS Word) and it prints fine on 8 1/2x 11, but output of nenscript, (or prtpost, ascii to postscript converter from QMS) chooses the wrong sized paper. any ideas? BTW, I wonder what they were thinking at HP? This all should be so simple! QMS figured it out. -- Steve Cameron cameron#d#stephen@ssdgwy.mdc.com From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.belnet.be!feed1.news.innet.be!INbe.net!blue.news.pipex.net!pipex!stns.news.pipex.net!cold.news.pipex.net!pipex!rill.news.pipex.net!pipex!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!HiWAAY.net!usenet From: David Kelly Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Dumbfounded by Solaris lp Date: Mon, 24 Feb 1997 18:23:54 -0600 Organization: Amateur Radio N4HHE, Madison, AL Lines: 24 Message-ID: <3312311A.1CFBAE39@hiwaay.net> References: <330B96CF.41C67EA6@hiwaay.net> <3310e5d7.0@cfanews.harvard.edu> <331113F5.2781E494@hiwaay.net> NNTP-Posting-Host: max19-120.hiwaay.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.2-GAMMA i386) To: Stephen Cameron Xref: news.unizar.es comp.sys.sun.admin:21385 comp.lang.postscript:9433 Stephen Cameron wrote: > > I've had some problems with these HP printers with the JetDirect boards > too. I finally figured out that if you specify a remote printer name of > "test" (the "rp" option in /etc/printcap, don't recall where this is > specified in solaris) you can get a reasonable line printer emulator. > (linefeeds are interpreted correctly.) > > Strangely if you send a postscript file to this "text" printer, you get NO > output. I would have expected it to either 1) figure out that it's > postscript, and interpret the postscript, or 2) figure out that it's > postscript, but print it as text anyway since I specified the "text" > printer. This third option of doing nothing seems insane, but that's what > it does. The JetDirect implements two "printers" per printer port. One is named "text" and the other is "raw". I'd expect printing Postscript to the raw printer on an internal JetDirect card would be the best thing to do. -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.belnet.be!feed1.news.innet.be!INbe.net!news.nl.innet.net!INnl.net!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!newsfeed.direct.ca!news.wildstar.net!news.wildstar.net!not-for-mail From: plaws@cherokee.wildstar.net (Peter Laws) Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Dumbfounded by Solaris lp Date: 25 Feb 1997 15:13:18 -0600 Organization: Wildstar Internet Services Lines: 11 Message-ID: <5evkle$v17@cherokee.wildstar.net> References: <330B96CF.41C67EA6@hiwaay.net> <3310e5d7.0@cfanews.harvard.edu> <331113F5.2781E494@hiwaay.net> NNTP-Posting-Host: cherokee.wildstar.net X-Newsreader: NN version 6.5.0 CURRENT #2 Xref: news.unizar.es comp.sys.sun.admin:21431 comp.lang.postscript:9473 cameron#d#stephen@ssdgwy.mdc.com (Stephen Cameron) writes: >BTW, I wonder what they were thinking at HP? This all should be so >simple! QMS figured it out. They're thinking, "Hmm, should we make our printers work with a competitor's OS? Nahhh ..." -- Peter Laws / plaws@wildstar.net / N5UWY From - Sat Mar 1 01:40:03 1997 Path: news.unizar.es!news.rediris.es!news.belnet.be!feed1.news.innet.be!INbe.net!news.nl.innet.net!INnl.net!hunter.premier.net!news.maxwell.syr.edu!EU.net!sun4nl!phcoms4.seri.philips.nl!news From: Bob Hoekstra Newsgroups: comp.sys.sun.admin,comp.lang.postscript Subject: Re: Yet another print problem [was: Dumbfounded by Solaris lp] Date: Mon, 24 Feb 1997 11:34:28 +0100 Organization: Origin IT Lines: 45 Message-ID: <33116EB4.983@CFT.PHILIPS.NL> References: <330B96CF.41C67EA6@hiwaay.net> <3310e5d7.0@cfanews.harvard.edu> NNTP-Posting-Host: host-85-11.cft.philips.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m) Xref: news.unizar.es comp.sys.sun.admin:21348 comp.lang.postscript:9416 Alexander V. Panasyuk wrote: > ... > > And while I'm at it, I'm trying to insert Ghostscript into the Sun's lp > > system. Or unix2dos. As the HP printer want's CR/LF lines and the Sun is > > HOW TO CONFIGURE PRINTER SUPPORTED BY GHOSTSCRIPT > AS A POSTSCRIPT PRINTER UNDER SOLARIS > > by Alexander Panasyuk. > ... I have a similar problem with which I would appreciate help. I want to create a separate printer queue which prints from bin2 on a postscript printer. The printer accepts only postscript. I have written the filter (as an sh script) to insert the correct PS code in the file, and the following works: cat | filter | lpr -P #SunOS 4 or cat | filter | lp -d #SunOS 5 This does not quite fulfil my requirements, as I want to be able to print direct from an application to a printer. For this I want a dedicated print queue. No matter how I try, I either get my print from the default bin (i.e. the filter has not been used) or it dissapears down a black hole. I have read Alexander's description and tried to adapt it (on a Solaris 2.5 box), to no avail. I have also tried reading the Solaris 2 Answerbook, but did not find much to help me. I would prefer to do this on a SunOS 4.1.3 print server, but a Solaris 2.5 solution would also be appreciated. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GO/! d- s++:+ a+ C++(++++) US+++$ P+ L+ E--- W++ N++ w--- O- V- PS+ PE- Y+ PGP- t+ 5++ X+ R* tv+ b+ DI++ D G e(*) h++/-- r+++ y? ------END GEEK CODE BLOCK------ ----------------------------------------------------- Bob Hoekstra: Unix Consultant http://www.khamsin.demon.co.uk Return mailto:hoekstra_b@cft.philips.nl Home mailto:bob@khamsin.demon.co.uk -----------------------------------------------------