cancel
Showing results for 
Search instead for 
Did you mean: 
r.blake
Frequent Member
Frequent Member

x-dimension and y-dimension in XPIF added via script

Jump to solution

I am trying to add x-dimension and y-dimension into the XPIF via a script, to enable the variable media size selection on Impose node.

Impose node is setup like this:

https://i.imgur.com/q1TC1vm.png 

and if I submit the PDF along with XPIF where x-dimension and y-dimension are specified, it works.

Now, instead of adding an existing XPIF, I tried to use a script to instead modify the job's XPIF generated by FFCore.

Before Impose node I put an External node which calls the following pyhon script:

https://pastebin.com/J52bWxdE

.bat file:

"C:\Python3\python.exe" "C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\test_var_impose.py" %1 %2 %3

and following Parameters in External node:

"$FFin$" "$FFout$" "$FFxpf$"

The script gets executed, no errors, modifies the XPIF and uploads it back correctly as far as I can tell - I used Save node to save the job ticket after External node and check it.

However, Impose node following that stops working - now it produces an error such as:

https://i.imgur.com/RG4ecwQ.png 

So, what's the issue here exactly?

First of all, there is no max allowable range since both stock width and height are specified as dynamic.

And then, the value in the error is still different from what the script had written to XPIF, which is
x-dimension = 32000

y-dimension = 45000

So Impose node didn't get the data specified in XPIF?

 
0 Kudos
4 Replies
barwapk
Valued Member
Valued Member

Re: x-dimension and y-dimension in XPIF added via script

Jump to solution
I had something simillar, try to switch values from x to y, I dont remember whitch has max width 330mm
0 Kudos
r.blake
Frequent Member
Frequent Member

Re: x-dimension and y-dimension in XPIF added via script

Jump to solution

Thied several other files, and now I don't even get the error - the resulting files are imposed to their own size + bleed dimensions, and not to what is specified in XPIF.

Basically, Impose node only reads stock width and stock height properties from the submitted XPIF sent with the job itself, and completely ignores these properties if they are specified in a workflow XPIF via External node.

Sounds like a bug to me.

0 Kudos
DavidU54339-XRX
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: x-dimension and y-dimension in XPIF added via script

Jump to solution

The issue is that the FFCore variables $FFwfJob.mediaWidth$ and $FFwfJob.mediaHeight$ get set at job submission. When one changes the xpif within the workflow the variables are not updated. The variables are being used in your use case for the imposition press sheet size.

A solution is to use the External node to update the variable values -- see example below and attached script.

p1.png

 

r.blake
Frequent Member
Frequent Member

Re: x-dimension and y-dimension in XPIF added via script

Jump to solution

writing to FFSetVariables.txt indeed works, thanks

0 Kudos