Components for Developers
© 2000-2017, Two Pilots

PDF Library   EMF2PDF SDK Pilot   Virtual Printers   HTML2PDF-X Pilot   Converters   PDF Mosaic   Design Service   PDF Rasterizer  
Home Download Pricing FAQ Support How to... Documentation Tutorials Languages Testimonials History

How to create Virtual Printer using: C++ | C# | Delphi | VB.NET | VB 

Two Pilots Virtual Printer
version 8.0

Table of contents

Getting Started

Agent

Agent Settings

Applications

Preprocessor

Preconverter

Postconverter

Application Settings

Converter

Converter Settings

EMF

BMP

PNG

JPEG

TIFF

RAW

INI

FTP

PDF

POS

Redirect

Text

Watermarks

Installation Directory Settings

Properties Dialog Settings

For Developers

Binaries overview

Building MSI package

Using Microsoft Visual Studio

Using Wix tools

Building executable package

NSIS

Inno Setup

The Driver Pipeline

Getting Started

Virtual Printer Driver is a packaged software that allows to convert a printable document to raster or vector formats by printing through a printer driver. To use our driver you need to install it from an MSI package (x86 and x64 builds), the driver supports Windows XP and later. After the installation completed, you can configure various driver settings such as:

For configuration, use Properties utility from the driver group in the Start menu or registry settings.

The main driver setting is a path to the application that is run after each print job processing completed. This application is further reffered as the client application. After a print job is completed, the driver generates the INI file that contains paths to output files (BMP, PDF and so on) and runs the client application passing the INI file path to it using a command line parameter, WM_COPYDATA message or a named pipe.You can set the path to the client application using Properties utility or by setting a registry key.

Agent

Agent is a Windows service which allows to communicate between Virtual Printer Driver and client applications. In services list it named as VPDAgent. By default Agent calls applications with a logged on user permission rights who prints documents. If Virtual Printer Driver shared via local network or domain you should use Allow guest session or Allow domain session options for allowing to call an application with a current logged on user permission rights. If Virtual Printer Driver installed on a print-server and there are no logged on users you should use Allow self session which allows to call applications with Agent service permission rights without any interactives (GUI).


Agent settings are stored in the following registry key:

«HKLM\Software\REGISTRY_ENTRY\Agent»

Agent Settings

HKLM\Software\REGISTRY_ENTRY\Agent

Option name

Type

Description

Value

Default value

Allow guest session

REG_DWORD

This option enables execute applications with current logged on user permission rigths if Guest session was detected.

0 - disable

1 - enable

0

Allow domain session

REG_DWORD

This option enables execute applications with current logged on user permission rights if Domain session was detected.

0 - disable

1 - enable

0

Allow self session

REG_DWORD

This option enables execute applications with the Agent service permission rights (SYSTEM is default) w/o any GUI.

0 - disable

1 - enable

0

Applications

Application is an executable file (exe-file) which called by Agent service during a processing of a print job. There are three types of applications: preprocessor, preconverter and postconverter. Preprocessor allows to handle a print job while it is in a printer queue. Preconverter allows to handle EMF files before processing to other formats. Postconverter allows to handle a result of EMF files processing to BMP, JPEG, TIFF, PNG, TEXT or PDF formats.

Preprocessor

When the driver runs the preprocessor, this information is available:

Using this information the preprocessor can stop or resume a print job. If the print job should be resumed, the preprocessor should put in the ini-file this section:

[Job]

Status = resumed

To cancel the print job, this section:

[Job]

Status = canceled

To enable or disable the preprocessor, you need to set the registry key «Enabled» and restart the service VPDAgent. Service VPDAgent should be configured with using a command:

sc config Agent group= "" depend= Spooler

Preprocessor settings are stored in the following registry key:

«HKLM\Software\REGISTRY_ENTRY\Application\Preprocessor»

Preconverter

Using the preconverter you can modify the print job and alter conversion settings. When the driver runs the preconverter, this information is available:

Using this data the preconverter can stop or resume the print job. To resume the print job the preconverter should put this section in the ini-file:

[Preconverting]

Status = resumed

To cancel the print job, this section:

[Preconverting]

Status = canceled

Preconverter settings are stored in the following registry keys:

