
Filter on PitStop XML Report
This script can be used for routing jobs dependent on the result of the PitStop Server preflight report after adding it to the metadata.
Information
Supported by: PowerSWITCH (MAC and WIN)
Language: JavaScript
Description:
Before you can use this script in a flow, you need to make sure that the preflight information is added to the file's job ticket. The following 2 steps are needed in order to accomplish this:
- The property "Report type" on the PitStop Server configurator in PowerSWITCH needs to be set to XML.
- The Pickup XML tool should be used to add the preflight information to the job ticket for each preflighted PDF. You can do this by making sure that both the original PDF and the preflight report (XML file) are dropped into the same folder and have the same name. (See example flow)
When you select this script in a flow, the following properties are added to the outgoing connection of the Script Element:
- - Admit errors: defines if the connection allows PDF files with preflight errors to go through.
- - Admit warnings: defines if the connection allows PDF files with preflight warnings to go through.
- - Admit fixes: defines if the connection allows PDF files to go through where certain problems have been fixed during the preflight process.
- - Use regexp: defines if a regular expression should be used for filtering on the preflight messages. If not, any error, warning or fix is allowed.
- - Use message regexp: allows you to define a regular expression that is used to match one of the messages in the XML preflight report. If no messages match the regular expression, the PDF file will not be moved over the connection.
Each time a new file arrives, the script will try to match any of the preflight messages with any of the outgoing connections using these properties. If a connection is found that matches, the PDF is moved over that connection specific connection. Once a matching connection is found, the script will not look for another matching connection for that file and will continue with the next file.
Using this script
- Download and save the script on your computer: download script.
- Select the Script element in your PowerSWITCH flow and browse to the script in the Script package property.
or - Open the script in the SWITCHscripter and change it to your needs.
Example flow
- Sort on PitStop XML report content
The XML preflight reports created by PitStop are picked up as metadata. This metadata is used to sort files in different folders depending on the type of errors that were found e.g. color, font or other errors.
