1. In this post I am going to try and explain the concepts behind the scripting support in Print Distributor. I will cover what it is, how it interacts with your print jobs and what you can achieve with it.

    I am going to assume you have some programming experience although you don’t need to be a professional programmer to use the scripting in Print Distributor. If you have ever added a JavaScript alert to a web page or written a batch file that is probably enough. You should also understand the concept of actions in Print Distributor, in particular their sequential operation.

    The scripting language in Print Distributor is VBScript from Microsoft a dialect of BASIC. This is the language you may have come across if you have ever written WSH or WMI scripts. I won’t try and document it here as Microsoft has quite good documetation and a Google search will turn up lots of help.

    Print Distributor has a Script action that will let you run a script before or after any other actions in your configuration. You can also include it in the global actions if you have a script that needs to run across many virtual printers. VBScript is also used for the expressions you enter for conditional actions.

    When a print document arrives at a Print Distributor virtual printer there are two files created, a raw file and a job file. The raw file is the data the printer receives, typically this is a PostScript or PCL file but may be in another format. The job file contains attributes about the document such as the name of the user who printed it and the document name.

    Your scripts have access to both of these files to varying degrees. The job attributes are mostly associated with the administration of the printer, these include the user name, document name, priority, machine name, print date, printer name, size, job id and so on. All of these attributes can be modified and on the whole they won’t change the printed job but may change the behaviour of subsequent actions.

    A typical example where you might modifiy a job attribute is if you are archiving files by the Document Name field but the formatting isn’t quite right for your requirements. For instance if the application that is printing used underscore characters instead of spaces you could replace the underscores with spaces in your script.

    As well as the job attributes there are a number of document attributes that indicate some of the printer settings. These give you access to the paper source, paper size, duplex, colour and orientation. This is read only access as the real printer controls are in the raw file. It can be useful for routing documents or accounting, for instance you may pick out all the A3 / B sized documents and route them to a printer with a large size paper input or route all the colour prints to a colour printer.

    It is also possible to read the raw print file in a script. Most PCL and PostScript files will have a header that is plain text and some times you can extract useful information about the document when that isn’t available in the job. A very common use for this is reading the document name when the document has been spooled from a mainframe or UNIX system.

    There are also a number of control mechanisms available to a script, it is possible to abort the document, reprint from within the script or send a message to the log. You can also check the status of previous actions, for instance you can check for errors, find the last printer the load balancing action used or the exit code from the Run Program action.

    I hope this has given you an idea of some of the capabilities of scripting in Print Distributor. If you want to investigate the scripting in Print Distributor then the help file has further information or if you don’t want to get your hands dirty then contact us and we will do what we can to help.

  2. Posted 16th of November 2011
  3. Last month Microsoft announced a very early preview for Windows 8. There are quite a lot of changes we are excitied about, in particular the continued journey towards XPS as the default spool file format.

    Windows 8 introduces a new printer driver model called v4. These drivers are all based on XPS and will support XPS, PostScript and PCL printers directly without any binary components. Unfortunately they don’t support 3rd party port monitors which is the component we use to route prints from a virtual printer into Print Distributor.

    Over the last few releases of Windows Microsoft has been pushing developers away from writing native components for the print spooler. There is good reason for this, the quality of some printer software is attrocious and any instability in a printer driver or port monitor can cause the spooler to crash.

    This leaves us with quite a lot of work to do to make Print Distributor compatible with Windows 8. The first thing we have done is create a prototype to prove we can achieve what we need, this is running fine. As usual we expect to have a test release available when Microsoft makes their release candidate available, probably some time next year.

  4. Posted 6th of October 2011
  5. We are pleased to announce the release of Print Distributor 5.2.

    This release contains a number of new features including:

    • Improved performance, if you are writing very large print files then the performance has been improved significantly.
    • Installer and un-installer performance is improved along with the reliability.
    • The log window now supports hyper-links and highlighting. You can now click on a write file entry in the log and as long as Windows has a file association the document is opened automatically.
    • Virtual printers now have a context menu that lets you set the printer properties, configure the default settings, edit the printer, delete the printer and print a test page.
    • Test pages now produce the Windows default page instead of the simple text test.
    • Adding and changing virtual printers is now transactional, if the operation fails for some reason any previous changes are automatically rolled back.
    • Driver information is now passed through to actions when they are created and configured, this has allowed us to introduce a number of usability improvements.

    As well as the new features there are a number of bug fixes and general enhancements.

    Print Distributor 5.2 is a free upgrade for 5.0 and 5.1 owners. 3.xx and 4.xx users can upgrade at www.frogmorecs.com/upgrades

    A free trial of Print Distributor 5.2 can be downloaded from www.frogmorecs.com/upgrades

  6. Posted 6th of September 2011