ITEM: BE4152L

NetView - Printing graphs with xnmgraph -printOnly -printCommand



Question: How to use the printCommand and the printOnly options for 
xnmgraph. 


 Customer is trying to run xnmgraph from a script and have it
print out results.  He is using the following command:
/usr/OV/bin/xnmgraph -title xxx -poll 30s -printOnly ......

The graph comes up and goes away on the screen, but it never prints.
He has also changed his default printer command in /usr/OV/app-defaults/
XNm to be "lpr -ps"

Resolution:

        xnmgraph uses the following from the XNm:

        1). xnmgraph.xwdCommand: 

                This is the command that is used to create an image file.
                From /usr/OV/app-defaults/XNm the default is:
                   /usr/bin/X11/xwd -nobdrs -id 0x%x -display %s | %s
        
This command used to perform window dump.  The %x is substituted by the
window id.  The first %s is substituted by the display.  The final %s is
substituted by the printCommand resource (below in step 2).
Modification of this resource is strongly discouraged.

        2). xnmgraph.printCommand:

                This is the command that is used to put the result of the
                xnmgraph.xwdCommand into a file.

                From /usr/OV/app-defaults/XNm the default is:
                         cat > /tmp/xnmgraph.xwd

This is the command to pipe output of screen dump to.  A default of 
"cat > filename" will dump the screen image into filename.  
See Help available from "File->Print..." dialog for examples.  
The environment variable "$OVTITLE" is set to the graph title when 
this command is executed.

        3). After this file is created, the file must be printed
                using the xpr command that will take the image file
                in /tmp/xnmgraph.xwd and print it using the 

An example print command to a postscript printer would be:

  xpr -rv -device ps -header "$OVTITLE" | lpr -Pqueue

The filename /tmp/xnmgraph.xwd is localizable.

Resolution:

Sooooo....

All of this means that the proper commands for the shell script to
change the printCommand:
exec /usr/OV/bin/xnmgraph    \\
   -title "NetView Stock Graph Demo" \\
   -browse \\
   -mib "*::::::::bbf-905.austin.ibm.com"\\
   -printCommand "xpr -rv -device ps -header "AM" | lpr -P \" \\
   -printOnly


Response:

Closing with Customer Approval


Support Line: NetView - Printing graphs with xnmgraph -printOnly -printCommand ITEM: BE4152L
Dated: February 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:22
Comments or suggestions? Contact us