Training Guide: docQrules

Training Guide

These Training Notes only apply to the following version and above of the product:

3.0

Printed 10/06/2014

NOTE THAT THIS PRODUCT WAS FORMERLY MARKETED AS

Microsoft® products mentioned in this publication are trademarks of the Corporation. PostScript is a trademark of Adobe Systems Incorporated. PCL is a registered trademark of Hewlett-Packard Company. All other trademarks recognised.

Please note that the information in this document was correct at the date of printing. However, the product may change due to modifications and improvements in design. ATI reserve the right to modify this product without notice. The data within this document is not binding to the manufacturers.

Page 1 of 41 Training Guide: docQrules

Index Page no. 1.0 Installation ...... 3 1.1 Licensing ...... 4 1.2 Operating Systems ...... 4 1.2.1 Windows Vista and above ...... 4 1.2.2 Windows 2008 Server / Server Core ...... 4 1.3 Messenger ControlLayer Service ...... 4 1.4 Security and Firewall ...... 4 2.0 Configuration ...... 5 2.1 Creating a Route ...... 7 2.1.1 Adding a queue into a Route ...... 8 2.1.2 Assigning a Rule to a Route ...... 9 2.1.3 Applying de-duplication to a Route ...... 10 2.3 Modifying a Rule ...... 12 2.3.1 Conditions ...... 12 2.3.1.2 Copy count ...... 13 2.3.1.3 Printer State ...... 14 2.3.1.4 Colour detection ...... 14 2.3.1.4.1 PostScript ...... 15 2.3.2 Action ...... 15 2.3.4 Exceptions ...... 16 2.3.5 Popups ...... 17 2.3.5.1 Windows Messenger...... 17 2.3.5.2 Admin Popup ...... 18 2.3.6 Email ...... 21 2.3.7 SNMP Communities ...... 22 2.3.8 Logging ...... 23 2.3.9 De-duplication ...... 25 2.4 Advanced ...... 26 2.4.1 Scripting ...... 27 2.4.1 Scripting ...... 27 2.4.1.1 Syntax ...... 27 2.4.1.2 Structure ...... 28 2.4.1.3 Commands ...... 29 2.4.1.3.1 Copy Command ...... 29 2.4.1.3.2 Move Command ...... 29 2.4.1.3.3 Reprint Command ...... 29 2.4.1.3.4 Delete Command ...... 30 2.4.1.3.5 Notify Command ...... 30 2.4.1.3.6 System Command ...... 31 2.4.1.3.7 Log Command ...... 31 2.4.1.3.8 Set Command ...... 31 2.4.1.4 Variables ...... 32 2.4.1.5 Operators ...... 35 2.4.1.6 Errors ...... 36 2.4.1.6.1 On_Error ...... 36 2.4.1.6.2 Error_Message ...... 36 2.5 Workflow ...... 37 2.6 Backing up docQrules ...... 38 3.0 Issues with moving print jobs ...... 38 3.1 CPCA ...... 39 4.0 Job Logging ...... 39 5.0 Troubleshooting ...... 40 5.1 Reporting problems ...... 41

Page 2 of 41 Training Guide: docQrules

1.0 Installation

There are two components to docQrules:

 docQrules Control Layer Service – the Server  docQrules Admin tool

During installation you can choose which component to install. The default is to install both however in practice you would normally install the docQrules Server and Admin tool on the print server, and then install the Admin tool in the Help Desk or other IT support PCs.

The Control Layer Service is installed on your print server(s). This service runs under the Local System account, however if you need it to access any network resources then you will need to change it to log on as a particular user account. This component is referred to as the docQrules Server

The Admin tool allows you to configure the docQrules Server, and this may be run locally or remotely. The user running the Admin tool must have Administrator rights on the docQrules Server PC.

Page 3 of 41 Training Guide: docQrules

1.1 Licensing

The product is licensed per Server so you may have as many installations of the Admin tool as you need.

The software may be installed for a trial period of 45 days, after which it will stop working and will write an entry to the Application Event Log to say that the trial period has expired. This trial period cannot be extended.

In order to license it there is a program added to the Start menu. There are 2 types of licence that may be purchased, an Enterprise Edition, which has no restrictions, or an SMB Edition, which is limited in the following ways:  A maximum of 15 queues may be added to route(s)  All logging of print data does not include the user names  Scripts may not be applied to routes – only rules may be applied  It is possible to purchase an upgrade from an SMB Edition to an Enterprise Edition If an Enterprise Edition licence has been installed then please note that you will need to enable the logging of user data in the Server Settings.

1.2 Operating Systems

1.2.1 Windows Vista and above

If your client PCs have Vista or above then you need to be aware that these operating systems do not include the Windows Messenger service so you will need to use the Admin Popup instead (see page 18).

1.2.2 Windows 2008 Server / Server Core

The Windows Firewall is normally enabled on Server 2008 and therefore to access a remote server, the docQrules Admin tool will need to be allowed through the Firewall. RPC will need to be enabled for the ControlLayer. On Server Core this may be done through the following command line:

netsh advfirewall firewall add rule name="RPC Inbound" dir=in action=allow program="C:\Program Files\Advanced Technologies International\docQrules\DocQManControlLayerU.exe" enable=yes profile=any localip=any remoteip=any protocol=tcp localport=RPC interfacetype=any

1.3 Messenger ControlLayer Service

This service is included with version 2 and above of docQrules and is used to send Admin Popup messages to clients that either have the Windows Messenger Service disabled or it is not present. This service must be running under an account which is in the Domain Administrators group and the Firewall on the client PC’s must be either disabled, or have Remote Administration listed as an Exception.

1.4 Security and Firewall

In order to connect to a remote docQrules Server the user running docQrules Admin must have local administrator rights to the Server, and they must also be in the Distributed COM users group for that server. The Admin tool uses DCOM to communicate with the server and as DCOM uses a random port allocation, the application needs to be added to the

Page 4 of 41 Training Guide: docQrules

Firewall whilst TCP port 135 needs to be opened for RPC/DCOM communication. The application files that need to be exceptions are: DocQManControlLayerU.exe and dqr_server.exe

2.0 Configuration

There are 2 main concepts to docQrules:

 Routes  Rules

A Route is a group of print queues – normally defined as a geographic areas, e.g. all the printers on the 1st floor, printers in Marketing etc.

You can have multiple queues in a route, but a queue can only exist in one route at any one time.

Rules are assigned to routes and the rules are actioned in order going from the topmost one downwards. For example, you might have the following rules: one to delete any jobs over 100 pages, one to move jobs over 20 pages, and one to move jobs in the event that the printer has a fault. These rules should be applied to the route in that order. If, for example, you had the rule for 20 page jobs above the 100 page jobs then the 100 page rule would never be actioned because the 20 page rule would always get actioned instead:

Route

Queue 1

Queue 2 etc…

Rules:

 Rule for jobs bigger than 100 pages

 Rule for jobs bigger than 20 pages  Rule for printer having a fault

If the 20 page rule was A new job will be compared to each rule in order above the 100 page one, from the top down: 1, 2, and then 3. If a job then the 100 page rule matches a rule then no later rules will tested. would never be actioned

Page 5 of 41 Training Guide: docQrules

Routes may be disabled by un-checking the tick box:

And then pressing the “Apply” button.

Page 6 of 41 Training Guide: docQrules

2.1 Creating a Route

A new route may be created in one of two ways:

 Right click inside the white space headed “Routes” and choose “New Route”  Click on the icon for creating a new route

The default name for a new route is “NewRoute” however this can be changed either by clicking with the left mouse button directly onto the name “NewRoute”, or right click and choose the option “Rename Route”

Page 7 of 41 Training Guide: docQrules

