[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference kernel::unix_printing

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

907.0. "Printer Interface Program?" by SWAM1::MORIN_MA () Tue Feb 04 1997 02:25

    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.RTitleUserPersonal
Name
DateLines
907.1write an output filter?NETRIX::"hart@zk3.dec.com"Richard HartWed Feb 05 1997 23:4512
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]