«HKCU\Software\REGISTRY_ENTRY\Application\Preconverter»

«HKLM\Software\REGISTRY_ENTRY\Application\Preconverter»

Postconverter

Postconverter (or the client application) is started at the end of the print job processing. When the driver runs the postconverter, this information is available:

Postconverter settings are stored in the following registry keys:

«HKCU\Software\REGISTRY_ENTRY\Application\Postconverter»

«HKLM\Software\REGISTRY_ENTRY\Application\Postconverter»

Application Settings

HKLM\Software\REGISTRY_ENTRY\Application\Preprocessor

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Application\Preconverter

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Application\Postconverter

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables component.

0 - disable

1 - enable

0

Executable File

REG_SZ

Full path to the application.

Transfer Mode

REG_DWORD

Type of the communication between Agent and component application.

0- through the command line

1- through the WM_COPYDATA

2- none

3- through the named pipe

Skip Mode

REG_DWORD

This option enables to skip component application call for EMF/RAW data.

0- allows application call for EMF/RAW

1- disable application call for EMF

2- disable application call for RAW

0

Window Title

REG_SZ

Title of the component application window.

Timeout

REG_DWORD

Timeout value in ms after the component application launch.

Window Class

REG_SZ

Class of the component application window.

Message Id

REG_DWORD

Unique numeric value to identify that the notification message has been received from the printer driver.

For the WM_COPYDATA transfer mode this value represents dwData member of COPYDATASTRUCT structure.

Pipe Name

REG_SZ

Unique pipe name for ini-file transfer to the component application.

Pipe Message Size

REG_DWORD

Pipe message size.

Pipe Launch Application

REG_DWORD

This option allows to launch the component application or skip it.

0- don't launch an application

1- launch an application

Converter

Converter performs conversion of EMF files to BMP, JPEG, TIFF, PNG, TEXT or PDF formats. If a source format is ESC/POS, it is converted to the EMF first, then to other formats. Also converter allow to add graphical and textual watermarks to produced files, redirect a print job to other printer or upload produced files to FTP/SFTP/FTPS server. All produced files are stored in the output directory.

Converter settings are stored in the following registry keys:

«HKCU\Software\REGISTRY_ENTRY\Converter»

«HKLM\Software\REGISTRY_ENTRY\Converter»

Target format settings for BMP, JPEG, TIFF, PNG, TEXT, PDF, POS, FTP, WATERMARKS and REDIRECTION are stored in corresponding subkeys.

Converter Settings

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter

Option name

Type

Description

Value

Default value

Threads

REG_DWORD

This option sets thread pool size for emf2bmp/jpeg/png/tiff/pdf converters.

2

Cleanup Output

REG_DWORD

Cleanup output directory after processing.

0 - do not cleanup

1 - cleanup

0

Show Progress

REG_DWORD

This options enables show or hide progress bar.

0 - disable

1 - enable

1

Output Directory

REG_SZ

Path to the output directory.

EMF

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\EMF

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of BMP files.

0 - disable

1 - enable

0

BMP

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\BMP

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of BMP files.

0 - disable

1 - enable

0

Bits per pixel

REG_DWORD

This option sets color quality (bits per pixel) of BMP images.

1 - 1bpp (black and white)

4 - 4bpp color (16 colors)

8 - 8bpp color (256 colors)

24 - 24bpp

24

Grayscale

REG_DWORD

This option sets BMP to 8bpp grayscale mode. If enabled Bits per pixel parameter is ignored.

0 - grayscale mode off

1 - grayscale mode on

0

Dithering

REG_DWORD

Dithering algorithm to use for conversion of color images to 1-bit black&white images. The algorithms differ by speed and quality.

0 - Floyd-Steinberg

1 - Ordered-Dithering (4x4)

2 - Burkes

3 - Stucki

4 - Jarvis-Judice-Ninke

5 - Sierra

6 - Stevenson-Arce

7 - Bayer (4x4 ordered dithering)

0

PNG

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\PNG

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of PNG files.

0 - disable

1 - enable

0

Bits per pixel

REG_DWORD

This option sets the color quality (bits per pixel) of PNG images.

1 - 1bpp (black and white)

4 - 4bpp color (16 colors)

8 - 8bpp color (256 colors)

