Hello everyone,
Maybe someone can help me. I need a preflight that I want to use in Enfocus Switch via PitStop Server. It should check whether all pages in the PDF contain the black channel. If the black channel is missing on a page in the PDF, a warning message should be generated. I want to check documents with and without spot colors, and the warning should only be generated if the black channel is missing on one of the pages in the PDF. Does anyone have any idea how I can solve this?
Check whether the black channel is present on all sides
Re: Check whether the black channel is present on all sides
Run a Preflight Profile with the "Inks" checkbox in the General tab checked. Alternatively, run an Action List with the Action "Gather ink info". Choose "XML" as the report format and send the result along a "Data with Log" connection. The now has a dataset that contains the report and logs the ink usage for the complete document and also per page. This is the most reliable method because it will detect missing black also when there are CMYK objects that have an empty black and CMYK images with an empty black channel, etc.
Next you can build a condition that compares the number of pages that contain black as per the report with the number of pages of the document. If they are not equal it means there are pages that do not contain black.
The left-hand side of the condition is:
[Metadata.Integer:Dataset="Log",Model="XML",Path="count(/EnfocusReport/InkInfo/PageInkInfo/Ink[@name='Black'])"]
the right-hand side is:
[Stats.NumberOfPages]
If you choose the operator "equals" then jobs will black on all pages will follow that connection.
The condition on the other connection is of course "All other jobs".
Next you can build a condition that compares the number of pages that contain black as per the report with the number of pages of the document. If they are not equal it means there are pages that do not contain black.
The left-hand side of the condition is:
[Metadata.Integer:Dataset="Log",Model="XML",Path="count(/EnfocusReport/InkInfo/PageInkInfo/Ink[@name='Black'])"]
the right-hand side is:
[Stats.NumberOfPages]
If you choose the operator "equals" then jobs will black on all pages will follow that connection.
The condition on the other connection is of course "All other jobs".
Re: Check whether the black channel is present on all sides
Hi, freddyp, thank you so much, this works perfectly! You saved my day. 
