From owner-freebsd-questions Wed Mar 17 17:28: 0 1999 Delivered-To: freebsd-questions@freebsd.org Received: from kiwi.pinnacle.co.nz (unknown [210.48.55.133]) by hub.freebsd.org (Postfix) with ESMTP id 1DBDE14E4D for ; Wed, 17 Mar 1999 17:27:43 -0800 (PST) (envelope-from jonc@pinnacle.co.nz) Received: from kiwi.pinnacle.co.nz (kiwi.pinnacle.co.nz [202.37.163.2]) by kiwi.pinnacle.co.nz (8.9.3/8.9.3) with ESMTP id JAA26918; Thu, 18 Mar 1999 09:14:29 +1300 (NZDT) Date: Thu, 18 Mar 1999 09:14:28 +1300 (NZDT) From: Jonathan Chen To: Andrew Fleming Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Setting up HP Jet direct printers In-Reply-To: <86256737.006003BA.00@tiger.fhsu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 17 Mar 1999, Andrew Fleming wrote: [..] > Now the problem. I have users complaining because they have to use two > different names for the same printer. > I have two ideas. Use an :if and call a script that converts everything to PS > and sends it to the raw queen, or Have 3 entries. > If the job is sent to the generic queen, using the :if= a script would be called > and if the print job is PS it would then send the > to the Post Script Queen and if it is Text it would send it to the text queen. > Why not have an interface script/program filter that inspects the input stream and see whether is Postscript or text/something-else. If you inspect Postscript files, you'll see that they have a distinctive start: %!PS-..... So: If it's postscript, pass it thru' raw; if it's text/something-else do something with the input before letting it thru' to the printer. If you do choose to inspect the input-stream, you'll have to be careful to inspect not just the first line, but the first several lines (10 or so), 'cos some M$ Postscript drivers love to put junk before the Postscript preamble. Cheers. -- Jonathan Chen | "Vini, vidi, velcro... | I came, I saw, I stuck around" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message