What important information do I need regarding scripts and plug-ins in Uniprint 8.3?

Blog Post created by toleary on Aug 2, 2013


This document describes in detail the changes in Print Server plug-ins introduced in Uniprint 8.3. Prior to Uniprint 8.3, all print jobs were kept in the spool queues. In Uniprint 8.3, print jobs will be managed by the Pharos Secure Release Service (SRS) which replaces the dependence on the Windows spooler for print job management. The interaction with the Secure Release Service has introduced some changes to the print server plug-ins.

Removed Plug-In Point

  • PageCountJob

    This plug-in point has been completely removed. In Uniprint 8.3, page counting is no longer handled by the Print Server; it is managed by the Secure Release Service.

General Property Changes

Some of the properties exposed by the PlugIn interface have been changed since print jobs are now managed by the SRS, not the windows spool queues.

  • PlugIn.JobID

    JobID used to match the spool file name in the windows spooler, for example a JobID of 1 matched the 00001.spl file in the Windows spool directory. Now, the Job ID should be treated only as an abstract token representing the job.

  • PlugIn.Queue

    This used to give the windows spool queue that held the print job. Now this is the source queue name that originally received the print job. It could also be empty if the job came directly from other source, like MobilePrint.

  • PlugIn.JobPath

    This used to give the absolute path to the local spool file, like C:\Windows\System32\spool\PRINTERS\0001.spl. Now it will contain a path relative to the SRS job store, for example:


    Since the job could be kept in a remote server in a customized location, the job path is provided for informational and backward compatibility purposes.

  • PlugIn.JobType

    New in 8.3. Used to determine the type of a print job (whether “Native” or “MobilePrint”). Notify functions such as QuestionBox and MessageBox which expect a user response and do not get one may cause a job to be deleted. If you install the new Pharos MobilePrint application and you have scripts in place that rely on user interaction (such as using Notify to confirm user acceptance), you may need to exclude MobilePrint jobs to ensure they are not cancelled.

    Checks which can be used within the scripting interface to exclude MobilePrint jobs from Notify interactions:

    1. A check for Native jobs, to only perform actions for native jobs and bypass MobilePrint jobs, ie: if (PlugIn.JobType == "Native")
    2. A check for the existence of Popup data - this is used in the sample scripts on the Pharos CD, ie: if (not String.IsEmpty(host))
    3. A check for Direct Queue, to only show notify dialogs for Direct printing (MobilePrint jobs are Secure Printing), ie: if (PlugIn.Direct)

Plug-In Interface Change

  • MoveJob

    This plug-in was called whenever an administrator moved a job between queues. In 8.3, a job does not physically belong to a spool queue, but is owned logically by a print group. So now a print job can be moved between print groups rather than queues. In the script interface, PlugIn.QueueFrom and PlugIn.QueueTo have been replaced with PlugIn.PrintGroupFrom and PlugIn.PrintGroupTo. In the executable interface, the 5th and 6th arguments will become source print group and target print group accordingly.

  • CostJob

    In earlier versions, the Job Cost Method used to be defined at the queue level. In 8.3, the Job Cost Method is defined at the print group level. For the script interface the PlugIn.PrintGroup property has been added, and for the executable interface a new argument <printgroup> has been added to the existing argument list. Please note the PlugIn.Queue property and <queue> argument will remain, but they refer to the source queue that originally received the print job.

Namespace Function Changes

  • Win32.GetJob

    Due to the change in print job storage, some job information items will no longer be supported. For example, the PrintProcessor(7), DriverName(9), Priority(14), Position(15) etc. The following list contains the fields (and IDs) that will be supported.

    Read-only properties

    • JobId (0)
    • PrinterName (1)
    • MachineName (2)
    • NotifyName (5)
    • Status (11)
    • TotalPages (18)
    • Size (19)
    • PagesPrinted (22)

    Read-write properties

    • UserName (3)
    • Document (4)

    Not supported

    • Submitted (20)
    • Time (21)
  • Win32.SetJob Command

    Only two fields, marked as read-write, can be set. Note: In Rev 257 (Print Server/Secure Release Service), Win32.SetJob (...) will return an error instead of throwing an exception for an invalid field.

    • UserName (3) read-write

    • Document (4) read-write

  • PrintJob.Copy

    The function will still duplicate a job to the Secure Release Job Store. With the Uniprint 8.3 General Release, the last optional argument [offset_int] is not used. The job will always be duplicated with popup data, if any, stripped off.

    Rev 257 (Print Server/Secure Release Service) or later: The function has been updated to use the last argument [offset_int]. By default, the function removes any popup data. It will retain the popup data when [offset_int] is less than or equal to Zero, a value greater than Zero will remove the popup data.

    Warning: the duplicated job will be scheduled as a new job to the system and will trigger a series of plug-in points. Extra care is needed here as unconditional copying could result in an infinite loop.

  • PrintJob.SaveTo

    This function is new in 8.3 to save a copy of the print job to a local path. In 8.2 and prior the script had direct access to the spool file via the PlugIn.JobPath. In 8.3 the job could reside on a remote server or could even be encrypted. PrintJob.SaveTo can be used instead to create a local copy of the job. The caller is responsible for cleaning up the resulting file. The function signature is:

    PrintJob.SaveTo(id_int, filepath_string) returns boolean

Available resources

Please refer to these Pharos Help topics for detailed information on scripting and Plug-In interfaces.

  • About Plug-ins: How plug-ins are called and in what order.
  • Plug-in interfaces: detailed interfaces for both executable plugins and script plugins.
  • Pharos Script Primer: scripting and namespace functions.