Slow checking for cutting guide by regular expression.

Post Reply
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Slow checking for cutting guide by regular expression.

Post 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.
User avatar
JimmyHartington
Advanced member
Posts: 453
Joined: Tue Mar 22, 2011 7:38 am

Re: Slow checking for cutting guide by regular expression.

Post 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
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Re: Slow checking for cutting guide by regular expression.

Post 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].
User avatar
JimmyHartington
Advanced member
Posts: 453
Joined: Tue Mar 22, 2011 7:38 am

Re: Slow checking for cutting guide by regular expression.

Post 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?
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Re: Slow checking for cutting guide by regular expression.

Post by paul_barker »

I just need to report that the file doesn't have a cutter guide colour.
User avatar
JimmyHartington
Advanced member
Posts: 453
Joined: Tue Mar 22, 2011 7:38 am

Re: Slow checking for cutting guide by regular expression.

Post 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.
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Re: Slow checking for cutting guide by regular expression.

Post by paul_barker »

That sounds like a good workaround Jimmy. I will give it a try, thank you.
freddyp
Advanced member
Posts: 1129
Joined: Thu Feb 09, 2012 3:53 pm

Re: Slow checking for cutting guide by regular expression.

Post 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
Spot color condition.jpg (24.56 KiB) Viewed 47506 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.
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Re: Slow checking for cutting guide by regular expression.

Post 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.
freddyp
Advanced member
Posts: 1129
Joined: Thu Feb 09, 2012 3:53 pm

Re: Slow checking for cutting guide by regular expression.

Post 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.
paul_barker
Member
Posts: 27
Joined: Thu Dec 08, 2022 2:25 pm

Re: Slow checking for cutting guide by regular expression.

Post by paul_barker »

That's a great idea, thanks Freddyp. I will try that out.
yosimo
Member
Posts: 64
Joined: Tue Mar 27, 2018 6:25 pm

Re: Slow checking for cutting guide by regular expression.

Post 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.
Attachments
Which color separations are used.zip
(1.8 KiB) Downloaded 432 times
Post Reply