Xref: utzoo comp.lang.postscript:9135 comp.periphs.printers:1363 comp.sys.ibm.pc.misc:10757 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!relay.nswc.navy.mil!neptune!rchui From: rchui@neptune.nswc.navy.mil (Chui) Newsgroups: comp.lang.postscript,comp.periphs.printers,comp.sys.ibm.pc.misc Subject: Re: MS-DOS WP 5.1 -> Unix-attached HP LaserJet III w. PostScript Message-ID: <1991Jun25.213601.6932@relay.nswc.navy.mil> Date: 25 Jun 91 21:36:01 GMT References: <91168.135650SCHDAVZ@YaleVM.YCC.Yale.Edu> <91175.205539SCHDAVZ@YaleVM.YCC.Yale.Edu> Sender: news@relay.nswc.navy.mil (0000-Admin(0000)) Reply-To: rchui@neptune.nswc.navy.mil (Chui) Organization: Naval Surface Warfare Center, Dahlgren VA Lines: 49 I have to raise several questions for you. 1) Unix operation system machnie is multi-tasks for multi-users. You mention about cp, cat a PostScript file output to /dev/tty## printer port. What happen if there is(are) a(some) print job(s) on the printer? You will get a "port busy" message. You never able to cp, cat. 2) If there is(are) no print job(s) on the printer. When you cp, cat a large (huge) PostScript file to /dev/tty## printer port. What happen other user sent a print job by lp, lpr Unix commands. That will kill your processing. Because cp, cat are not go thru the /etc/printcap file, they are just sent stdout to that /dev/tty## port. You might never finish cp, cat that postscript file. 3) Therefore, you should used "lp, lpr -P printername filename" Unix commands to sent print job to printer. lp, lpr are 1st come 1st serve(FIFO). To check how many current print jobs on printer by type "lpq -P printername".The big problem is, ...... not all the users print PostScript file. I don't know much about HP PostScript cartridge(you mention above). I installed a 3rd Party PacificPage PostScript cartridge into my HP LaserJet III. To order to print a PostScript file, First I have to sent a Escape sequence character from my terminal tell printer switch from PCL mode to postscript mode. Do you have to do this step in HP PostScript cartridge? Then I sent print job to printer. 4) Therefore, I wrote a output filter file in C language, compiler it and link it to /etc/printcap file with :of=/usr/xxx/xxx/offil. The program 1st check is there any print job on printer, if no, tell printer switch to post- script mode, otherwise wait for 20 sec. check again. After switch mode, then see if the incomming file is a PostScript file(begin with "%!"), if no, kill the print process and exit, otherwise print the postscript file. Also I set two different printernames in /etc/printcap file with different :of=/usr/xxx/ xxx/offil or offilps. Do you have any experience about question 4)? So far my program can check the print jobs on printer and switch to postscript mode, after that the print job go to idl(but not die), and the printer just sitting wait for characters. If you interesting, email to me, I will sent you the output filter program. Hopefully you can help me. 5) If you have two printers, you can avoid all these trouble. All you need to do define two different printer names and diffewrent tty## ports in /etc/printcap file. Use Unix command : lpr -P hppcl filename # for PCL text file or lpr -P hpps psfilename # for PostScript file -Raymond email address rchui@neptune.nswc.navy.mil