Apologies, I noticed there needed to be an extra apostrophe (') at the end of the Preflight Report URI.
With a bit of tweaking to the python script, this will be perfect!
Thanks very much for your help.
Thanks Stefan, it seems there's an error with the URI of the preflight report when being processed through the Python script. It doesn't appear to be honouring the correct URI?
See bold below:
<stderr 11/10/2021 13:49:20>
Traceback (most recent call last):
File "D:\Xerox User Data\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\watermark_colorants.py", line 14, in <module>
tree = ET.parse(sys.argv[:-1], parser=parser)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\xml\etree\ElementTree.py", line 1229, in parse
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\xml\etree\ElementTree.py", line 569, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Xerox User Data\\FreeFlow\\Core\\00000000-0000-0000-0000-000000000000\\Platform\\Spool\\85a3dd61-ec22-493c-b434-dce978346fe1\\REPORT_ _63769556959595.xm'
You could try the attached script to see if it does what you need. Python is required along with reportlab and pikepdf (from cmd as admin run pip install reportlab and pip install pikepdf).
To run the script, replace the Watermark node with an External Process. Upload both scripts to the FreeFlow Core scripts folder. In the External Process select the bat file. The bat file runs the Python script. In the bat file you may need to change the path to Python and to the FreeFlow Core scripts folder. In the External Process use the parameters:
"$FFin$" "$FFout$" "$FFwfJob.preflightReportUri$'"
The Python script finds all platnenames in the XML preflight report and then creates a new single page pdf where the platenames are printed as text and tagged with the colorant (printed with Courier 5 pts from the lower left corner). Finally the incoming pdf is watermarked with the new pdf on all pages.
Would be an extremely beneficial feature to add in with not much effort in the backend by the looks of it.
Thanks for reaffirming what I knew to be true though.
FFCore does not have the capability to add "spot colorant" text to a PDF. The feature was designed to let a user know what colorants were being used -- the color of the "color label" text will not be using the corresponding spot colorant.
Exactly that, in the example given, the colorant should print in PANTONE 871.
Thanks for your response.
Are you expecting the colorant information when using the FFCore variable (in conjunction with the preflight node) $FFwfDoc.ColorantNames$ to display the "printed" colorant names using the actual colorant?
I'm pulling in the PDF colorants variable from an XML in order to process the tag as a watermark onto the job sheet, however, the colorants are applied in "DeviceCMYK" spot color, instead of the original spot color. This is incorrect for separations. We need the colorants to be tagged in the correct spot color.
Any ideas on how to change how the data is pulled in from the XML in the back end? It seems to be pulling in the "Alternate Colour Space ID" name as the spot color name, instead of the actual plate name?
(See screenshot below)
Solved! Go to Solution.