Desktop Delivery

Top  Previous  Next

The delivery of documents is performed by the dtdel() code block function.  When this function is executed, a copy of the file to deliver is stored securely on the server.  The desktop browser and monitor poll the server for new documents to display, and when new documents are available, they are listed as available or are immediately displayed.

 

Documents are not stored indefinitely.  The system purges documents based on the dtage and dtviewage parameters in the [defaults] section of uf100d.ini.  These values specify the number of days unviewed documents, and viewed documents, are maintained, respectively.

 

The dtdel function has the following syntax:

 

 dtdel(filename$,title$,userid$,ip$[,style[,errmsg$]])

 

The filename$ argument can be either a file that resides on the UnForm server or a message in the format of "msg:message text".  It will typically be a PDF file that was generated using a jobexec() command, or it could be the job’s output file, delivered in a postdevice code block.  If it is a message, the text is merged with the message template "http/files/msg.html", and it is always treated as a popup (style=1).  As the popup is based on an HTML template, you can embed HTML code in the message text.  You can also use "\n" as a synonym for "<br>" as a convenience.

 

The title$ argument is a document title that will display in the delivery browser.

 

The userid$ and/or ip$ arguments are used to identify which user should receive the document.  The preferred method is to specify a userid$ value.  If no user ID is specified, then an IP address can be used.  Only a browser logged in as the specified user, and/or connected from that IP address will be notified of the delivery and will be able to access it.  The IP address reported in uf.clientip$ is typically the IP address of the computer that submitted the UnForm job, though in some circumstances it will be the address of a server computer rather than a user computer.

 

As IP addresses can change if DHCP is used or static IPs are re-assigned, or may not be available if the user is accessing the server via a router with NAT translation, care must be taken when using an IP address.  They are suitable in local networks for popup styles of delivery, assuming that purge times (dtage and dtviewage) settings are short.

 

A suffix can be appended to the ip$ value.  This suffix must match the value used in an ips=uniqueid query string in the browser monitor launch.  For example: uf.clientip$+clientenv("SESSIONNAME").

 

The style argument can be 0 or 1.  A value of 0 indicates the monitor and browser windows will display the presence of the delivery.  A value of 1 indicates that the browser will immediately display the document as well.  If the style argument is not supplied, 0 is assumed.

 

The errmsg$ variable will return an error message if an error occurs while storing the document.  It will return null ("") if no error occurs.