cancel
Showing results for 
Search instead for 
Did you mean: 
StefanT-Xerox
FreeFlow User

Re: How to use external process for comparing PDF page amounts?

Based on my previous example the attached modified script will, besides doing the page number comparison, also check if the job name contains the string 'test'.

External process parameters:

"$FFin$" "$FFout$" "$FFwfDoc.pages$" "$FFjobpages$" "$FFwfJob.jobName$"

Stefan

0 Kudos

Re: How to use external process for comparing PDF page amounts?

Many thanks for your help, the scripts we are now using based on your starters keep a lot of errors away from the production.
So now we want to go the next step.
We want to make decisions based on the result of the external node.

Is it possible to access another node directly out of the script?
Or can we write with the external node a value back into an existing variable?
Or can we write with the external node a value back into the PDF file?

With one of these possibilities we would have opened the sky.

0 Kudos
StefanT-Xerox
FreeFlow User

Re: How to use external process for comparing PDF page amounts?

You can update some variables in the external node by including additional variables. Attached is a sample script that will update the print quantity based on a pdf keyword. You need to write the variables you need to update to $FFout$\FFSetVariables.txt.

Using this example:

import sys

f = open(sys.argv[2]+"/FFSetVariables.txt","a+") # Create and write the text file FFSetVariables.txt in $FFout$ (sys.argv[2])

f.write ("$FFwfJob.printQuantity$="+sys.argv[3]) # Write the variable $FFwfJob.printQuantity$=<<The value in variable sys.argv[3] which is the pdf keyword>> to the text file

f.close() # Close the text file

Then setup the external process like this:

external.png

The attached pdf contains the keyword 150, which will be set as the print quantity.

You could also create a new/updated pdf somehow by a script. The new/updated pdf then has to be copied/moved to $FFout$ to pass it to the next stage in the workflow.

Stefan

 

 

0 Kudos