Winform Reports for .NET
   Home
   Product Comparison
   Products
     PrintForm .NET
     PrintControls .NET
     PrintAdapters .NET
     PrintPreviewDialog .NET
     Localizer ASP.NET
     WebExtenders ASP.NET
   Downloads
     Free Trial Versions
     Upgrades
   Documents & Papers
   Purchase
   Support Index
   Press Releases
   Contact Us
   Privacy Statement
Enter your email and click 'Join List' to be kept up to date with latest releases and Tips and Tricks...

 
Click here to take the PrintForm.NET Tour
Note: the PrintForm walkthrough requires a Java Plug-in of version 1.3.1 or above. To view the walkthrough now click here.
Go to TMG Development Ltd Website
Microsoft Certified Partner
PrintAdapters FAQ for Versions 2.0.1.2 and Earlier

ID: W3200002

 

Installation and Getting Started
  Are there any prerequisites for installing PrintAdapters.NET?
  How do I add a PrintAdapters component to my Form?

Licensing and Upgrading
  When I received my Product License Code by email it was split over two lines - what does this mean?
  I've entered my license code but I still get a licensing exception when I run my program ("An unhandled exception of type 'System.ComponentModel.LicenseException' occurred in system.dll ..." etc)
  When I upgraded to PrintAdapters v2 I got an error when I tried to rebuild my project similar to the following: "Reference required to assembly 'PrintChaining' containing the implemented interface 'TMGDevelopment.Printing.IChainedDocument'. Add one to your project."
  I get a Licensing Exception when I run a managed Visual C++ application using PrintAdapters

Distributing PrintAdapters with Your Application
  PrintAdapters files to distribute at runtime

Top of PageInstallation and Getting Started


Are there any prerequisites for installing PrintAdapters.NET?
You need the .NET runtime Release 1. When installing you must be logged in as an Administrator.

How do I add a PrintAdapters component to my Form?
After you have installed the PrintAdapters component library you will need to add the individual components to your toolbox so that you can then drop them onto your Form. The following procedure describes how to do this:
1) Open the Visual Studio .NET editor.
2) Right click on the 'General' tab of the Toolbox, and select 'Customise Toolbox...'. (You may alternatively add it to the Windows Forms tab, or create a new tab).
3) Select the .NET Framework Components tab of the Customise Toolbox Dialog and scroll down until you find 'PrintListView', 'PrintRichTextBox' and 'PrintTreeView'; check these and click OK.
You should now be able to drag any of these three components from the General Tab of the Toolbox onto your Form's Component tray.

Top of PageLicensing


When I received my Product License Code by email it was split over two lines - what does this mean?

The product license code you have received is valid, but can sometimes be wrapped onto a second line when displayed in your email program. You must treat both lines of the key as a single block. If you accidentally only entered part of the code into PrintAdapters during the installation process you can manually enter it again by going to the Start Menu > PrintAdapters for .NET > Register PrintAdapters. Then we recommend you cut and paste the first line from the email into the textbox then cut and paste the final part of the key from th e second line on the end - make sure there is no space between them. (See also item 1 below if you are using Outlook XP - it may be corrupting the text in your email).

I've entered my license code but I still get a licensing exception when I run my program
If after installing the full version of PrintAdapters and entering your Product License Code (see registration faq) you still get a licensing exception when you run your application it is most likely due to one of the following:
1) You may be reading your email using Outlook XP. There is a bug in Outlook XP (MSKB:Q287816) which causes the Product License Code line to become corrupted. To resolve this click on 'Format-Unwrap Text' on the menu bar, or click on the link at the top of the email that says 'Extra line breaks in this message were removed. To restore, click here', and try entering the License Code again.
2) There is a bug in Visual Studio .NET 2002 causing this kind of problem with projects or solutions that have spaces in their names. Make sure your solution and project names don't contain any spaces.
3) Visual Studio .NET sometimes caches invalid licensing information (ie it may still be using the Trial version license). To resolve this close all the windows in Visual Studio .NET and do a rebuild all of your project.
4) If none of the above succeed you can try deleting the .licenses file associated with your project. This can be found in the obj\Debug or obj\Release folder underneath your project folder. Alternatively you can just delete the obj folder altogether as it will be regenerated when you do a rebuild.
Advanced: It is also possible to get this kind of licensing error if you build Forms referencing PrintAdapters into a class library (.dll) project. In this case it is the calling application (the .exe) that must be able to supply the PrintAdapters license, and unless the exe itself has a reference to PrintAdapters the compiler won't bind the PrintAdapters license into the exe. The simplest solution here is to add a PrintAdapters component to one of the Forms in your main application, which will cause the correct entry to be added to the licenses.licx file. Alternatively you can add a line containing 'TMGDevelopment.PrintAdapters.PrintListView, PrintAdapters' (without the quotes) to your project's licenses.licx file manually.

When I upgraded to PrintAdapters v2 I got an error when I tried to rebuild my project similar to the following: "Reference required to assembly 'PrintChaining' containing the implemented interface 'TMGDevelopment.Printing.IChainedDocument'. Add one to your project."
PrintAdapters from version 2.0 onwards has a dependency on the extra shared assembly PrintChaining.dll. To recompile your project you must add a reference to PrintChaining to your project: right click on 'References' in the Solution Explorer>select 'Add Reference'>on the .NET tab scroll down and select PrintChaining. You will also need to deploy PrintChaining.dll with your application that uses PrintAdapters.

I get a Licensing Exception when I run a managed Visual C++ application using PrintAdapters
Unfortunately C++ in Visual Studio 2019 doesn't provide nearly as much support for the .NET component licensing process as C# or VB.NET, with regard to creating the licenses file for a licensed control and binding it into the executable - you have to do most of it yourself. Here are the steps you must follow:
1. Open a Visual Studio 2019 command prompt
2. Change directory to your project folder (where the licenses.licx file is)
3. Run the following command to generate the .licenses file
lc /target:<your exe filename.exe> /complist:licenses.licx /i:PrintAdapters.dll
4. This generates a file called <your exe filename.exe>.licenses in the project folder
5. In Visual Studio, right click on the project in the Solution Explorer and select Properties>Linker>Input>Embed Managed Resource File and enter the filename of the .licenses file
6. When you rebuild the solution the .licenses file will be embedded in the .exe manifest and the component should be able to read it at runtime
Note: you only need to generate this once for a given project, but it is specific to the project (the licenses file contains a reference to <your exe filename.exe> and won't work with any other project.

Top of PageDistributing PrintAdapters with Your Application


PrintAdapters files to distribute at runtime
You need to distribute the printadapters and printchaining assemblies with your application. There are several ways to locate the correct assemblies:
1. The easiest way to do this is to build an installer project for your app and it will automatically pull in the correct versions.
2. Another way is to set copy local to true for the printadapters and printchaining references in your project, this will cause vs.net to copy them through to your bin directory and you can pick them up from there with your .exe and copy them to the same location as your exe on the target machine.
3. The final way is to copy them manually from their instralled locations under Program Files on your development machine, which are usually:
C:\Program Files\TMG Development Ltd\PrintAdapters Printing Components\bin\printadapters.dll
C:\Program Files\Common Files\TMG Development Ltd\PrintChaining\1.0.0.0\printchaining.dll

Whichever way you do it, you only need these 2 dlls, and they need to go in the same forlder as your application exe on the target machine.