Adding the PDFCreator .NET library to your application

The first step to start using the PDFCreator library with your application is to reference the acPDFCreatorLib.Net.dll assembly.

To add the new reference:

  1. Open the solution explorer window.

  2. Right-click on References and select Add new reference.

Figure: Adding a reference in the Solution Explorer Window

 

Figure: Visual Studio Add Reference Dialog

This will result in having the DLL copied to your application’s executables directory.

 

The DLL needs the Assembly called System.Windows.Forms to be included too.

Once the reference to the assembly is added, you can use it in any of your modules by adding:

Imports Amyuni.PDFCreator   ' in Visual Basic .NET
using Amyuni.PDFCreator;   // in C#

The assembly needs to be initialized before any object is referenced. The assembly also needs to be uninitialized before exiting your application to free any internal resources used by the library.

Initialization is done by calling:

acPDFCreatorLib.Initialize()   ' in Visual Basic .NET
acPDFCreatorLib.Initialize();   // in C#

Before terminating the application, the developer should call:

acPDFCreatorLib.Terminate()   ' in Visual Basic .NET
acPDFCreatorLib.Terminate();   // in C#