Utilities and tools

<< Click to Display Table of Contents >>

Navigation:  Calling vpxPrint >

Utilities and tools

Alternative methods are available to call vpxPrint.

 

Two general entry points are present in the dll's.

They both allow to call any Windows executable (or Windows registered file) and wait for execution to complete.

xprint.i and xprintAPI.i contain the definition of these procedures.

 

1.ExecuteAndWait()

is an entry point of xprint.dll

 

2.waitFor()

 is an entry point located in vpxWait.dll instead of xprint.dll (vpxWait.dll must be deployed, xprint.dll is not needed)

It runs like the (same parameters apply), but does not need the xprint.dll to be loaded, generating less overhead.

 

The two procedures are interchangeable and share the same 5 parameters:

 

a.ExeName:                name of the executable (Ansi string)

b.Parameters:                parameters (Ansi string)

c.DefaultDir                Default Directory (Ansi string)

d.ShowMode                Integer (Windows values)

-1: default mode

0:   SW_SHOWHIDE

1:   SW_SHOWNORMAL

2:   SW_SHOWMNIMIZED

3:    SW_SHOWMAXIMIZED

e.ReturnStatus                Integer, value of the windows return code.

 

Example:

DEF VAR ReturnValue AS INTEGER.

 

RUN waitFor(

"PDFtoJPG.exe",

"File.jpg outImage.jpg -pages=all",

"",

1,

ReturnValue

).

 

3.printFileEx()

Syntax:

returnValue = printFileEx( xpr_file_name ).

 

Parameters:

returnValue: integer, same values as printFileStat()

xpr_file_name: string. Name of the .xpr file + (optional vpxCall parameters [ -LOG [= logFile_name] ]...)
(add a space between the file name and the parameters, if any)

 

Notes:

printFileEx() is located in xprintAPI.i, an include file of xprint.i

printFileEx() uses a waitFor() call to work.
You may switch to an OS-COMMAND by inserting a &GLOBAL OS-CALL before the { xprint.i } instruction

 

vpxCall.exe

about_24_h vpxCall.exe is an executable which calls xprint.dll.

 
As it calls the native dll, you can use it as a replacement of vpxprint.exe if you need to create PDF or external files when clicking on a file from within a Windows Explorer window. Additional keywords -DELETE and -RECYCLE allow to delete or send the file to the recycle bin respectively, after processing the file.

 

It allows to run xPrint dll in a separate process from the main one.

 

Windows command:

 

vpxCall vpxPrint_filename_and_parameters

[ -DELETE ] [ -RECYCLE ]  [ -LOG [= logFile_name] ]

 
about_24_h Combined with WaitFor():
      RUN WaitFor("vpxCall.exe", filename, "", 1, ReturnValue).

 

(the parameters, if any, must be appended to the file name : filename + " -RECYCLE")

 

it can replace a call to printfile(), allowing to run xprint.dll in a separate memory context.