Please enable JavaScript to view this site.

TIFF Image Printer

This version of the TIFF Image Printer brings with it major changes and improvements to how the printer operates and how to interact with the printer to control the printer settings.

The PNSrv12 COM object has been updated to support these changes and simplified to make it easier to program. Many methods that you may have used in the past may have been changed or made obsolete and removed.

The biggest change is the move to use conversion profiles to control the printer settings. In the past, the settings were initialized by calling various methods on the COM object; now settings are initialized with a single call passing in the path to the desired conversion profile.

The settings can be set a single time when the printer pool is created, or multiple conversion profiles can be used to modify the settings on a per-document basis.

Conversion profiles are created using the new Profile Manager utility, a GUI-based application that makes creating, saving and exporting profiles easy. These exported profiles can then be stored with your custom application and used to control the conversion settings.

Migrating to PNSrv12Lib

If you need to migrate existing applications that use earlier versions of TIFF Image Printer and the COM automation interface, the following steps outline what you need to change in your code.

1. Updating the References in Your Application

The first step is to update the references in your application to PNSrv12Lib.

 

1.Find and delete the old reference from your project.

DeleteOldReference

 

2.Right click on the References node and select Add Reference...

AddRefContextMenu

 

3.From the Add Reference dialog, select PNSrv12 1.0 Type Library.

SelectNewReference

2. Update any using Statements

Any using statements (for C#) or Imports statements (for VB) must be updated to reference PNSrv12Lib.

C#

// Update to use the new version
// using PNSrv11Lib
using PNSrv12Lib;

Visual Basic

' Update to use the new version
' Imports PNSrv11Lib 
Imports PNSrv12Lib

3. Updating the SetSessionPrinter call

Any calls to SetSessionPrinter need to be modified to use the new printer name and the new arguments added in version 12.

A process ID must now be passed to the COM object. It is used to monitor the running process to ensure all COM objects, references and printers are cleaned up if the current owner process unexpectedly crashes or is terminated.

An optional prefix can be used when naming the GUID-named printers in the printer pool for easy recognition.

The last argument is the path to an exported conversion profile containing the settings you wish use. This can be overridden later using SetPrinterProfile or the property methods.

C#

PNSession session = new PNSession();

int pID = Process.GetCurrentProcess().Id;

 

session.SetSessionPrinter(pID, "TIFF Image Printer 12", 2, "Converter-",

                         "C:\Profiles\FaxTIFF.pntifprofile");

 

Visual Basic

Dim session As PNSession = New PNSession

Dim pID As Integer = Process.GetCurrentProcess().Id

 

session.SetSessionPrinter(pID, "TIFF Image Printer 12", 2, "Converter-",

                        "C:\Profiles\FaxTIFF.pntifprofile")

 

4. Updating and Replacing any Deprecated Methods

With the release of PNSrv12Lib many IPNSession and INPrintSession methods have been removed or changed. Some classes and enumerations have also been removed. You may find that your previous code will no longer compile.

The following list contains links to what has changed. The included C# samples also show the programing changes introduced with PNSrv12Lib.

Obsolete Classes and Enumerations

IPNSession Changes