Subject: Re: [netatalk-admins] Retrieving Print File name from PAPD
From: Les Barstow (lbarstow@entire.com)
Date: Wed Oct 28 1998 - 13:51:45 EST
Thanks for the hint. Although I was hoping for an AppleTalk-level
answer,
I was able to write a Perl script which did the job (and did it for
Samba
as well :-).
Albert Max Lai wrote:
>
> On Tue, 27 Oct 1998, Les Barstow wrote:
>
> > 1) Does AppleTalk send filenames, usernames, or systemnames with print
> > requests? If so, is there a way to get netatalk to pass them on to
> > lpr/lp?
>
> Here at Columbia, we figured out a way to get the Document title (the one
> that shows up on the top of a window on the Mac) and the hostnames. We use
> bootp namer to syncronize the hostname to the Macintosh name. Then we grep
> for "%%Title: " and "%%For: " in the postscript for the document name and
> the hostname respectively using a perl script. The perl script takes the
> postscript from stdin (which means that you can just pipe stuff into it in
> the papd.conf configuration), writes a document of the correct title to
> the disk, "lpr -C hostname -Pprintername document_title", and removes the
> file from the spool. In order to prevent the possibility of having
> conflicting titles, we create a directory with the pid number as the
> directory name and put the file there, then we remove the file and the
> directory. This probably isn't the most efficient way (makes for quite a
> bit of disk activity and a little bit more CPU if you have a lot of
> printing), but it is working for now.
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:33:36 EST