24 - 24bpp

24

Grayscale

REG_DWORD

This option sets PNG to 8bpp grayscale mode. If enabled Bits per pixel parameter is ignored.

0 - grayscale mode off

1 - grayscale mode on

0

Dithering

REG_DWORD

Dithering algorithm to use for conversion of color images to 1-bit black&white images. The algorithms differ by speed and quality.

0 - Floyd-Steinberg

1 - Ordered-Dithering (4x4)

2 - Burkes

3 - Stucki

4 - Jarvis-Judice-Ninke

5 - Sierra

6 - Stevenson-Arce

7 - Bayer (4x4 ordered dithering)

0

JPEG

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\JPEG

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of JPEG files.

0 - disable

1 - enable

0

Grayscale

REG_DWORD

This option sets JPEG to the grayscale mode.

0 - grayscale mode off

1 - grayscale mode on

0

Quality

REG_DWORD

This option sets the JPEG quality.

Must be in range from

0 (min size) to

100 (max quality)

80

TIFF

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\TIFF

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of JPEG files.

0 - disable

1 - enable

0

Bits per pixel

REG_DWORD

This option sets the color quality (bits per pixel) of TIFF images.

1 - 1bpp (black and white)

4 - 4bpp color (16 colors)

8 - 8bpp color (256 colors)

24 - 24bpp

24

Grayscale

REG_DWORD

This option sets TIFF to 8bpp grayscale mode. If enabled Bits per pixel parameter is ignored.

0 - grayscale mode off

1 - grayscale mode on

0

Dithering

REG_DWORD

Dithering algorithm to use for conversion of color images to 1-bit black&white images. The algorithms differ by speed and quality.

0 - Floyd-Steinberg

1 - Ordered-Dithering (4x4)

2 - Burkes

3 - Stucki

4 - Jarvis-Judice-Ninke

5 - Sierra

6 - Stevenson-Arce

7 - Bayer (4x4 ordered dithering)

0

Multipage

REG_DWORD

This option enables generation of multipage TIFF file.

0 - separate TIFF file for every printed page

1 - multipage TIFF file

1

Compression

REG_DWORD

This option sets TIFF compression.

0 - Automatic

1 - None

2 - CCITT modified Huffman RLE

3 - CCITT Group 3 fax encoding

4 - CCITT Group 4 fax encoding

5 - Lempel-Ziv & Welch

7 - JPEG DCT compression

8 - Adobe deflate compression

32773 - Macintosh RLE

32946 - Deflate compression

0

RAW

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\RAW

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables RAW-data storing after printing.

0 - disable

1 - enable

0

INI

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\INI

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables INI-file storing after printing.

0 - disable

1 - enable

0

Duplicate

REG_DWORD

Duplicate INI-file to the output directory for futher processing.

0 - do not duplicate

1 - duplicate

0

FTP

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\FTP

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables files upload via FTP.

0 - disable

1 - enable

0

Url

REG_SZ

URL string like «ftp://colorpilot.com».

User Name

REG_SZ

User name.

Password

REG_SZ

Plain-text password.

Upload

REG_SZ

Information string for uploaded files. String value should be in format (TYPE:DIR;)*, where

TYPE: uploaded files type like EMF/BMP/JPEG/PDF/PNG/TXT/TIFF

DIR: target directory for upload. Upload directory should exists.

Sample:

in «HKEY_CURRENT_USER\Software\Company\Printer\Converter\FTP»

Url=«ftp://colorpilot.com»

Upload=«BMP:.» will upload all BMP files to the «ftp://colorpilot.com/./» directory i.e. root directory.

Upload=«BMP:.;JPEG:jpeg;PNG:other/png» will upload all BMP files to the «ftp://colorpilot.com/./» directory, all JPEG files to the «ftp://colorpilot.com/jpeg/» directory and all PNG files to the «ftp://colorpilot.com/other/png/» directory.

Encrypted

REG_DWORD

Does user credentials encrypted with AES algorithm or not.

0 - not encrypted

1 - encrypted

0

Attempts

REG_DWORD

Count of attempts for files upload to the FTP server.

1

Ignore certificate error

REG_DWORD

This option allows to ignore SSL certificate errors for FTPS/SFTP servers with self-signed certificates.

