Deployment

Top  Previous  Next

You are here: Gnostice PDFOne .NET Developer Guide > Deployment

 

Deployment

In this topic, you will learn about:

files installed by PDFOne .NET

files that need to be deployed by your

oWindows applications created using PDFOne .NET

Files Installed By PDFOne .NET Installer

You will find the following files in the "Bin" folder of the PDFOne .NET installation folder.

1.Gnostice.PDFOne.dll - This PDFOne .NET component contains PDFDocument and other classes used for creating, reading, and writing PDF documents.

2.Gnostice.PDFOne.Windows.PDFViewer.dll - This is the PDF viewer component of PDFOne .NET. This is a Windows control and cannot be used as a Web control.

3.Gnostice.PDFOne.PDFPrinter.dll - This is the PDF printer component of PDFOne .NET.

4.Gnostice.PDFOne.Windows.PDFBookmarks.dll - This is the PDF bookmarks tree component of PDFOne .NET. This is a Windows control and cannot be used as a Web control.

Files That Need To Be Deployed For Your WinForms Applications

When you create an application using PDFOne .NET and want to run it on a computer where Gnostice PDFOne .NET is not installed, then:

1.You need to ensure that your license key is available to your application as well. The procedure for this is dependent on how you activated the license key during development.

oIf you had activated your PDFOne .NET license by dragging the PDFDocument component to a form and then entered the license key in the Install Gnostice PDFOne .NET License dialog, then PDFOne .NET would have created a Gnostice.PDFOne.PDFDocument.lic file in the folder where the DLL is kept. It would have also created a licenses.licx file in the application's Properties folder. The licenses.licx will be automatically added to your project as an embedded resource. You need to ensure that your application is built with this embedded resource. DO NOT, under any circumstances, distribute the Gnostice.PDFOne.PDFDocument.lic file.

oAlternatively, you can activate your license using the PDFDocument Constructor(String) overload.

2.If your application uses PDFViewer, PDFPrinter, and PDFBookmarks components, then each instance of these components need to be created using the respective Constructor(String) overload with your license key as the parameter. When you drag and drop these components on a form, the InitializeComponent() method will use the zero-argument default constructor. You need to modify those constructors to provide the license key. For example, in the designer code of your form, you may find the default constructors in the InitializeComponent() method like this:

 

...

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

   System.ComponentModel.ComponentResourceManager resources = new

     System.ComponentModel.ComponentResourceManager(typeof(Form1));

  this.pdfPrinter1 = new Gnostice.PDFOne.PDFPrinter.PDFPrinter();

  this.pdfViewer1 = new Gnostice.PDFOne.Windows.PDFViewer.PDFViewer();

   ...

}

Modify them like this:

 

...

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

   System.ComponentModel.ComponentResourceManager resources = new

     System.ComponentModel.ComponentResourceManager(typeof(Form1));

  this.pdfPrinter1 = new Gnostice.PDFOne.PDFPrinter.PDFPrinter("your-license-key");

  this.pdfViewer1 = new Gnostice.PDFOne.Windows.PDFViewer.PDFViewer("your-license-key");

  this.SuspendLayout();

   ...

}

If you are instantiating these components through code, then just ensure you always use the correct constructor. As you are providing the license key through code in both of these cases, you do not have to build your application with the licenses.licx file.

btn_collapse_2Links

Gnostice PDFOne .NET Developer Guide