Main principle
- Prepare the sequence of operations…
Connection
- Once the command file is built, send it to vpxPrint.
- Click to see examples with different environments.
And beyond...
- Familiarize yourself with all the features.
- Learn how to draw pages, images, barcodes, send emails, create PDF files with “The Discovery”

The command file
The data and commands are inserted in a text file, with ANSI or UNICODE encoding, usually with a .xpr suffix.
The commands and options are specified in tags surrounded by < and >, such as in an HTML file. But fear not, their format is much simpler and the commands are concise and powerful.
Example:
<PREVIEW><PDF-OUTPUT=C:/temp/hello.pdf>Hello World!
… is a seed file that previews “Hello World!” on the screen and also creates a PDF file called C:\temp\hello.pdf with the same content.
Another example:
<PRINT=NO><R10><C10><ANGLE=45>Hello World!<MAILTO=j.doe@gmail.com,m.johnson@mictoft.com CC=me@4GL.fr><MAILSUBJECT=For your info><MAILBODY=Hi john, your report and the attached schedule…><MAILATTACH=C:/temp/planning.xlsx>
<SENDMAIL=PDF,NO-DIALOG><MAILRECEIPT>
… builds in memory (<PRINT=NO> and no <PREVIEW>) the same text from row 10 column 10 but oriented 45°, silently sends an email (NO-DIALOG) with this document in PDF format and the schedule attached. It also asks for a receipt…
How many lines of code should you write for this without vpxPrint? How long would it take you?
But more than this, a multitude of situations are possible, printing of course but also archiving (multi-page TIF files), sending marketing emails, creating PDF files for remote printing …
Images, figures, lines, bar codes, draw on your canvas, manage Excel or Powerpoint, the limit is your imagination!
This file will then be rendered by vpxPrint in a Windows environment but the file can be built on any other environment.
vpxPrint is able to render local files, internet-intranet files from a web server or a FTP server.
Select your development environment below…
Visual Basic
When entering lines of code, the word vpxPrint. causes the display of a contextual menu suggesting the available functions of the class.

Visual C#
Include the vpxPrint.cs class in the project

When entering lines of code, the word vpxPrint. causes the display of a contextual menu suggesting the available functions.

from ctypes import*
########################### Create the output file #########################################
f = open(‘C:/temp/python.xpr’, ‘w’) # output file
f.write(‘<PREVIEW><R10><C10>Hello world!’)
f.close()
########################### Different ways to call vpxPrint ###################################
1.import subprocess:
subprocess.call([“c:/windows/system32/vpxcall”, ‘C:/temp/python.xpr’])
2. call vpxCall:
param = ‘C:/temp/python.xpr’
arg=[“vpxCall”, param] # optional , “-LOG”
subprocess.Popen(arg)
3. call the dll:
xprint = cdll.LoadLibrary(“xprint.dll”)
xprint.printFile(‘C:/temp/python.xpr’)
Progress OpenEdge
Include xPrint.i in the project
Delphi
When entering lines of code, the word vpxPrint. causes the display of a contextual menu suggesting the available functions.


Delphi
When entering lines of code, the word vpxPrint. causes the display of a contextual menu suggesting the available functions.