2.1.1 Adding a queue into a Route

 Highlight the route  Select the tab labelled “Queues”  Highlight the queue you want assigned to that route  Press the “Assign” button

Multiple queues may be highlight either by holding down the CTRL key before highlighting each one individually or a continuous list of queues may be highlighted by selecting the topmost one, then holding down the SHIFT key whilst selecting the bottommost one.

Page 8 of 41 Training Guide: docQrules

2.1.2 Assigning a Rule to a Route

 Highlight the route  Select the tab labelled “Rules”  Highlight the rule you want assigned to that route  Press the “Assign” button

 

  

 

You can assign multiple rules into the route. The same rule can be used by more than one route.

Page 9 of 41 Training Guide: docQrules

You can also change the priority of the order in which these are processed by highlighting the rule and then pressing the relevant arrow.

2.1.3 Applying de-duplication to a Route

A De-duplication may be applied to a Route, by right click on the Route and enabling De- duplicate. The icon will change to show that this is enabled.

The De-duplication function will catch situations where users accidentally print the same job multiple times. If a job of the same name and size is printed by the same user within a short space of time (default 2 seconds) then the duplicates will be automatically deleted.

The time interval of 2 seconds may be adjusted through the Server Settings menu.

Page 10 of 41 Training Guide: docQrules

2.2 Creating a Rule

A new rule may be created in one of three ways:

 Right click inside the white space headed “Rules” and choose “New Rule”  Double click inside the white space headed “Rules”  Click on the icon for creating a new rule:

The default name for a new rule is “NewRule” however this can be changed either by clicking with the left mouse button directly onto the name “NewRule” and then after a pause clicking on it again, or right click on it and and choose the option “Rename”:

Page 11 of 41 Training Guide: docQrules

2.3 Modifying a Rule

There are four main concepts behind a Rule:

Condition: - Under what conditions should the rule trigger Action: - What action should take place if a print job meets the criteria of the condition Exception: - Any exceptional circumstances where you might not want the rule to process Notification: - Informing users that the rule has actioned

You can modify a rule by one of the following methods:

 Double click on the rule (it is best to double click on the cog icon for the rule rather than the text displaying the rule name because if you double click too slowly then instead of opening the Modify Rule dialog it might instead open the Rename one).  Right click on the rule and choose “Modify…”.  Click on the icon for creating a new rule:

2.3.1 Conditions

If a print job matches all the selected conditions for a rule then the rule’s Action will be performed (as long as the print job does not meet any of the Exception criteria). The underlined parts are to emphasise that the Conditions are an AND relationship – i.e. all the selected conditions must be met before a rule will be actioned, however for Exceptions these are an OR relationship, i.e. if any of the exceptions criteria are met then the rule will not be actioned.

Page 12 of 41 Training Guide: docQrules

These are the currently supported conditions for rules:

