Deployment option

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Deployment option

 

When creating vpxPrint files *.xpr, files can be viewed with the vpxPrint viewer (vpxPrint.exe). If 'xpr' extension is associated with vpxPrint.exe, the file can be viewed with the vpxPrint viewer from within the explorer windows.

 

Files can be viewed but not printed by non-licensed users.

 

If you want to create Portable vpxPrint files, printable by anyone, you can use the deployment extension.This option must be acquired in order to work. It is not a standard option.

 

How it works:

- With a standard vpxPrint file, vpxPrint first checks if a license file (vpxPrint.lic exists).

If this file does not exist or contains invalid data, the viewer is in a preview-only mode, not able to print.

 

- The deployment option adds some tags in the xpr file, setting the viewer in a view-and-print mode.

These two tags are transparent for any other usage and are intercepted by the vpxPrint viewer.

These two additional tags are located at the beginning of file '<DEPLOYMENT-HEADER>' and at the end of the file '<DEPLOYMENT FOOTER>'. They are calculated with a hash-code of the file content and are specific to one unique report.

They must be inserted for each xpr file with a special call to vpxPrint functions.

 

-  the vpxPrint viewer examines the content of these tags and checks if the file content is valid for the file content.

If yes, the vpxPrint viewer allows printing.

 

 

The deployment option help window:

 

clip0001

 

The name of the license used to build the report is shown in the 'about' window.

 

How to use it:

Two new entry points have been defined in the new vpxPrint dll: getHeader() and writeFooter().

 

The PROGRESS definition of these procedures are included in the xPrint.i include file:

 

PROCEDURE getHeader EXTERNAL "xPrint.dll"           PERSISTENT :

   DEF INPUT PARAMETER  tagToInsert       AS MEMPTR.

END.

 

PROCEDURE writeFooter EXTERNAL "xPrint.dll"         PERSISTENT :

   DEF INPUT PARAMETER  FILENAME          AS CHAR.

END.

 

getHeader() retrieves a header tag for the file and must be inserted at the beginning of the file.

 

After closing the file, call the writeFooter() function to add the bottom tag.

 

For PROGRESS users, functions deployHeader() and deployFooter() exist in the xPrint.i file.

 

Example :

{ xPrint.i }

DEF STREAM O.

DEF VAR F CHAR NO-UNDO.

 

F = SESSION:TEMP-DIRECTORY + "myFile.xpr".

 

OUTPUT STREAM O TO VALUE(F) PAGED PAGE-SIZE 66.

 

           PUT STREAM O UNFORMATTED

              deployHeader()

               "<preview><units=mm>"

               ... ...

               "This is an example of the deployment version of vpxPrint."

               "This file is 'vpxPrint viewer printable'...".

           OUTPUT STREAM O CLOSE.

 

deployFooter( F ).

 

 

 

NOTE :

You don't need to call the printFile() procedure to convert the file.