0 - do not ignore

1 - ignore

0

PDF

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\PDF

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of PDF files.

0 - disable

1 - enable

0

Multipage

REG_DWORD

This option enables generation of a multipage PDF file.

0 - separate PDF file for every printed page

1 - multipage PDF file

1

Produce PDFA

REG_DWORD

This option enables producing of PDF-A/b files.

0 - disable

1 - enable

0

Timezone

REG_DWORD

This option allows to set timezone for file creation date .

0 - UTC time

1 - Local time

0

Use mthread

REG_DWORD

This option allows to use a multi-thread PDF converter.

ATTENTION: this will increase PDF convertation speed

and multi-page PDF size.

0 - single thread

1 - multi-thread

1

Page Layout

REG_DWORD

This option allows to set document page layout.

0 - single page

1 - one column

2 - two column left

3 - two column right

4 - two page left

5 - two page right

0

Page Mode

REG_DWORD

This option allows to set document page mode

0 - none

1 - outlines

2 - thumbnail

3 - full screen

4 - optional content

5 - attachments

0

Image Quality

REG_DWORD

This option allows to set image quality for PDF files.

range value from 1 to 100

80

Security Enabled

REG_DWORD

This option enables a password protection of PDF files.

0- disable

1- enable

0

Encryption Level

REG_DWORD

This option allows to set an encryption algorithm for document password.

0 - none

1 - 40-bit RC4

2 - 128-bit RC4

3 - 128-bit AES

4 - 256-bit AES

0

User Password Enabled

REG_DWORD

This option enables user password protection of PDFfiles.

0- disable

1- enable

0

User Password

REG_SZ

User password.

Owner Password Enabled

REG_DWORD

This option enables owner password protection of PDF files.

0- disable

1- enable

0

Owner Password

REG_SZ

Owner password..

Allow Copying

REG_DWORD

Allow copying or extraction a PDF document.

0 - do not allow

1 - allow

0

Allow Commenting

REG_DWORD

Allow form filling, signing or commenting a PDF document.

0 - do not allow

1 - allow

0

Allow Changing

REG_DWORD

Allow changing a PDF document.

0 - do not allow

1 - allow

0

Allow Printing

REG_DWORD

Allow printing a PDF document.

0 - do not allow

1 - allow

0

Title

REG_SZ

PDF document title.

Author

REG_SZ

PDF document author.

Producer

REG_SZ

PDF document producer.

Creator

REG_SZ

PDF document creator.

Subject

REG_SZ

PDF document subject.

Keywords

REG_SZ

PDF document keywords.

Use Document Name

REG_DWORD

Use printed document name instead of a generated name.

0 - use generated name

1 - use printed document name

0

POS

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\POS

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables POS converter.

0 - disable

1 - enable

0

FontA

REG_SZ

Font A name.

Liberation Mono

FontA Size

REG_DWORD

Font A size.

48

FontB

REG_SZ

Font B name.

Liberation Mono

FontB Size

REG_DWORD

Font B size.

34

Skip Header

REG_DWORD

Skip first N bytes from the beginning of a receipt.

0

Redirect

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\Redirect

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables the print redirection.

0- disable

1- enable

0

Spool

REG_DWORD

Redirect a raw spool file to a target printer.

0- spool redirection disabled

1- spool redirection enabled

0

Printer

REG_SZ

Name of printer to redirect to.

Redirect watermarks

REG_DWORD

This option enables watermarking on redirected documents.

0- watermarks disabled

1- watermarks enabled

0

Left Correction

REG_DWORD

Additional left margin in device units.

0

Top Correction

REG_DWORD

Additional top margin in device units.

0

Right Correction

REG_DWORD

Additional right margin.in device units.

0

Bottom Correction

REG_DWROD

Additional bottom margin in device units.

0

Text

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\TEXT

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables producing of TXT files.

0- disable

1- enable

0

Multipage

REG_DWORD

This option enables generation of a multipage TXT file.

0 - separate TXT file for every printed page

1 - multipage TXT file

1

Encoding

REG_DWORD

This options sets text encoding.

0 - ANSI

1 - Unicode

2 - UTF-8

0

Write BOM

REG_DWORD

This option sets writing of byte-order mark (BOM) at the beginning of Unicode and UTF-8 encoded text file.