Number of pages in the job: - This could be the total number of pages, or, if the job is composed of one original with a copy count, then the condition can just test the number of pages in the original. Users / groups: - Specific users and groups may be included in the condition. Printer Status: - The SNMP state of the printer. Colour: - Whether the job contains any colour or not. Email: - Whether the job was printed from a Microsoft email program. The detection rules are based around the print job name and Microsoft Email programs like Outlook and Outlook Express tend to incorporate the application name in the print job name. Lotus Notes unfortunately, does not. Web Page: - Whether the job was printed from . The detection rules are based around the print job name, and Internet Explorer is the only major browser which uses the URL as the print job name, the others all tend to use the contents of the HTML tag. </p><p>Please see the following sections for definitions of the above conditions (e.g. what defines a job as being colour?). </p><p>2.3.1.1 Number of pages </p><p>In terms of page counting various data streams, the software can support generic printer languages / spool job formats:  PCL5  PCL5e  PCL5c  PCL6 (aka PCL-XL)  PostScript level 2 and level 3 / KPDL  RPCS  EMF (1.003 and 1.008)  HP/GL2  CPCA (PostScriot and PCL)  PCL3GUI (aka RTL) If the printer language of the job cannot be detected from the list above then the Windows value for the page count will be used and the job datatype will be defined as “RAW”. </p><p>2.3.1.2 Copy count </p><p>In terms of copy count detection, the product can support copy count values being defined in the following ways:  Windows DevMode  PJL QTY  PJL COPIES  PCL5  PCL-XL </p><p>Page 13 of 41 Training Guide: docQrules </p><p> RPCS  Prescribe COPY, JOBP, JOBS  PostScript  CPCA </p><p>2.3.1.3 Printer State </p><p>This can check one of the following SNMP states of the printer:  Printing - The printer is returning a “Busy” SNMP state.  Error - The printer is returning one of the following SNMP states: PRINTER_STATUS_PAPER_JAM PRINTER_STATUS_PAPER_OUT PRINTER_STATUS_PAPER_PROBLEM PRINTER_STATUS_OUTPUT_BIN_FULL PRINTER_STATUS_NO_TONER PRINTER_STATUS_OUT_OF_MEMORY PRINTER_STATUS_OFFLINE PRINTER_STATUS_DOOR_OPEN  Unavailable - The printer is not responding to an SNMP request. This could be for one of the following reasons: The printer is switched off The network cable is unplugged The printer does not support SNMP The server PC does not support SNMP The printer is incorrectly defined (e.g. wrong IP address) </p><p>This type of condition testing is often referred to as “Failover” where a user tries sending a job to a printer that is in error and the job gets automatically moved to a working printer instead. </p><p>2.3.1.4 Colour detection </p><p>Colour detection is broken down into the following types: If the format of the spooled print job is one of the following:  PCL5c  PCL-XL  RPCS  EMF (1.003 and 1.008)  KPDL  PostScript  HP/GL2  CPCA (PostScriot and PCL)  PCL3GUI (aka RTL) Then the job content will be analysed and an exact value for the number of colour pages in the job will be returned. “Colour” in this context is defined as any object (text, vector or graphic) on the page having RGB values which differ – i.e. if the R=G=B value for that object then it is considered to be grey and not colour. If the RGB values differ, even by 1 value, then the object is considered to be colour, that page is considered to be colour and the whole job is considered to be colour. </p><p>Page 14 of 41 Training Guide: docQrules </p><p>If the value for the number of colour pages is summed with the value for the number of non- colour pages then this should always equal the total number of pages. If the format of the print job is the following language then the value “No” for colour will always be returned:  PCL5e The number of colour pages will always be returned as zero and the number of non colour pages will always return the same value as the total number of pages. </p><p>If the printer itself is not colour then the job will always be identified as being black and white. </p><p>If the format of the print job is perceived to be:  RAW (see the note on page counting on page 13) Then the driver setting for “Colour” will be examined. If the driver is set to Colour then regardless of the job content, the job will be considered to be colour; the number of colour pages in the job will equal the total number of pages in the job and the number of non-colour pages will be zero. If the driver is set to Black and White then regardless of the job content, the job will not be considered to be colour; the number of non colour pages in the job will equal the total number of pages in the job and the number of colour pages will be zero. </p><p>2.3.1.4.1 PostScript </p><p>When PostScript jobs are arriving from non-Windows hosts such as Mac or Unix printing, in order to enable duplex and paper size detection as well as page level colour detection, the PostScript PPD from the host must be copied over into the following folder: </p><p>C:\Documents and Settings\All Users\Application Data\Advanced Technologies International\doc-Q-manager\PPD </p><p>Or depending on the <a href="/tags/Operating_system/" rel="tag">operating system</a> this folder may instead be: </p><p>C:\ProgramData\Advanced Technologies International\doc-Q-manager\PPD </p><p>2.3.2 Action </p><p>If all the conditions of the rule are met (and none of the exceptions) then the action that is defined for the rule will be automatically performed. The following actions are supported: </p><p>Delete the job: - You might want to delete the job in situations where it is not possible to move the job to another printer (perhaps where the format of the job would be incompatible with the new destination), or if you want the user to resubmit the job using another mechanism. Move the job to another print queue: - Please be aware that this might produce inconsistent results. Look at the section “Issues with moving print jobs” on page 38. You cannot choose to move jobs to another queue defined in the same route. This would create a circular routing which is not allowed. Print on current queue: - Instead of doing anything about the job you might want to just let users know that the job has contravened some condition(s) – perhaps as part of an educational process to get them to be more aware of the cost of printing. Or you </p><p>Page 15 of 41 Training Guide: docQrules </p><p> might wish to print the job on the current queue because you are logging print activity (see below). Or because you still want the job to output from the current queue, but you want to apply a Modification to it. Modify: - Regardless of moving a job or printing it to the current queue, you can also apply a modification. These are the modifications currently supported:  Change priority The job’s priority on the spooler may be changed.  Decolourise Convert a colour job to black and white (and grey). This is only supported for the following print job languages: EMF, PCL5c, PCL6, RPCS, PostScript, HP/GL2, CPCA, PGL3GUI (RTL).  Duplex Output the job using a different duplex setting, e.g. converting it to single sided (simplex), or one of the two duplex types: double sided along the vertical axis – like a book – or double sided along a horizontal axis – like a calendar. This is only supported for the following print job languages: EMF, PCL5c, PCL6, RPCS, PostScript, HP/GL2, CPCA, PGL3GUI (RTL).  Economy mode Modifying the job so that it prints in Economy print mode which uses less toner. This is only supported for the following print job languages: PCL5c, PCL6.  Limit number of pages Restrict the job to only print the first few pages. For example, if printing an email which might contain multiple pages of forwards, then you might restrict these to just printing the first 2 or 3 pages. </p><p>Apart from selecting one of the actions above, the rule can also write a log to audit trail its activity. Logging: - This writes out to a CSV file various pieces of information. See the section on logging on page 23. </p><p>2.3.4 Exceptions </p><p>Even if a print job meets all the conditions of the rule then exception conditions may be defined which will prevent the action taking place on the job. If any of the selected exceptions are met then the rule will not be actioned and processing will then move on to checking the next rule (if there is one). The following exceptions are supported: </p><p>State of the destination printer: - This option is greyed out unless you have chosen in the Action section to move the job to another printer. This uses SNMP to check on the state of the new destination printer. This follows the same SNMP states as are listed on page 14. The concept is that you don’t want to move a print job to another printer which is in error, or might be tied up printing another job. Particular jobs: - A particular job name may be entered and tested against. The test conditions are for an exact match, whether the job name contains a particular piece of text, or where the job name does not match a particular piece of text. Only one job name may be entered through the user interface (although using scripting you </p><p>Page 16 of 41 Training Guide: docQrules </p><p> can test for more than one name). The testing of the document name IS case dependent. Particular users / groups: - Particular users or groups may be selected. Between certain times: - You might wish to exclude routing between certain times, maybe you do not wish to route to a printer which is in a room that is locked overnight. - The time selection is between these times so if the Exception is between 9:00 and 17:00 then the exception will not trigger at 9:00 but will trigger at 9:01. Also it will trigger at 16:59 but not at 17:00 - In addition to exclusion at certain times, certain days of the week may also be excluded. These are considered in combination with the times so if “Monday” is selected and the time is between 17:00 and 9:00 then the rule will trigger except on a Monday between the stated times. Any other day of the week, or outside of those times on a Monday, the rule will still process. Certain URLs: - This option is only available if the condition to exclude webpages has been selected. Various URLs may be excluded from the routing by adding them into the list. Any page within a listed URL will be excluded – for example, if the URL exclusion is for www.ati-uk.com then any page within this site, e.g. www.ati- uk.com/Research/Data would also be excluded. Include any virtual folders as part of the URL if only those folders and content beneath them are required to be excluded and the rest of the path. </p><p>2.3.5 Popups </p><p>There are two types of Popup technology that docQrules can use: </p><p>2.3.5.1 Windows Messenger - This uses the Messenger service to communicate a popup message to a user or PC. This is not to be confused with MSN Messenger or with the Windows Messenger that comes with XP – these are both IM (Instant Messenger) software which allows a two- way dialog. The Messenger service is built into Windows NT4, Windows 2000, Windows XP and Windows Server 2003 (although it is disabled by default on Server 2003 and XP with Service Pack 2 or above) and is listed in your Services. This is sometimes referred to as NET SEND which is how it may be called through the command line interface. To determine whether you are running the Messenger service then open your services (Start | Run | SERVICES.MSC) and check whether the service is started and automatic: </p><p>Page 17 of 41 Training Guide: docQrules </p><p>You can also test this out on your own PC by opening a command prompt (Start | Run | CMD.EXE) and on the command line typing: </p><p>NET SEND %computername% Test </p><p>Which if successful should send a message saying “Test” to your screen. The Windows Firewall will also, by default, prevent these popup messages from getting through. If you choose to use the Windows Messenger Popup to send a message then it can send a message to one of the following: </p><p>Originating computer: - This is the most reliable method which is why it is the default. Original job owner: - As identified by their network name. You should ONLY use this if your users are running under Citrix as the default choice will message everyone. Other users / machines: - As identified by their network name or machine name (without backslashes). </p><p>2.3.5.2 Admin Popup - This uses an RPC call using WMI (Windows Management Instrumentation) in order to generate a popup on the user’s PC. To do this the Messenger ControlLayer service on the docQrules Server must be running under a domain Administrator account, and the client PCs which should receive this message should have WMI enabled (this is normally on by default). If the Firewall is enabled on the client PCs then the Remote Administration must be enabled as an exception. </p><p>Here is an example where this has been set as the default Domain policy: </p><p>Page 18 of 41 Training Guide: docQrules </p><p>If the Firewall is enabled and Remote Administration is not an exception, then the Application Event Log on the docQrules Server will list a WSH error as shown: </p><p>If you choose to use the Admin Popup to send a message then it can send a message to one of the following: </p><p>Originating computer: - All user sessions on that particular computer. This is the default choice. Original job owner: - As identified by their network name. You should ONLY use this if your users are running under Citrix as the default choice will message everyone. Other users/machines: - Either enter a machine name (without backslashes) which will message all user sessions on that machine, or a specific user session may be messaged as: SERVER\USER. </p><p>The message itself can be customised to say whatever you want. You can include certain “variables” in the message. These are tokens that refer to information about the job, the user or the print queue. For example you can send a message which will include the name of the print job as well as how many pages are in it. These variables are denoted by being delimited with the < and > characters and you can access them through the button “Insert variables”. </p><p>For example you could have a message which says: </p><p>By positioning the cursor at certain points within the text and pressing the “Insert variable” button you can add variables into the message, e.g. position the cursor here </p><p>Page 19 of 41 Training Guide: docQrules </p><p>And then pressing the “Insert variable button” will add in the chosen variable, in this case “<DESTINATION>” which is the name of the destination print queue the job will be moved to. </p><p>(the example above also has the <DOCUMENT_NAME> variable added to it) </p><p><DOCUMENT_NAME> is an internal variable name for the print job name. Other variables are listed in the section on Scripting on page 27. </p><p>When the user gets a message it will be customised to include the name of their job and the number of pages that were in it, for example: </p><p>If the popup message is using the Windows Messenger and the message cannot be delivered for any reason then the rule will not be actioned. If the Admin Popup is being used however, there are no checks in place to see whether it has worked or not. </p><p>Page 20 of 41 Training Guide: docQrules </p><p>2.3.6 Email </p><p>This uses SMTP to send an email message to a specific user. An SMTP server must be configured in the main window through the Server | Server Settings menu. This may be configured by name or IP address. You can configure who to send the email to as well as the subject of the message. The message itself can be customised in the same way as with the Popup. Multiple email addresses may be entered, separated by commas. </p><p>If you want to send an email to the print job owner and you are using Active Directory then click inside the Address field and from the Insert Variable menu choose Job Owner. This will then use Active Directory to look up the email address of the print job owner. </p><p>This is where the SMTP server is configured: </p><p>Page 21 of 41 Training Guide: docQrules </p><p>2.3.7 SNMP Communities </p><p>Rules and scripts that test the status of a printer use SNMP to do this. The default SNMP community that is queried is “public” however if additional communities are required then these may be defined within the Server | Server Settings menu. Any additional community names may be tested to see if they exist. These additional community names are stored in an encrypted manner such that known communities may be deleted. These additional communities are checked first before defaulting to the “public” community. </p><p>Page 22 of 41 Training Guide: docQrules </p><p>2.3.8 Logging </p><p>If logging has been selected for any of the Rules (in the Action for that rule) then the location of the log file must be configured. </p><p>This is within the Server | Server Settings on the main menu: Enable: - This enables / disables logging. Server side path: - This is the location of the log file. It is emphasised as being “server side” because it is relative to the server, i.e. if you select “C:\logfile.csv” and you are running the Admin tool remotely, then the file LOGFILE.CSV will actually be written to the C: drive on the server – NOT your own PC. Check path: - This button will check that the server can actually write to a log file in the location specified. If no log file exists then pressing this button will create one with relevant headings. Anonymise Logging: - This check box will ensure that user names are not written to the log file, but will instead be recorded as "****". This is the default option with an SMB Edition licence, and is optional for the Enterprise Edition licence. </p><p>Page 23 of 41 Training Guide: docQrules </p><p>The log file itself is CSV – which stands for Comma Separated Variable. This means that each field is separated by a comma, and each record is on a separate line. Often each record is also surrounded by quote characters. </p><p>A button on the main Admin screen will launch Excel and pass the log file values into it. The log will be formatted for column headings and the display of the top row will be frozen. </p><p>This is the information that will be written to the log file: </p><p>Time This is in the format Year / Month / Day Hour:Minute:Seconds Route Name Rule Name Action Either “move” if it was moved, or “delete” if it wqas deleted. If it prints on the current queue then depending upon what modifications are chosen, it will either be “decolour”, “transform” (e.g. economy mode, limit, change plex), or just “log”. Source Queue The original queue the print job was sent to. Source Queue Status Either “idle”, “printing”, “warmup”, “error” (see the list of what states constitute an error on page 14) or a system error if the SNMP state cannot be read. Destination Queue If the action is “move” then this will denote which print queue the job has been moved to. Destination Queue Status Either “idle”, “printing”, “warmup”, “error” (see the list of what states constitute an error on page 14) or a system error if the SNMP state cannot be read. User The user name of the job owner – or **** for an SMB Edition licence. Source Machine The PC name which sent the job. Job Name The name of the print job. Type The print language of the job, either “PCL5”, “PCL-XL”, “EMF”, </p><p>Page 24 of 41 Training Guide: docQrules </p><p>“RPCS”, “PostScript”, or “RAW”. This can be very useful in determining whether jobs can be moved between queues. Size (Bytes) Total Pages The total number of pages including any copy count. Copy Count Duplex Either “simplex”, “duplex_vertical_binding” or “duplex_horizontal_binding”. Colour Either “yes” meaning that there is colour in the job (or the driver has been set to colour), “no” meaning there is no colour in the job or the driver has been set to black and white. Colour Pages How many colour pages there were in the job. Error Message If the software encountered any errors then these are also listed here (although they will also be written to the Application section of the Event Log”) Driver Name The name of the driver used on the source queue. Print Rate (Pages Per The pages per minute value of the source queue driver Minute) Paper Size The paper size of the first page e.g. “A4”, “LETTER”. Department The department the user belongs to (read from AD). </p><p>Example: Time, Route Name, Rule Name, Action, Source Queue, Source Queue Status, Destination Queue, Destination Queue Status, User, Source Machine, Job Name, Type, Size (Bytes), Total Pages, Copy Count, Duplex, Colour, Colour Pages, Error Message,Driver Name,Print Rate (Pages Per Minute) "2005/08/18 19:57.07","NewRoute","Move jobs over 7 pages to the MFP","move","HP Color LaserJet","idle","Kyocera Mita FS-9100DN KX","idle","Gary Padbury","W2KPROSP3","<a href="/tags/Microsoft_Word/" rel="tag">Microsoft Word</a> Viewer 97 - Sign of Four.doc","EMF","2277100","48","1","simplex","yes","1","","HP Color LaserJet","8" "2005/08/18 19:57.21","NewRoute","Route black & white jobs to hi vol prn","move","HP Color LaserJet","idle","HP LaserJet 2000","idle","Gary Padbury","W2KPROSP3","Microsoft Word Viewer 97 - Sign of Four.doc","EMF","189936","4","1","simplex","no","0","","HP LaserJet 2000","40" </p><p>2.3.9 De-duplication </p><p>De-duplication is enabled on a route by right clicking on the route name and choosing "De- duplication". If this is enabled then any jobs appearing in the route within the specified time period, having the same size in bytes, and from the same user, will be automatically deleted. This is to prevent printing jobs that have been accidentally printed by users hitting the print icon too many times. The default setting is 2 seconds before the de-duplication will timeout. </p><p>There is an option to exclude jobs printed by <a href="/tags/Microsoft_Excel/" rel="tag">Microsoft Excel</a> from this feature. This is because if you choose to print multiple copies from within Excel, it generates multiple, identical print jobs. </p><p>Page 25 of 41 Training Guide: docQrules </p><p>2.4 Advanced </p><p>There is an Advanced mode which may be enabled through the main window: Mode | Advanced Mode. Once enabled then not only can you create Rules, but you can also create Scripts. Scripts are a very powerful way of defining rules and routing as well as doing many other things that can’t be done through the user interface. </p><p>The simplest introduction to scripting is to assign some rules into a route, and then convert those rules into a Script to see how it is structured. </p><p> Ensure you have one or more rules in a route  From the main menu select Mode | Advanced Mode  Right click where it says “Rules” underneath the Route name, select “Generate Script from Rules”  This will collapse all the rules into a script called (by default) “NewScript” </p><p>If you do not want the script – and if you haven’t pressed the “Apply” button – then pressing the “Revert” button will revert back to the original rules. This can help teach scripting. </p><p> </p><p> </p><p> </p><p>  </p><p>Page 26 of 41 Training Guide: docQrules </p><p>2.4.1 Scripting </p><p>The Scripting language available within docQrules is based upon the docQmanager Scripting language. It has a specific syntax and structure, and it contains various commands and variables related to print jobs. </p><p>2.4.1.1 Syntax White space is ignored Spaces and tabs are ignored New lines are ignored although they may not occur inside a string, although the string itself may be broken across multiple lines as long as each line is surrounded by quotes Commands (like COPY TO) are not case sensitive (so it could have been written "copy to") Operators are also not case sensitive Variables (like COPY_COUNT) ARE case sensitive Parameters in quotes, such as the name of a print queue, ARE case sensitive so if you wish to copy a job to a specific print queue then use the exact spelling otherwise it won't work "Escape" sequences are allowed by prefixing a single character with a backslash. If you want to use a backslash character, such as in a pathname, then use two of them. The full list of sequences is: </p><p>\" embed a double quote, e.g. NOTIFY "<SOURCE_MACHINE>" POPUP "\"Hello World\"" will send a popup saying (with quotes): "Hello World" \n new line, e.g. NOTIFY "<SOURCE_MACHINE>" POPUP "Hello\nWorld" will send a popup with two lines that say: Hello World \t horizontal tab, e.g. NOTIFY "<SOURCE_MACHINE>" POPUP "Hello\tWorld" will send: Hello World \v vertical tab \b backspace \r carriage return \f form feed \\ a single backslash, e.g. NOTIFY "<SOURCE_MACHINE>" POPUP "Use \\n if you want a new line" will send a popup saying: Use \n if you want a new line </p><p>Examples: NOTIFY "Administrator" POPUP "This is a message" " generated by docQrules" Copy to "PRN2" MoVe tO "PRN2" </p><p>Page 27 of 41 Training Guide: docQrules </p><p>2.4.1.2 Structure The format of the scripting language is for any test conditions to be enclosed in round brackets: ( ) Multiple test conditions may be strung together however they should all be surrounded by an enclosing set of round brackets. Multiple test conditions can be strung together by AND operators as well as OR operators. </p><p>Examples: IF ( TOTAL_PAGES > 10) IF ( ( USER = "Administrator" ) AND ( DOCUMENT_NAME = "Test Page" ) ) When the test condition is true - so if in the first example the job had 11 pages, then the list of commands following the test condition are then processed. This list of commands must be enclosed with so-called "curly brackets": { } </p><p>Example: IF ( TOTAL_PAGES > 10 ) { NOTIFY "<SOURCE_MACHINE>" POPUP "Your job <DOCUMENT_NAME> has been deleted as it's too big." DELETE } </p><p>Should the test condition not be true, in the example above if the job is only 9 pages, then the script will evaluate the next test conditions. These could be numerous ELSE IF tests, IF tests, or ELSE. </p><p>Example: IF ( TOTAL_PAGES > 50) { NOTIFY "<SOURCE_MACHINE>" POPUP "Your job <DOCUMENT_NAME> has been deleted as it's too big. Please reprint it to the Print Room" DELETE } ELSE IF ( ( TOTAL_PAGES >= 10) AND ( (STATUS OF PRINTER "193.1.1.111") <> RINTER_PRINTING) ) { NOTIFY "<SOURCE_MACHINE>" POPUP "Your job <DOCUMENT_NAME> has been moved to he departmental printer as it's cheaper to print large jobs there" MOVE TO "DptPRN" } ELSE { NOTIFY "PrintAdmin@mycompany.com" EMAIL "The user <USER> is printing a <TOTAL_PAGES> page job to <QUEUE_NAME>. This has not been routed or deleted." SUBJECT "Print" } Anything over 50 pages long will get deleted and the pc that submitted the job will receive a popup message telling them of this and asking them to reprint the job to their Print Room: Alternatively if their job is between 10 and 50 pages long then it will get automatically moved to the printer "DptPRN" and they will receive a popup telling them of this. Anything under 10 pages long will print out on the current print queue however an email will get sent to the PrintAdmin in the company to notify that this has occurred. </p><p>Page 28 of 41 Training Guide: docQrules </p><p>2.4.1.3 Commands </p><p>2.4.1.3.1 Copy Command </p><p>COPY TO "queuename" </p><p>Copies the current print job to the name of the queue in quotes. Keeps the original in the current print queue. Please remember when transferring print jobs to other print queues then the destination device should support the print job language of the current job. Examples: COPY TO "DptPRN" COPY TO "\\PSServer1\Prn2" </p><p>2.4.1.3.2 Move Command </p><p>MOVE TO "queuename" </p><p>Moves the current print job from the current queue to the queue listed in quotes. Please remember when transferring print jobs to other print queues then the destination device should support the print job language of the current job. Examples: MOVE TO "DptPRN" MOVE TO "\\PSServer2\Prn1" </p><p>2.4.1.3.3 Reprint Command </p><p>REPRINT [number of copies COPIES] TO "queuename" [ FROM PAGE page number | BEGIN ] [ TO PAGE page number | END ] [ DECOL ] [SIMPLEX | DUPLEX_VERTICAL_BINDING | DUPLEX_HORIZONTAL_BINDING] [ ECOMODE ] </p><p>Prints any section within the current print job to the queue listed in quotes. Check the specification for a list of print job formats that may be reprinted. The [number of copies COPIES] is optional. If no start and end point is defined then effectively the job will be copied in its entirety to the listed queue. Otherwise the start and end point may be defined - see the examples below – using either the number or a generalisation like BEGIN or END. With the optional DECOL parameter, the print job will be decolourised in the reprinted version. With one of the option “plex” commands, the reprint may be forced to simplex or one of the duplex types (this is not supported for PostScript or RAW types). With the optional ECOMODE command, the reprint will use the printer’s toner saving facility (this is not supported for PostScript or RAW types). Examples: REPRINT TO "DptPRN" REPRINT 6 COPIES TO "DptPRN" REPRINT TO "\\PSServer1\Prn1" FROM PAGE 10 TO PAGE 11 REPRINT 2 COPIES TO "DptPRN" FROM PAGE 20 TO END REPRINT TO QUEUE_NAME FROM PAGE 1 TO PAGE 2 DECOL DUPLEX_VERTICAL_BINDING ECOMODE </p><p>Page 29 of 41 Training Guide: docQrules </p><p>2.4.1.3.4 Delete Command </p><p>DELETE </p><p>Deletes the current job. Example: DELETE </p><p>2.4.1.3.5 Notify Command </p><p>NOTIFY "name" POPUP | ADMINPOPUP | EMAIL "message" [SUBJECT "subject"] </p><p>POPUP: If the command option is POPUP then this will send a Windows Messenger popup to the user specified by the name, and the Messenger Service must be running on both the server PC and on the clients. Please note that this service is not available from Vista onwards. The user specified can be a user name or pc name if using POPUP. A variable may also be used for the name property however it must be surrounded by < > symbols. Typical variables that are used are <SOURCE_MACHINE> which is the pc that sent the job, or <USER> which is the name of the job owner </p><p>ADMINPOPUP: An alternative mechanism is the Messenger ControlLayer service which is part of the installation of this software. During installation you are prompted for a domain Administrator account for this service to run under. This allows it to send popup messages without installing anything on the client PCs. To use this then the command option is ADMINPOP. For the address of where to send the message, use the following for Citrix networks: "\\\\<SOURCE_MACHINE>\\<USER>" Or just: "\\\\server_name\\*" If you know the name of the Citrix server, as this will ensure that the specific user will get the message. And for other type of network, use: "\\\\<SOURCE_MACHINE>\\*" If there is a Firewall on the client PCs then please ensure that Remote Administration is in the Exceptions list. </p><p>EMAIL: If the command option is EMAIL then an additional option for the SUBJECT can be specified. To send emails an SMTP server must be defined in the Server Settings. If using EMAIL then a valid email address must be used, or <USER_EMAIL> which is the user's email address from Active Directory (if AD is being used), or, if your company uses user names that match the prefix of an email address then you can use a combination like this: "<USER>@mycompany.com" </p><p>The message may include string variables, however these must also be surrounded by < > symbols, or the multiple strings and variables can be concatenated together by closing the message quotes and using the + symbol to add details together. Examples: NOTIFY "<SOURCE_MACHINE>" POPUP "Your job has been deleted" NOTIFY "<USER_EMAIL>" EMAIL "Your job <DOCUMENT_NAME> has "+TOTAL_PAGES+" pages and has been deleted." NOTIFY "\\\\<SOURCE_MACHINE>\\*" ADMINPOPUP "Your job has been deleted" </p><p>Page 30 of 41 Training Guide: docQrules </p><p>2.4.1.3.6 System Command </p><p>System ("command line commands to run") </p><p>This command IS case sensitive and must have upper case S followed by lower case letters. This allows scripting to call external commands. For example the command line NET SEND command may be called (see the example below). This can also be used to set up logging of variable information Examples: System ("Net send "+USER+" Your print job "+DOCUMENT_NAME+" is currently printing") System ("echo Print Job:"+DOCUMENT_NAME+", User: "+USER+", Pages: "+TOTAL_PAGES+" >>C:\logfile.txt") System ("Net send Administrator The spool file currently printing is "+SPOOL_FILE_PATH) </p><p>2.4.1.3.7 Log Command </p><p>Log ("CSV", "filename" , variable1, variable2, variable3 , "text" ...) </p><p>This command writes out any text or variables to the filename specified, in CSV (comma separated variable) format with quotes around each field. If there is any text to write out then this must be enclosed in quotes. Any variables to be written out should not be in quotes. A time and date stamp will always be added in the first field. If the filename references a path then double backslashes should be used. This command will always append to any existing file. Examples: Log ("CSV","c:\\logfilepath\\logfile.txt","Job name","User","Number of pages","Queue") Log ("CSV","c:\\logfilepath\\logfile.txt",DOCUMENT_NAME,USER,TOTAL_PAGES, QUEUE_NAME) Log ("CSV","S:\\LOGGING.CSV",DOCUMENT_NAME,USER,COL_PAGES, BW_PAGES,TOTAL_PAGES,STATUS OF PRINTER "Dpt1") </p><p>2.4.1.3.8 Set Command </p><p>SET_variable TO value </p><p>This command can be used to set the value or property of certain variables that support this capability. Listed below are those variables which may be changed / configured by using this scripting command: </p><p>SET_PRIORITY TO x number The Windows spooler priority of the current print job. Values in the range 1 to 99 where 99 is a higher priority than 1. If a job has a higher priority than other jobs on the queue then even though there are older jobs, the higher priority ones will print first. Example: SET_PRIORITY TO 99 </p><p>Page 31 of 41 Training Guide: docQrules </p><p>2.4.1.4 Variables </p><p>Variables that return a string or number may be embedded into messages etc. by surrounding the variable name with < > symbols, or the may be concatenated into the message by closing the quotes and using the + symbol to join them to the message. </p><p>DOCUMENT_NAME string Name of the print job. USER string The print job owner. SOURCE_MACHINE string The pc that submitted the job. SPOOL_FILE_PATH string The full path to the current spool file. QUEUE_NAME string The name of the queue where the print job is currently. TOTAL_PAGES number The total number of pages in the print job including all copies (if this can be determined). COPY_COUNT number The copy count of the print job (if this can be determined). CURRENT_YEAR number The current year as an integer. CURRENT_MONTH number (1 to 12) The current month as an integer from 1 to 12. CURRENT_DAY Number (0 to 6) or The current day of the week, MONDAY either as an integer from 0 to 6 TUESDAY where 0 is Sunday and 6 is WEDNESDAY Saturday, or a fixed value for the THURSDAY day of the week.. FRIDAY SATURDAY SUNDAY CURRENT_HOUR number (0 to 23) The current hour as an integer from 0 to 23. CURRENT_MINUTES number (0 to 59) The current minutes past the current hour as an integer from 0 to 59. CURRENT_ELAPSED_MINUTES number (0 to 1339) The current minutes since midnight as an integer from 0 to 1339. FILE_SIZE number (bytes) The size of the current print job in bytes as an integer. JOB_ID number (0 to 99999) The Windows spooler id for the current print job. JOB_TYPE EMF The format of the print job. If it PCL5 can be detected as to which PCL-XL printer language it is in, otherwise POSTSCRIPT the default is RAW. RPCS RAW ORIENTATION PORTRAIT A fixed value denoting the global LANDSCAPE orientation of the print job which is written by the application when it prints and may not be correct! </p><p>Page 32 of 41 Training Guide: docQrules </p><p>DUPLEX SIMPLEX A fixed value which denotes the HORIZONTAL_DUPLEX duplex setting of the print job. VERTICAL_DUPLEX COLOUR YES A fixed value which denotes NO whether the print job does or does not contain colour on any of its pages. Check the specification for the list of print job formats from which colour may be determined. STATUS OF PRINTER "name" PRINTER_IDLE A fixed value for the status of PRINTER_WARMUP certain network devices (currently PRINTER_ERROR only printers are supported). PRINTER_PRINTING If the status of a printer is PRINTER_UNKNOWN requested, there are two different behaviours depending on the "name". If this is the name of a Windows printer queue, then the correct status will be returned for any device for which Windows is able to determine the status; otherwise it will be PRINTER_UNKNOWN. If it is an IP address, the printer MUST conform to the SNMP Printer-Mib specification. This variable must be surrounded by brackets. Example: IF ( ( STATUS OF PRINTER "DptPRN") = PRINTER_ERROR) { MOVE TO "Prn1" } PRINTER_STATUS PRINTER_IDLE A fixed value for the status of the PRINTER_WARMUP current printer queue (see above). PRINTER_ERROR PRINTER_PRINTING PRINTER_UNKNOWN COL_PAGES number The number of pages in the job which have some colour on them. Check the specification for a list of print job formats from which colour may be determined. "Colour" is in fact anything which is not black, white, or grey. BW_PAGES number The number of pages in the job which do not have any colour on them. Check the specification for a list of print job formats from which colour may be determined. "Colour" is in fact anything which is not black, white, or grey. DRIVER_NAME string The name of the driver on the source queue. </p><p>Page 33 of 41 Training Guide: docQrules </p><p>PRINTERPPM number The speed of the printer as reported by the driver on the source queue in pages per minute. “Page” is usually Letter size in North America and A4 elsewhere. PAPER_SIZE string The paper size of the current job, e.g. “A4”, “LETTER” MSEMAIL YES Whether the job has been printed NO from a Microsoft email program. These programs include the following text within the name of the print job: outbind:// <a href="/tags/Microsoft_Outlook/" rel="tag">Microsoft Outlook</a> – <a href="/tags/Microsoft_Office/" rel="tag">Microsoft Office</a> Outlook – Mhtml INTERNETEXPLORER YES Whether the job has been printed NO from Internet Explorer as this browser includes the HTTP protocol in the print job name: http:// https:// MEMBER_OF(“user”,”group”) boolean Returns a true if the specified user network name exists within the specified group under Active Directory. DEPARTMENT string The department the print job owner belongs to, looked up through Active Directory. USER_EMAIL string The email address of the print job owner, looked up through Active Directory. ATI(“variable”) string Returns a string value from a custom variable. ATI(“variable”,”value”) Sets the value of a custom variable. Example: ATI(“OriginalQueue”,QUEUE _NAME) ATI_EXISTS(“variable”) YES Checks to see if a custom ATI NO property exists, if so the fixed value YES is returned, otherwise the fixed value NO is returned. </p><p>Page 34 of 41 Training Guide: docQrules </p><p>2.4.1.5 Operators </p><p>Operators are reserved symbols (or keywords) that perform an operation. For example the plus operator '+' adds together two objects. Note that the operation performed depends on the operands. For example, if the two objects are numbers then this operator will produce a numeric addition. If the two objects are strings then the operation performed is concatenation. </p><p>+ Plus - Minus / Divide * Multiple <> Not Equals To < Less Than <= Less Than or Equals To > Greater Than >= Greater Than or Equals To ( ) round brackets to denote test conditions AND logical 'and' where both test conditions must be true to return a total true value for the pair OR logical 'or' where if either test condition is true then the total value for the pair is true} { } curly brackets to denote a list of commands to be executed NOT opposite of current true or false return CONTAINS Looks for occurrences of the second string within the first and returns true if it exists anywhere there (case dependent) Example: If (DOCUMENT_NAME contains “http://” ) </p><p>Examples: NOTIFY "Administrator" POPUP "Addition: "+TOTAL_PAGES+COPY_COUNT </p><p>NOTIFY "Administrator" POPUP "Concatenation: String 1="+TOTAL_PAGES+", String 2="+COPY_COUNT </p><p>IF ( ( COPY_COUNT>1) AND (TOTAL_PAGES / COPY_COUNT =1) ) { NOTIFY "<SOURCE_MACHINE>" POPUP "<DOCUMENT_NAME> has one original and <COPY_COUNT> copies" } ELSE IF ( COPY_COUNT>1) { NOTIFY "<SOURCE_MACHINE>" POPUP "<DOCUMENT_NAME> has "+TOTAL_PAGES / COPY_COUNT+" originals and <COPY_COUNT> copies" } </p><p>IF ( ( TOTAL_PAGES >20) AND NOT ( ( STATUS OF PRINTER "193.1.1.111") = PRINTER_ERROR) ) </p><p>IF ( ( STATUS OF PRINTER QUEUE_NAME ) = PRINTER_PRINTING ) { NOTIFY "<SOURCE_MACHINE>" POPUP "Collect your job <DOCUMENT_NAME> from DptPRN" MOVE TO "DptPRN" } </p><p>Page 35 of 41 Training Guide: docQrules </p><p>2.4.1.6 Errors </p><p>There is a button on the script editor for checking whether the syntax is correct or not. This will not identify incorrect spellings, e.g. it will not find fault with using COLOR instead of COLOUR, but it will identify if rounded or curly brackets are not correctly closed. For example it will find an error in the statement: IF ( ( COPY_COUNT>1) AND TOTAL_PAGES / COPY_COUNT =1) ) because it is missing a bracket. </p><p>All runtime scripting errors are written into the Application Event Log and if there are problems with scripting then this should be checked. There is an error handler built into scripting which will trigger if there is a runtime error with the script. </p><p>2.4.1.6.1 On_Error </p><p>This invokes a list of commands, enclosed with curly brackets, when the script preceding it encounters an error. Example: IF ( TOTAL_PAGES >20 ) { NOTIFY "<SOURCE_MACHINE>" POPUP "Your job <DOCUMENT_NAME> has been moved to DptPRN because it is more than 20 pages." MOVE TO "DptPRN" } ON_ERROR { NOTIFY "Administrator" POPUP "User <USER> is not running Windows Messenger" } </p><p>2.4.1.6.2 Error_Message </p><p>When a runtime error occurs, this variable contains the reason for the error and duplicates the information written to the Application Event Log. Example: The following script is wrong because the queue called PRN1 does not exist. IF (DOCUMENT_NAME="Test Page") { MOVE TO "PRN1" } ON_ERROR { NOTIFY "Administrator" POPUP ERROR_MESSAGE } Will generate a popup to the Administrator saying that the printer name is invalid. </p><p>Page 36 of 41 Training Guide: docQrules </p><p>2.5 Workflow This describes the workflow for how docQrules processes print jobs: </p><p>New job arrives on a print queue in a route on a PC running docQrules Server </p><p>Job is automatically paused on the queue </p><p>If Auto Delete is Yes enabled – is this job Delete duplicate(s) a duplicate? </p><p>No </p><p>Job is analysed to determine: datatype, how many pages, how many copies, whether it has colour in it </p><p>Does the Yes job match all the No conditions in the first rule in the route? </p><p>Perform the rule action (print on No Does the Yes current queue / job match any move / modify the exceptions in the job to another rule? queue / delete </p><p>Yes Is there another rule? Is logging No No turned on? No Does the Yes Yes job match all the Yes conditions in the next Write to CSV log file rule in the route? Un pause and Print job on the selected END queue </p><p>Page 37 of 41 Training Guide: docQrules </p><p>2.6 Backing up docQrules </p><p>The rules, routes, and logfile location for your docQrules Server are stored in the following folder: </p><p>C:\Documents and Settings\All Users\Application Data\Advanced Technologies International\docQrules\CONFIG.XML </p><p>If you are only using rules within docQrules then simply include this file in any backup procedure. If you are using scripts though then you will need to also include the contents of the following folder: </p><p>C:\Documents and Settings\All Users\Application Data\Advanced Technologies International </p><p>If you are also using VBScripts then it is suggested that they are also stored in this folder and are included in any backup procedure. </p><p>3.0 Issues with moving print jobs </p><p>No testing is done by the product to determine whether the new destination device can support the print job that is being moved to it. Whether the job will print correctly depends entirely on what format the print job is in, what the source queue driver is and what the destination device is. For example, if the format of the job on the source queue is PCL5e and the destination device supports PCL5e (even if the driver on the destination queue is not PCL5e) then the job should output correctly. It may not have the same finishing (stapling, hole punching) or cassette selection as the original – particularly if the source and destination drivers are by different manufacturers – but it should still have the correct page detail on the correct paper size and duplexing. </p><p>Whatever format the source job is in, it should be supported by the destination device, so if the job is in PostScript then the destination device should support PostScript. In some situations it may be possible to call filters through scripting which will allow a job formatted for one manufacturer’s device to output correctly on a different manufacturer’s device if it supports the same PDL (print language). </p><p>If the format of the source job is in EMF then this can be moved to any format of driver – although again the finishing and cassette selection may not be correct if the source and destination drivers do not match. </p><p>N.B. A common misconception is that in Windows you can set the default Datatype within the Print Processor, e.g. to EMF. THIS DOES NOT WORK!! </p><p>What is EMF? </p><p>As defined by Microsoft: </p><p>“EMF EMF, or enhanced metafile, is the default datatype with most Windows-based programs. With EMF, the printed document is altered into a metafile format that is more portable than RAW files and usually can be printed on any printer. EMF files tend to be smaller than RAW files that </p><p>Page 38 of 41 Training Guide: docQrules contain the same print job. Regarding performance, only the first portion of a print job is altered, or rendered on the client computer, but most of the impact is on the print server computer, which also helps the application on the client computer to return control to the user faster. RAW RAW is the default data type for clients other than Windows-based programs. The RAW data type tells the spooler not to alter the print job at all prior to printing. With this data type, the entire process of preparing the print job is done on the client computer.” </p><p>Basically everything you see and interact with in Windows is a GDI (Graphical Device Interface) object. So your Word document with its text and graphics is really just a collection of GDI objects. When you print in Windows, these GDIs are collected together as an Enhanced Metafile and are then sent off to the print server (unless the client is Windows 98 or Windows 95 which use a different mechanism for printing). At the print server the driver will either retain the print job in EMF format until it actually needs to print it, or it will process it to a RAW printable format. RAW is a print ready format. Printers understand a different language to Windows. They understand print languages such as “PostScript”, “PCL”, “RPCS”. These are all “RAW” formats as far as Windows is concerned. </p><p>3.1 CPCA </p><p>CPCA is a proprietary Canon format for encapsulating PCL and PostScript print jobs. If a CPCA packaged job is moved or copied from one queue to another, then the job will be transferred as a binary copy so the destination job is identical to the source. This means that copy and move of CPCA jobs should only be to another Canon device which supports CPCA. If the CPCA job is reprinted in any way, such as to only print a certain page range, or to apply duplex, or to decolourise, then the resulting job can be output on any manufacturer’s device which supports that PDL, i.e. any CPCA commands for features such as copy counts will be converted to their equivalent PJL. </p><p>4.0 Job Logging docQrules can be used as a simple job logging and auditing tool. It can track who printed what job to which printer (as long as you are using the 45 day trial or an Enterprise Edition licence), and can detail how many pages they printed, whether the job was duplex, in colour – and if it is a supported datatype, even how many colour pages were printed. </p><p>The way to configure this is as follows: </p><p>1. Create a Route, call it something like “Everything”. 2. Assign all the print queues on the server to this Route. 3. Create a new Rule, call it something like “Logging”. 4. Set the Condition for this rule to be the number of pages being greater than or equal to 0 (so it triggers on all jobs). 5. Set the Action for this rule to be “Do Nothing.” 6. Set this rule to “Log when action occurs”. 7. Save this rule. 8. Assign this rule “Logging” to the route “Everything”. 9. Ensure that you have correctly configured a log file path (see page 23 for further details). An example logfile would be “C:\LOGFILE.LOG”. Press the “Check Path” button to check that the path is okay and to create the logfile. 10. If you have Excel installed then in the Admin program press “View Log in Excel”. Alternatively copy the contents of the \Bin\Utilities\LogViewer folder on the </p><p>Page 39 of 41 Training Guide: docQrules </p><p> installation CD to your hard disk somewhere, then from this location run the program called VIEWLOGFILE.HTA that is in this folder. Provide the path to the logfile, e.g. C:\LOGFILE.LOG and you can then view the entire logfile (this is only supported on Windows XP or Server 2003). </p><p>Although the logfile is CSV format, it is not recommended to use Excel to directly open this file, due to the fact that it locks the source file and prevent anything else from writing to it. Instead use either a text editor like NotePad, or the included utility, or use the “View Log in Excel” button as this passes a copy of the log file to Excel rather than directly running Excel on the file. </p><p>5.0 Troubleshooting </p><p>There is Help with the product that includes a Troubleshooting section, however, if you’ve configured rules and routes and they do not appear to be working then please check the following: </p><p>5.0.1 Is the route enabled? 5.0.2 Is the queue in the route? 5.0.3 Are there rules on that route? 5.0.4 Look at the rules – are they correct? For example, if the job is supposed to route when over a certain number of pages – is that job over that number? 5.0.5 Look in the Event Log for Applications on the server – if the software has encountered an error then check to see what it is (for example if the rule involves a popup notification that has failed because the user is not running the Messenger service then the event log will say “Message alias not found on the network”). 5.0.6 If you do already have logging enabled for that rule then do so and look at the log file – this can tell you things like what the print job type is which can help you to determined whether jobs from one queue can be moved to another. 5.0.7 If you are running on XP and have added print queues since the software was installed then open your services (Start | Run | SERVICE.MSC) and restart the Print Spooler service. This should fix any issues where jobs aren’t being written using the numeric naming convention. 5.0.8 If you are using Windows Messenger for your popup notification then ensure that the Messenger Service is running on both the server and the user’s PC. From the server try opening a command prompt (Start | Run | CMD.EXE) and typing in the following where computername is the name of the user’s PC: NET SEND computername Test 5.0.9 If you are using the Admin Popup for your popup notification then ensure that the user PC either has the Firewall disabled or “Remote Administration” is an exception to the Firewall. Also ensure that the Admin Popup service is running on the docQrules Server and that it’s running under an account which is a member of Domain Administrators. 5.0.10 If you are having problems with some queues, but not others, then check which drivers are on those queues. It has been seen with some print drivers that they write the spool file twice. What this means is that if you open the spool folder (you can find out where this is by opening your Printers folder and then selecting File | Server Properties | Advanced and noting the “Spool Folder Location”) and watch what happens when you print to a particular printer, under normal circumstances there should be two files written. Both files should have the same prefix name which is related to the spooler ID, e.g. if the spooler ID for a job is 17 then the prefix will be padded with zeroes to 5 characters – in this case 00017. One file will have the extension .SPL as it is the actual spool file. The other file will have the extension .SHD and is the Windows “shadow” file. </p><p>Page 40 of 41 Training Guide: docQrules </p><p>These problem drivers though will immediately delete the first spool file (the 00017.SPL in the example above), and then create another one, usually with an incremental number – e.g. 00018.SPL - which is what gets sent to the printer. It is not known why this occurs nor why the spooler is not notified of this change. These drivers can also have an inherent problem in that they hang applications that try printing to them if the queue is paused. Please raise this with the manufacturer if you encounter this issue. 5.0.11 Check that the datatype of the print job is supported by the software (particularly where you want to perform colour detection). Look at the log file to determine the datatype of the job. </p><p>5.1 Reporting problems </p><p>You should always report any problems direct to your reseller. You should provide the following details: </p><p>Checklist </p><p>1. Example Spool File - .SPL file(s) If you are having problems with a particular driver, printer, queue or job, then you should pause the print queue in Windows, disable the route in docQrules, then print a job to that queue. Open the spool folder (see the Troubleshooting section for more details) and find the .SPL that is there. 2. System Information File - .NFO file Click Start | Run and type in MSINFO32.EXE. Run this program on the docQrules Server and save the System Information file (.NFO). 3. Application Event Log - .EVT file Click Start | Run and type in EVENTVWR.EXE. Run this program on the docQrules Server, right click on “Application” on the left and choose to Save Log File (.EVT). 4. Your Configuration (rules and routes) ZIP the contents of the \Documents and Settings\All Users\Application Data\Advanced Technologies International\docQrules folder. 5. Print Driver Information Which printer driver you are having problems with – the manufacturer, the model number, the print language it uses (e.g. PCL5, PCL6, PostScript), the version of it, and where the driver may be downloaded from for testing (there is a useful tool called PrintMig which may be downloaded from the Microsoft website and which will produce a zipped CAB file of all your print queues and drivers on Windows 2003 Server. On later operating systems you can run PRINTBRMUI which will do the same thing). 6. Problem Description What were you trying to do? What did you expect would happen? What happened? Do include screenshots in the Problem Description which can be in a Word or WordPad document. </p><p>If you have a maintenance contract with ATI then you may contact them direct by sending this information to: support@ati-uk.com You may also request an online Remote Support session by running “Remote Support” (available in the Help menu) and emailing ATI’s Technical Support department with the unique User ID and password PIN it generates. </p><p>Page 41 of 41 </p> </div> </article> </div> </div> </div> <script type="text/javascript" async crossorigin="anonymous" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8519364510543070"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script> var docId = '776bdf6f535a4cf229b7de988bc51a85'; var endPage = 1; var totalPage = 41; var pfLoading = false; window.addEventListener('scroll', function () { if (pfLoading) return; var $now = $('.article-imgview .pf').eq(endPage - 1); if (document.documentElement.scrollTop + $(window).height() > $now.offset().top) { pfLoading = true; endPage++; if (endPage > totalPage) return; var imgEle = new Image(); var imgsrc = "//data.docslib.org/img/776bdf6f535a4cf229b7de988bc51a85-" + endPage + (endPage > 3 ? ".jpg" : ".webp"); imgEle.src = imgsrc; var $imgLoad = $('<div class="pf" id="pf' + endPage + '"><img src="/loading.gif"></div>'); $('.article-imgview').append($imgLoad); imgEle.addEventListener('load', function () { $imgLoad.find('img').attr('src', imgsrc); pfLoading = false }); if (endPage < 7) { adcall('pf' + endPage); } } }, { passive: true }); </script> <script> var sc_project = 11552861; var sc_invisible = 1; var sc_security = "b956b151"; </script> <script src="https://www.statcounter.com/counter/counter.js" async></script> </html>