Page 1 of 1
Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 12:11 pm
by paul_barker
We are running a pre-flight check in Pitstop (within Switch) which checks if the document is missing a cutter guide including creases and prefs etc. We currently use select spot colour by regular expression ".*[Cc][Uu][Tt].*|.*[Dd][Ii][Ee].*|.*[Cc][Rr][Ee][Aa][Ss][Ee].*|.*[Dd][Rr][Ii][Ll][Ll].*|.*[Ff][Oo][Ll][Dd].*|.*[Pp][Ee][Rr][Ff].*|.*[Sc][Cc][Oo][Rr][Ee].*" and then log the absence of a selection. This works but seems to check every page and takes a very long time as some of our files have nearly 1000 pages. Is there a way to just check if the overall document contains an ink based on a regular expression instead of having to checking all pages individually. I have managed to use FastLane to grab the inks in the file but can't find a way to use that in a preflight check.
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 12:28 pm
by JimmyHartington
In Switch you have the variable [Stats.Colorants] which will return all the separations in a file.
You should then be able to use this variable to sort your files.
This is the description in Switch:
PDF: a list of the names of all colorants as they appear in Separation and DeviceN color spaces and in page separation info dictionaries in the document; TIFF: a list of the names of all colorants for Duotone or Multichannel images; the list is empty for all other color models
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 12:38 pm
by paul_barker
Thanks for the reply Jimmy. What I need is to be able to report the absence of a cutter guide colour as part of the preflight report but can't see a way of doing this using [Stats.Colourants].
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 2:01 pm
by JimmyHartington
Do you need the report to log the absence on each page or is it enough to know that the file does not have a cutter guide colour?
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 2:33 pm
by paul_barker
I just need to report that the file doesn't have a cutter guide colour.
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 2:41 pm
by JimmyHartington
So a workaround could be to use the [Stats.Colorants] to route jobs, which does not have the cutter guide color.
Use Pitstop to add add the text "##No cutter color guide##" outside the mediabox on page one.
Route the files back into the preflight check.
Then your preflight check could log the existence of this text string instead.
Re: Slow checking for cutting guide by regular expression.
Posted: Mon Jan 13, 2025 3:08 pm
by paul_barker
That sounds like a good workaround Jimmy. I will give it a try, thank you.
Re: Slow checking for cutting guide by regular expression.
Posted: Wed Feb 12, 2025 9:51 am
by freddyp
The [Stats.Colorants] is a good approach. Checking the presence of a regular expression is easily done in a condition with variables with the operator "Matches".
[Stats.Colorants] returns something like Black;All;Die;Varnish, so with a condition like this:

- Spot color condition.jpg (24.56 KiB) Viewed 47517 times
true means one of the spot colors of the regex is present and jobs that follow "All other jobs" do not such a color.
Another fast approach is to use the FastLane app:
https://www.enfocus.com/en/appstore/product/fastlane. You get the color information in a dataset and you can query that. In this case the solution above is easier to implement.
Re: Slow checking for cutting guide by regular expression.
Posted: Thu Feb 13, 2025 9:40 am
by paul_barker
Hi Freddyp
Thanks for that. I am aware of being able to do that in Switch but am trying to do the check so that it is reported as part of a pitstop preflight report but there is no action to just check colorants in a document in pitstop, the check always goes through every page one by one and checks for the existence of every possible name based on the regular expression which takes a very long time. I have found the the regular expression (?i).*cut.*|.*die.*|.*crease.*|.*drill.*|.*fold.*|.*score.*|.*perf.* seems to work the same and a lot quicker but still is very slow.
Re: Slow checking for cutting guide by regular expression.
Posted: Fri Feb 14, 2025 3:35 pm
by freddyp
I missed the nuance that you wanted to have that in the preflight report. In that case I like Jimmy's workaround, but instead of adding text and checking the presence of the text, I would suggest to use a field in the document info (perhaps the "keywords" field). You can set the field with "Change document info", and afterwards use "Select by document info" followed by "Log selection". There is no need to do this in two steps, it can be done inside the same action list.
Re: Slow checking for cutting guide by regular expression.
Posted: Fri Feb 14, 2025 4:52 pm
by paul_barker
That's a great idea, thanks Freddyp. I will try that out.
Re: Slow checking for cutting guide by regular expression.
Posted: Thu Mar 06, 2025 5:14 pm
by yosimo
Perhaps a simple pitstop preflight that only names the color separations will suffice.
I think that's faster than an pitstop action list.