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.
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
Initializes the IPNSession object to work with a particular printer.
Sets the printer profile that contains the settings that the IPNPrintSession printers will use when converting files.
Replaces the previous NewPrintSession and NewPrintSessionEx methods; returns a new instance of an IPNPrintSession object for printing.
Clears any accumulated job information when job information is being tracked.
Waits a given timeout period for all jobs in all print sessions to be completed before returning control back to the calling application.
Retrieves settings from the printer using a keyword string.
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.
Enable or disable any custom paper size set.
Set or clear custom paper size options. Custom paper must be enabled using SetCustomPaperOn for these options to be used.
Enable or disable fax mode.
Sets or clears fax options. Fax mode must be enabled by calling SetFaxModeOn for these options to be used.
Set or clear printer hardware margins.
Enable or disabled image copy to options.
Set or clear image copy options. Image Copy To options must be enabled by calling SetImageCopyToOn for these options to be applied.
Sets or clears the color and greyscale compression options for creating JPEG files, or JPEG-compressed TIFF or PDF files.
Set and clear any page brightness options.
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.
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.
Enable or disable page cropping options.
Set or clear page rotation options for portrait and landscape pages.
Set or clear page trimming options
Set or clear PDF compression options for color. indexed, greyscale and monochrome images.
Sets or clears the password options for PDF files.
Sets or clears the security options for PDF files.
Enable or disable resampling options.
Set or clear resampling options. Resampling must be enabled by calling SetResamplingOn for these options to be applied.
Set or clear file location and base file naming options, as well as append, prompting and overwrite options.
Set or clear file location and base file naming options.
Set or clear output resolution options.
Enable or disable the text extraction options.
Set or clear the text extraction options. Text extraction must be enabled by calling SetTextExtractionOn for these options to be applied.
Set or clear TIFF options such as fill order, photometric and byte alignment.
Set or clear TIFF compression options for color, indexed, greyscale and monochrome images.
Read-only; A collection of IPNJob objects, one for each file printed.
Read/Write; A boolean flag to turn job information tracking on or off.
This event is fired each time a filename is needed, allowing full customization of the output file names.
Event is fired when a new print job has entered or exited the print queue.
This event is fired each time a new output file is opened or closed.
This event is fired when an error is reported by the driver.
This event is fired when an informational message is reported by the driver.