The VDP Tool is a command-line utility and uses the Web API for Personalized Rendering under the hood. You can download this utility from your account.
It is assumed that you have already installed Customer's Canvas on your server or obtained access to an instance hosted by our servers.
This utility requires Microsoft Visual C++ 2017 Redistributable Package (x64).
To install this utility, unzip the package to a folder on your computer where it is convenient to run it from a command line.
After that, you need to register a license key (a trial or a permanent one).
When you open the AppSettings.config
file in a text editor, you can see an XML file like this:
<appSettings> <add key="CustomersCanvasUrl" value="https://URL_TO_YOUR_CUSTOMERS_CANVAS_INSTANCE" /> <add key="CustomersCanvasApiKey" value="YOUR_API_KEY_FOR_CUSTOMERS_CANVAS" /> <add key="CombineFiles" value="false"/> <add key="OutputPath" value="./"/> <add key="FileNameTemplate" value="pdf/{state}/{index}_{data.Person Name}.pdf"/> </appSettings>
Here, you need to modify the first two values:
AppSettings.config
of Customer's Canvas as described in the Web API topic.Also, you may want to configure output files:
true
, the utility will create a multipage PDF file (one page = one record); if false
, it will create a separate PDF file for each row of data.In these settings, you can use the following placeholders:
1
), ignored if CombineFiles is true
.true
.For example:
<add key="OutputPath" value="./pdf/"/> <add key="FileNameTemplate" value="{date}/{state}/{index}_{data.Company}.pdf"/>
This will create the following file structure:
. \pdf \2018.11.01 \b3c6f043-8127-4163-9dcd-34301999acc8 \1_Acme.pdf \2_Northwind.pdf ...
In this way, you can organize your orders in a structure that is easy to navigate and understand.
When you allow your customers to use fonts that are not installed on the machine where the VDP Tool is running, it is very important to specify the location of the fonts.
To set up fonts:
fonts
folder in the folder containing vdp.exe
.Aurigma.DesignAtoms.config
file.<add key="FontDirectory" value="C:\vdp\fonts" />
Other settings in Aurigma.DesignAtoms.config
should be the same as in the appropriate config of Customer's Canvas.
If you like, you can add the location of the vdp.exe
file to the PATH environment variable of your system. It will allow you to run vdp.exe
from any location (not just the folder where you install it).
You can perform this optional operation as follows:
User variables
or System variables
. In the former case, it will work only for a current user, in the latter case - globally, for all users on this machine.vdp.exe
is located to the end of this list.Before using vdp.exe
, you (or your users) need to create a design, upload some data and save a state file. As a result, you will have two pieces of data - stateId and userId.
After that, you can proceed in two ways:
vdp.exe
and pass its name to the utility (the local mode).Let's assume you have installed this tool at C:\vdp
. You want to download the state with id 8fed5bc0-4e92-4c9e-b489-afa3a4322a2e from a user named john.
Run this tool with following parameters:
C:\> cd C:\vdp C:\vdp> vdp -s 8fed5bc0-4e92-4c9e-b489-afa3a4322a2e -u john -m online
As a result, this utility renders the personalized product.
Let's assume you have installed this tool at C:\vdp
, downloaded a state file as 8fed5bc0-4e92-4c9e-b489-afa3a4322a2e.st
, and placed this file in the C:\downloads
folder.
Run this tool with following parameters:
C:\> cd C:\vdp C:\vdp> vdp -s ..\downloads\8fed5bc0-4e92-4c9e-b489-afa3a4322a2e.st -m local
Note, you can omit the -m local
key, as the local mode is the default.
If you don't want this tool to output the results, you can turn off the verbose mode by adding the -v false
key.
Just run the tool without any arguments or pass the --help
key. To get a version, pass the --version
key.