0 - BOM off

1 - BOM on

0

Adobe embed fix

REG_DWORD

This option enables to encode glyphs for Adobe embed fonts.

0 - disable

1 - enable

0

Line concatination inteval

REG_DWORD

This option allows to set a width of an interval on axis OY in which two words are in a single line.

5

Word separation interval

REG_DWORD

This option allows to set a minimal separator width betwen two neighboring words.

1

Debug

REG_DWORD

This option allows to print tokens information at the end of text file.

0 - disable

1 - enable

0

Keep formatting

REG_DWORD

This option allows to keep an original document formatting.

0 - do not keep formatting

1- keep formatting

1

Default Bidirectional Algorithm

REG_DWORD

This option allows to use default bidirectional algorithm.

0 - use inbuild BIDI algorithm

1 - use default BIDI algorithm

0

Watermarks

{HKLM, HKCU}\Software\REGISTRY_ENTRY\Converter\Watermarks

Option name

Type

Description

Value

Default value

Enabled

REG_DWORD

This option enables watermarks.

0- watermarks disabled

1- watermarks enabled

0

General watermark settings are stored in the following registry key:

Converter\Watermarks\WatermarkID, where WateramarkID is a unique name of a watermark.

Type

REG_DWORD

Watermark type.

0 - image watermark

1 - textual watermark

Left offset

REG_DWORD

Offset from the left border in logical units.

Right offset

REG_DWORD

Offset from the right border in logical units.

Top offset

REG_DWORD

Offset from the top border in logical units.

Bottom offset

REG_DWORD

Offset from the bottom border in logical units.

Position mode

REG_DWORD

Position of an origin on a page.

0 - left-top corner of a page

1 - left-bottom corner of a page

2 - right-top corner of a page

3 - right-bottom corner of a page

4 - at the center of a page

Image watermark settings

Image path

(Image watermark only)

REG_SZ

Full qualified path to an image watermark.

Fill mode

(Image watermark only)

REG_SZ

Image position on a page.

0 - none

1 - fill

2 - fit

3 - stretch

4 - title

5 - center

Textual watermark settings

Text

(Textual watermark only)

REG_SZ

Text watermark message.

Horizontal Alignment

(Textual watermark only)

REG_DWORD

Text horizontal alignment on a page.

0 - left

1 - center

2 - right

Vertical Alignment

(Textual watermark only)

REG_DWORD

Text vertical alignment on a page.

0 - top

1 - center

2 - bottom

Color

(Textual watermark only)

REG_DWORD

Text color in 0xBBGGRR format, where

BB - blue channel

GG - green channel

RR - red channel

Font Name

(Textual watermark only)

REG_SZ

Text font name.

Font Height

(Textual watermark only)

REG_DWORD

Text font height.

Font Width

(Textual watermark only)

REG_DWORD

Text font width.

Rotation

(Textual watermark only)

REG_DWORD

Text counterclockwise rotation angel in degreese.

Installation Directory Settings

HKLM\Software\REGISTRY_ENTRY

Option name

Type

Description

Value

Default value

Installation Directory

REG_SZ

Full qualified path to the driver installation directory.

Properties Dialog Settings

{HKLM, HKCU}\Software\REGISTRY_ENTRY

Option name

Type

Description

Value

Default value

About: Hide page

REG_DWORD

Hide About property page.

0 - show

1 - hide

0

Additional: Hide page

REG_DWORD

Hide Additional property page.

0 - show

1 - hide

0

Application: Hide page

REG_DWORD

Hide Application property page.

0 - show

1 - hide

0

BMP: Hide page

REG_DWORD

Hide BMP property page.

0 - show

1 - hide

0

EMF: Hide page

REG_DWORD

Hide EMF property page.

0 - show

1 - hide

1

JPEG: Hide page

REG_DWORD

Hide JPEG property page.

0 - show

1 - hide

0

PDF: Hide page

REG_DWORD

Hide PDF property page.

0 - show

1 - hide

0

PNG: Hide page

REG_DWORD

Hide PNG property page.

0 - show

1 - hide

0

Redirect: Hide page

REG_DWORD

Hide Redirect property page.

0 - show

1 - hide

0

TIFF: Hide page

