Slow checking for cutting guide by regular expression.
-
- Member
- Posts: 23
- Joined: Thu Dec 08, 2022 2:25 pm
Slow checking for cutting guide by regular expression.
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.
- JimmyHartington
- Advanced member
- Posts: 384
- Joined: Tue Mar 22, 2011 7:38 am
Re: Slow checking for cutting guide by regular expression.
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
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
-
- Member
- Posts: 23
- Joined: Thu Dec 08, 2022 2:25 pm
Re: Slow checking for cutting guide by regular expression.
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].
- JimmyHartington
- Advanced member
- Posts: 384
- Joined: Tue Mar 22, 2011 7:38 am
Re: Slow checking for cutting guide by regular expression.
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?
-
- Member
- Posts: 23
- Joined: Thu Dec 08, 2022 2:25 pm
Re: Slow checking for cutting guide by regular expression.
I just need to report that the file doesn't have a cutter guide colour.
- JimmyHartington
- Advanced member
- Posts: 384
- Joined: Tue Mar 22, 2011 7:38 am
Re: Slow checking for cutting guide by regular expression.
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.
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.
-
- Member
- Posts: 23
- Joined: Thu Dec 08, 2022 2:25 pm
Re: Slow checking for cutting guide by regular expression.
That sounds like a good workaround Jimmy. I will give it a try, thank you.