Please enable JavaScript to view this site.

TIFF Image Printer

The IPNSession object is the starting point for working with the PNSrv12 COM object. It is associated with a single PEERNET printer, and creates a pool of one or more printers as defined using the SetSessionPrinter method.

The IPNSession object also holds the settings used to control each print job's output. These settings are first determined by the conversion profile passed in to either SetSessionPrinter at the beginning, or passed to SetPrinterProfile on a per file basis. The settings can be further modified using the property methods listed in the table below. Not all methods are valid for all printers.

If no conversion profile is specified, the default system conversion profile for the printer is used.

The printer settings must be set before calling NewPrintSession to get an IPNPrintSession object for printing. The IPNPrintSession object returned contains a copy of the settings from the IPNSession object and is associated with a single non-busy printer from the pool of printers. A new IPNPrintSession object is needed for each document printed.

To further control the print and conversion process, there are several events that are fired that enable an application to intercept and apply specific custom logic. For example, the OnGetNextFileName event can be used to further customize the filename used to store the output file.

There are two main groups of methods for the IPNSession object. The first group, the initialization methods, are methods used to initialize the object and provide access to top-level objects. For example,NewPrintSession returns an IPNPrintSession object. The property methods, the second group of methods, are used to modify the settings for the print jobs over and above the settings in the conversion profile.

Optionally, you can choose to track job information as the documents are printed. This option is off by default and can be turned on by setting the IPNSession property TrackingOn to TRUE. When job tracking is enabled, the Jobs property, an IPNJobs collection, is populated with an IPNJob object for every print job processed.

Breaking Changes

Initialization Methods

Job Tracking Methods

Property Setting Methods

Properties

Events

Breaking Changes

The following methods, properties, events and enumerations have been removed as of PNSrvLib12.

AddSessionPrinter

NewPrintSessionEx

EnableControlStrings

ForcePrinterColorMode, ForcePrinterOrientation, ForcePrinterPaperSize, ForcePrinterResolution

SetCompressionOptions

SetDevmodeSettings

SetEmailMessageOptions,  SetEmailOn, SetEmailService, SetMAPIEmailService, SetSMTPEmailService, SetVIMEmailService

SetErrorReporting

SetFileNamingOptions

SetLandscapeWatermarkOptions, SetPortraitWatermarkOptions, SetWatermarkOptionsOn

SetMessageBoxAlerts

SetNamingProfileFormat

SetPDFFileFormatOptions

SetRunAtStartCommand, SetRunAtFileCloseCommand, SetRunAtPageCommand,SetRunAtEndCommand

SetUserExit32, SetUserExit64

SetUserVariable

All clear properties methods (methods starting with Clear***)

OnStartPage, OnEndPage events

OnStartImage,OnEndImage events

Initialization Methods

SetSessionPrinter

Initializes the IPNSession object to work with a particular printer.

SetPrinterProfile

Sets the printer profile that contains the settings that the IPNPrintSession printers will use when converting files.

NewPrintSession

Replaces the previous NewPrintSession and NewPrintSessionEx methods; returns a new instance of an IPNPrintSession object for printing.

Job Tracking Methods

Reset

Clears any accumulated job information when job information is being tracked.

WaitForCompletion

Waits a given timeout period for all jobs in all print sessions to be completed before returning control back to the calling application.

Property Methods

GetProperty

Retrieves settings from the printer using a keyword string.

SetProperty

Set individual printer settings using section and property names. See each individual set options call for a list of section and property names for each call.

SetCustomPaperOn

Enable or disable any custom paper size set.

SetCustomPaperOptions

Set or clear custom paper size options. Custom paper must be enabled using SetCustomPaperOn for these options to be used.

SetFaxModeOn

Enable or disable fax mode.

SetFaxOptions

Sets or clears fax options. Fax mode must be enabled by calling SetFaxModeOn for these options to be used.

SetHardwareMargins

Set or clear printer hardware margins.

SetImageCopyToOn

Enable or disabled image copy to options.

SetImageCopyToOptions

Set or clear image copy options. Image Copy To options must be enabled by calling SetImageCopyToOn for these options to be applied.

SetJPEGCompressionOptions

Sets or clears the color and greyscale compression options for creating JPEG files, or JPEG-compressed TIFF or PDF files.

SetPageBrightness

Set and clear any page brightness options.

SetPageCropAreaOptions

Set and clear any page cropping area options. Page cropping must be enabled by calling SetPageCropOn for these options to be applied. Only one of SetPageCropAreaOptions or SetPageCropMarginOptions can be set at any one time. Whichever method is last called determines whether margins or a page area is cropped.

SetPageCropMarginOptions

Set and clear any page cropping margin options. Page cropping must be enabled by calling SetPageCropOn for these options to be applied. Only one of SetPageCropAreaOptions or SetPageCropMarginOptions can be set at any one time. Whichever method is last called determines whether margins or a page area is cropped.

SetPageCropOn

Enable or disable page cropping options.

SetPageRotationOptions

Set or clear page rotation options for portrait and landscape pages.

SetPageTrimOptions

Set or clear page trimming options

SetPDFCompressionOptions

Set or clear PDF compression options for color. indexed, greyscale and monochrome images.

SetPDFPassword

Sets or clears the password options for PDF files.

SetPDFSecurity

Sets or clears the security options for PDF files.

SetResamplingOn

Enable or disable resampling options.

SetResamplingOptions

Set or clear resampling options. Resampling must be enabled by calling SetResamplingOn for these options to be applied.

SetSaveOptions

Set or clear file location and base file naming options, as well as append, prompting and overwrite options.

SetSaveOptionsOutputLocationAndOutputFileName

Set or clear file location and base file naming options.

SetSaveOptionsOutputResolution

Set or clear output resolution options.

SetTextExtractionOn

Enable or disable the text extraction options.

SetTextExtractionOptions

Set or clear the text extraction options. Text extraction must be enabled by calling SetTextExtractionOn for these options to be applied.

SetTIFFAdvancedOptions

Set or clear TIFF options such as fill order, photometric and byte alignment.

SetTIFFCompressionOptions

Set or clear TIFF compression options for color, indexed, greyscale and monochrome images.

Properties

Jobs

Read-only; A collection of IPNJob objects, one for each file printed.

TrackingOn

Read/Write; A boolean flag to turn job information tracking on or off.

Events

OnGetNextFileName

This event is fired each time a filename is needed, allowing full customization of the output file names.

OnStartJob, OnEndJob

Event is fired when a new print job has entered or exited the print queue.

OnOpenFile, OnCloseFile

This event is fired each time a new output file is opened or closed.

OnReportError

This event is fired when an error is reported by the driver.

OnLogMessage

This event is fired when an informational message is reported by the driver.