Components for Developers
© 2000-2017, Two Pilots

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

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

Virtual Printer Tutorials: Collecting multiple documents - implementation

 

This application will be easy too. It looks like this:

Documents collection application

When you hit the "Add to Collection" button, a file will be transfered from the "Printed document files" area to the "Files in documents collection" listbox and will be copied to the ..Local Settings\Application Data directory.

Here is a class diagram which shows all the relations between program classes:

Class diagram

A new class here is CollectionManager. It handles all collection-related functions such as manage printed document files and manage INI file.

As a part of its functionality, it generates the GUID. To generate a GUID in C# and VB.NET is very easy:

in C#:

string strGuid = Guid.NewGuid().ToString();

in VB.NET :

Dim strGUID As String = Guid.NewGuid.ToString;

But if you're using VB6, you have to use a special wrapper around the Win32 API function CoCreateGuid. You can find this wrapper in a module GUID.bas

A second VB6 feature is getting full path to the ..Local Settings\Application Data directory.
.NET languages have a special function for this. Here is an example in C#:

string strLocalApplicationData =
	Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

In VB6, you can use the wrapper around the Win32 API function SHGetSpecialFolderPath. You can find it in a module GetSpecialFolder.bas.

To test, open the solution and select Debug->Start Debugging from the menu. The path to the prepared printer test INI file will be passed to the application by the debugger.

 

Download Collecting Multiple Documents:
Virtual Printer for C#/C++, VB6/VB.NET

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 | EMF2PDF SDK Pilot | Virtual Printers
HTML2PDF-X Pilot | Converters | PDF Mosaic

Support | Blog
Contact | About | Site map

© 2000-2017, Two Pilots