General Integration Concepts

Top  Previous  Next

UnForm is capable of interfacing with any application that can provide it with text input or PostScript.  On UNIX, this integration is generally performed via pipes.  On Windows, your application can use TCP/IP printing, or can print to a file, and then launch uf90c.exe when the printing is complete.

 

If your application prints by opening a pipe to the spooler, just insert UnForm into the pipeline:

 

Before:        |lp –dprinter –s 2>/dev/null

 

After:        |uf90c –f rulefile | lp –dprinter –oraw –s 2>/dev/null

 

 |uf90c –f rulefile –o '>lp –dprinter –oraw'

 

The second option, above, submits the job for printing on the server, while the first option will wait for the server to return the job for local printing on the client.

 

If your application prints to a device, such as "/dev/lp0", then you can probably modify it like this:

 

Before:        /dev/lp0

 

After:        |uf90c –f rulefile –o /dev/lp0

 

 

Note the use of the –oraw option in the above spooler examples.  It is important for UnForm's output to be handled as binary data by the spooler.  The –oraw option is used in the Linux/OSX CUPS spooler. Other spoolers require different options, such as "-o-dp" for AIX, or -l (lowercase L) for the lpr spooler.  Check your lp configuration tools or man pages for the appropriate settings for options such as "binary", "raw", or "pass-thru" printing.

 

If your application cannot print to a pipe, or runs on Windows, then your application can be modified to print a text file, then execute UnForm when complete.  Your environment may provide a way to do this automatically, such as the EXECOFF mode in Visual PRO/5 noted earlier.  Here is a simple Visual Basic example of creating a file and launching UnForm:

 

open "work.txt" for output as #1

 

print #1,tab(35); "INVOICE"

more printing

 

close #1

 

if shell("uf90c.exe –i work.txt –o //server/hplaser –f rulefile",6)=0 then

 end

else

 msgbox "UnForm failed to start."

end if