Integrating UnForm with ProvideX

Top  Previous  Next

 

Simple UNIX Integration

On UNIX systems, you can integrate UnForm within the link file as the output device, and use a standard LaserJet or plain text print driver.  The device used in the link file would be simply a re-direct to the uf100c program (if using ProvideX 6.0 features, a pipe (| rather than >) can be used as well), such as ">uf100c –f acme.rul –o '>lp –dhp –oraw'".

 

Note that this option was not available in prior versions of UnForm.

 

 

Integration using the ProvideX Print Driver uf100ptr

This method works for both UNIX and Windows environments, and provides more program control over the UnForm options when executing the uf100c client.

 

UnForm installation includes a ProvideX print driver uf100ptr which should be copied to your ProvideX lib/_dev directory.  This driver provides platform-independent support for UnForm, along with additional capabilities for managing UnForm command lines from the ProvideX application.  In addition, it supports WindX-based output.  Once copied to your ProvideX lib/_dev directory, this driver is available to use when defining ProvideX link files, which are used as printers in ProvideX.

 

 

To use the uf100ptr print driver:

 

When a link file is defined, you specify an output device and a driver program.  The output device is generally something system specific, like ">lp –dhp –oraw" on UNIX, or //SERVER/PTR on Windows, or it can be a special driver name for Windows, such as *windev*, or [WDX]*windev*.  In some cases, it can be /dev/null or NUL, if the driver will be directing output somewhere for the user.

 

The uf9ptr driver determines a default output device based upon the link file's specified output, and then re-routes the printer output to a temporary work file.

 

It then looks for a configuration file for additional uf100c command line parameters.  This file is simply a text file named linkfile.unf.  For example, for a link file named P1, uf9ptr will look for a file called P1.unf for additional parameters.  In this text file can be one or more lines with uf100c command line options.

 

Once the file-based parameters have been loaded, uf100ptr then looks for the OPT value that was used in the OPEN directive, if any, for additional parameters.  Any parameters named in the OPT value will override those found in the configuration file.

 

When all parameters have been resolved, a uf100c command line is built for execution at the end of the job.  In cases where the output needs to be returned to a WindX client, the driver handles uf100c appropriately to create local output and copy that output back to the WindX PC.

 

Example 1:

 

LP is a link file pointing to device /dev/null.

LP.unf contains: -p pdf.

 

invoiceno$="00015"

OPEN(1,opt="-o /archive/"+invoiceno$+".pdf")"LP"

 

The result will be an uf100c command like this, which executes when the printer is closed:

 

uf100c –i workfile –p pdf –o /archive/00015.pdf

 

Example 2:

 

P1 is a link file pointing to device ">lp –dhp4000 –oraw".

No P1.unf file is defined

OPEN(1,OPT="-f acme.rul")"P1"

 

This will override the default rule file defined at the server, using acme.rul.  Output will go to ">lp –dhp4000 -oraw" on the machine where the UnForm server is running.  Typically this is the same machine that runs ProvideX.  If it is not, add a –server servername option to OPT or linkfile.unf.  In such a case, if the >lp command isn't valid locally, you will need to add a –o option to the configuration and change the link file to point to /dev/null (or NUL on Windows).

 

Example 3:

P2 is a link file pointing to device [WDX]*windev*.

Opening P2 will result in laser output being produced and sent to the WindX printer selected.

 

Example 4:

P3 is a link file pointing to device NUL.

P3.unf contains –p winpvw.

Opening P3 will cause production of a temporary PDF file.  This file will automatically be viewed on a WindX client or in a Windows ProvideX session.