REG_DWORD

Hide TIFF property page.

0 - show

1 - hide

0

TXT: Hide page

REG_DWORD

Hide TXT property page.

0 - show

1 - hide

0

Version

REG_SZ

Product version info for About property page..

For Developers

For developers we provide a full set of files and scripts for building their own installation package or incorporate Virtual Printer Driver to their products. We provide set of installation scripts for Wix Toolset and NSIS + Inno Setup. You will receive your developers package (a.k.a. Devkit) after purchase the Virtual Printer Driver. For tests we provide Devkit for our demo build of Virtual Printer Driver (x86 and x64 builds). Inside the Devkit you will find the next directories:

Binaries overview

Here is a short description of Virtual Printer Driver and Devkit components.

files_full and files_full_x64 directories

Component name

Description

EMF2PDF.dll

Our library that provide EMF to PDF convertation. If you do not required in the PDF format you can skip this file in your installation scripts.

fwproc.exe / fwproc_x64.exe

Sends WM_COPYDATA notification to the target application.

Make.iss / Make_x64.iss

Inno Setup installation scripts.

MessageBox.exe / MessageBox_x64.exe

Shows standard Windows message box.

Microsoft_VC100_CRT_x86.msm /

Microsoft_VC100_CRT_x64.msm

Merge modules for Microsoft Visual C++ 2010 Redistributable Package. It uses in MSI package for installing required C-runtime libraries.

pdfmerger.dll

Our library that provides merging for PDF files into one. If you do not required in the PDF format you can skip this file in your installation scripts.

printer.ico

Icon file.

progress.exe

Shows progress during the files convertation.

properties.exe

Shows settings dialog for VPD.

README.pdf

This file.

SampleClient.exe / SampleClient_x64.exe

Sample client application that shows content of INI file after processing. You should use this sample as a start point of your application. Source code for this application available here:

setupdrv.exe

Installs driver components of VPD.

SetupPrn.nsi / SetupPrn_x64.nsi

NSIS installation scripts.

srvinst.exe / srvinst_x64.exe

Installs VPDAgent service.

stdnames_7x{32, 64}.gpd

${PREFIX}.gpd

${PREFIX}.ini

${PREFIX}pm.dll

${PREFIX}ui.dll

unidrv_7x{32, 64}.dll

unidrv_7x{32, 64}.hlp

unidrvui_7x{32, 64}.dll

unires_7x{32, 64}.dll

VPD components that allows to install VPD as a printer driver. ${PREFIX} is a custom file prefix, for example, for our demo build it equals to «tpdps».

${PREFIX}.lng

Localization file for properties.exe tool. You can add or remove localization language here.

vcredist_2010_x86.exe / vcredist_2010_x64.exe

Microsoft Visual C++ 2010 Redistributable Package. It uses in NSIS scripts for installing required C-runtime libraries.

vpd_sdk.dll

Our SDK that provides API for Virtual Printer Driver settings. You can find source code for C++ in Devkit.

VPDAgent.exe / VPDAgent_x64.exe

Windows service with name VPDAgent.

vpdisp.exe

Converter tool for converting EMF files to raster or vector formats.

msi_installer directory

Component

Description

VPDInstaller.sln

Microsoft Visual Studio solution for building MSI package. Wix Toolset required.

License.rtf

Our license file. You should replace it with your own or skip it.

make_msi_x86.bat / make_msi_x64.bat

Batch files for building MSI package with using tools from Wix Toolset.

VPDInstaller.wixproj

Microsoft Visual Studio project for MSI package. Wix Toolset required.

Config.wxi

Product.wxs

ProductComponents.wxs

ProductTempComponents.wxs

RegistrySettings.wxs

Shortcuts.wxs

Wix Toolset installation scripts.

vpd_sdk directory

Component name

Description

vpd_sdk.sln

Microsoft Visual Studio solution for VPD SDK.

doc/doxygen.config

Doxygen config for building VPD SDK documentation.

