Title: | Printing from UNIX |
Moderator: | KERNEL::COFFEYJ |
Created: | Thu Dec 17 1992 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 956 |
Total number of notes: | 2876 |
How can I run a script for all print queues that optionally runs a conversion program based on the content of the print file? We are implementing JetForms (laser print/merge application) and want to intercept all print jobs, grep for a phrase, and if found, preprocess the file before sending it to the printer. I saw something called "Printer Interface Programs" in O'Reilly's "System Administration" but it appears to require lpadmin which Digital UNIX doesn't have. A -i option specified a script. Printing is done from a application which we can't modify. -- Mark
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
907.1 | write an output filter? | NETRIX::"[email protected]" | Richard Hart | Wed Feb 05 1997 20:45 | 12 |
One solution would be to write a shell script that you would use as the print filter for all printers where you want this functionality. This shell sript filter should first check the file input on stdin for the string you are interested in, that if it's found send the print file through your filter, while piping the output into the approprate print filter. You'll need to temporarily hold the print file in /tmp (or someplace else of your chosing), so you send it through both grep and the appropriate filter(s). Rich Hart. [Posted by WWW Notes gateway] |