Difference between revisions of "GT.M pipe for print DEVICE:"

From VistApedia
Jump to: navigation, search
m
 
m (2.) GT.M pipe for print DEVICE:)
Line 1: Line 1:
== 2.) GT.M pipe for print DEVICE: ==
 
  
 
With the introduction of the pipe device to GT.M (version V5.3-003) this simpler, more secure, even elegant method can be used:
 
With the introduction of the pipe device to GT.M (version V5.3-003) this simpler, more secure, even elegant method can be used:
Line 16: Line 15:
 
In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt file to clean up. No fuss, no muss. '''What's not to love?!?!'''
 
In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt file to clean up. No fuss, no muss. '''What's not to love?!?!'''
  
--[[User:JohnLeoZ|gra'pa Z]] 04:40, 13 Aug 2009 (PDT)
+
--[[User:JohnLeoZ|gra'pa Z]] 06:40, 13 Aug 2009 (EDT)

Revision as of 11:41, 13 August 2009

With the introduction of the pipe device to GT.M (version V5.3-003) this simpler, more secure, even elegant method can be used:

                  NAME: HP-PHOTOSMART                     
                    $I: <pipe>
      PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr"")::""pipe"" s IO=""p"""
    POST-CLOSE EXECUTE: X "c ""p"""                  
               SUBTYPE: P-OTHER80
                  TYPE: OTHER
 

Note: We use TYPE:Other rather than Host File Server. No host file needed; output will be "piped" to the default CUPS printer. Also the fancy stuff is in the PRE-OPEN EXECUTE. Thus one could do:

      PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr -P Photosmart_@192.168.5.103 -o cpi=12 -o lpi=8 -o page-left=72"")::""pipe"" s IO=""p"""

In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt file to clean up. No fuss, no muss. What's not to love?!?!

--gra'pa Z 06:40, 13 Aug 2009 (EDT)