include/*.h

C++ header files.

source/*.cpp

C++ source files.

vpd_sdk/vpd_sdk.vcxproj

Microsoft Visual Studio project for VPD SDK.

vpd_sdk_test/*

Unit tests for VPD SDK. Googletest required.

Building MSI package

We provide sample scripts for building MSI package with using Wix Toolset. You should download and install Wix Toolset package. For this tutorial we use Wix v3.8 (Stable) version. Online documentation for Wix Toolet v3.* available here.

There are two ways of building MSI package:

Using Microsoft Visual Studio

Here is a short brief of building our sample with using Microsoft Visual Studio. The detailed documentation «Working in Visual Studio» availabe here.

Before starting you should install Wix Toolset and Wix Visual Studio Plugin. Open «msi_intaller/VPDInstaller.sln» solution in your Devkit package with using Microsoft Visual Studio. Specify target platform «x86» or «x64» in Solution Platforms and build Wix project via «Build → Build Solution». The result MSI package will placed to «msi_installer/VPDIntaller/bin» directory.

Using Wix tools

Here is short brief of building our sample with using Wix tools. The detailed documentation «Tools and concepts» available here.

Before starting you should install Wix Toolset. Open directory «msi_installer/VPDInstaller» in your Devkit package. Here you will find two Batch files «make_msi_x86.bat» and «make_msi_x64.bat» which builds MSI package for x86 and x64 platforms respectively and place it to the «msi_intaller/VPDInstaller/bin» directory.

Building executable package

We provide sample scripts for building executable installation package with using NSIS and Inno Setup installers. For this tutorial we use NSIS v2.46 and Inno Setup 5.5.4 versions.

Before starting you should install NSIS and Inno Setup installers. For building installation package for x86 platform, you should use files and scripts from the «files_full» directory of your Devkit package. For x64 platform you should use files and scripts from the «files_full_x64» directory. Later in the text we will refer to files from «files_full» directory. You can apply the same things to the files from the «files_full_x64» directory.

NSIS

Open «SetupPrn.nsi» in the favorite text editor and look at the two lines at the beginning of the file:

!define PRINTER_NAME "Your printer name"

!define PREFIX "Your file prefix"

Here you should change PRINTER_NAME and PREFIX defines to your specified. PRINTER_NAME is a printer name which you have selected after purchace, for demo build you should set it to «Two Pilots Demo Printer»:

!define PRINTER_NAME "Two Pilots Demo Printer"

The next, you should set PREFIX to your file prefix. Look at the .gpd or .ini file in the «files_full» directory and place its name as PREFIX. For example, demo build has «tpdps.gpd» and «tpdps.ini» files, so, PREFIX should be «tpdps»:

!define PREFIX «tpdps»

Save changes and close «SetupPrn.nsi» file. Now, run «makensisw.exe» from the NSIS installation directory and select «SetupPrn.nsi» script from «File → Load script», NSIS will compile script. If all is correct you will receive «SetupPrn.exe» file in the «files_full» directory. Now you are ready to build Inno Setup script.

Inno Setup

Before starting you should build «SetupPrn.nsi» script. See previous section.

Open «Make.iss» with using Inno Setup Compiler («Compil32.exe» in the Inno Setup installation Directory) and look at the two lines at the beginning of the file:

#define PRINTER_NAME "Your printer name"

#define REGISTRY_KEY "Your registry key"

Here you should change PRINTER_NAME and REGISTRY_KEY defines to your specified.

PRINTER_NAME is a printer name which you have selected after purchace, for demo build you should set it to «Two Pilots Demo Printer». This is the same name as in the «SetupPrn.nsi» script.

#define PRINTER_NAME "Two Pilots Demo Printer"

REGISTRY_KEY is a registry key for storing VPD setting in the registry which you have selected after purchace, for demo build you should set it to «Two Pilots Demo Printer»:

#define REGISTRY_KEY "Two Pilots Demo Printer"

Save changes and compile script «Build → Compile» in the «Inno Setup Compiler». If all is correct, you will receive «sample_installation.exe» in the «Output» directory. This file you can provide to your customers.

The Driver Pipeline

How to create Virtual Printer using: C++ | C# | Delphi | VB.NET | VB 

Home Download Pricing FAQ Support How to... Documentation Tutorials Languages Testimonials History

 

PDF Library | PDF Rasterizer | Virtual Printers | Converters
Help Creator | Web Form Maker | Design Service

Support | Blog | Forum | Press
Contacts | About | Site map

© 2000-2017, Two Pilots