From owner-freebsd-questions@FreeBSD.ORG Thu Apr 3 14:43:41 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE06637B401 for ; Thu, 3 Apr 2003 14:43:41 -0800 (PST) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 168DE43F85 for ; Thu, 3 Apr 2003 14:43:41 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.9/8.12.7) with ESMTP id h33MhJ6U023532; Thu, 3 Apr 2003 17:43:40 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20030403153320.A43931@skytrackercanada.com> References: <20030403153320.A43931@skytrackercanada.com> Date: Thu, 3 Apr 2003 17:43:18 -0500 To: David Banning , questions@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.28 Subject: Re: customizing printcap to email file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 22:43:42 -0000 At 3:33 PM -0500 4/3/03, David Banning wrote: >what I would like to do is have windows boxes print to a unix >printer filter which would convert the file into pdf format >and put the file into a directory where it could be emailed >out. > >Anyone tried this? First off, I tried modifying the printcap >if= entry to take the file and save it as a file. That was a >no go - I just got an error. This is should be workable, although there are probably a number of subtle details that you'll need to pay attention to. You will probably want to set a log file (lf=) for the printer, as some useful error messages might show up there. Other errors show up in /var/log/messages or /var/log/lpd-errs. What error did you get? Note that you'd want to set if= to an executable script, and that the script should just *read* from stdin and write to where you want it written. Eg: #!/bin/sh cat > /tmp/somefile First try to get it to work by writing to a /tmp file. If you get that working, you can then move on to getting it to work more like what you really want. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu