I want to be able to pass a qty value from the workflow to the output preset to the Separate by Count value in the preset used in the workflow.
I’m trying to build a somewhat generic workflow but want to be able to set this value to control the output file separations. I’m trying to get around having to create multiple variations of the same preset but with different split quantities.
You could use a script to dynamically change the value in the preset, and then install that modified preset into the Workflow environment.
The following script does just that:
var inputFileName = "D:/Presets/generic.OL-outputpreset";
var outputFileName = Watch.ExpandString("%t/generic.OL-outputpreset");
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
xmlDoc.load(inputFileName);
var node = xmlDoc.selectSingleNode("/outputCreationConfig/separationConfig/pageCountSplitNo");
node.text="3456";
xmlDoc.save(outputFileName);
Watch.InstallResource(outputFileName)
Note: this script keeps modifying the same “generic.OL-outputpreset” file. So if you have several processes using that same preset, or if your process uses self-replication, then you might run into concurrency issues. It’s important to be aware of this caveat.
I had thought of the potential for multiple processes needing to access the preset so used connectOutputPresetOut = Watch.ExpandString(“%u”)+“.OL-outputpreset”;
to create a unique name to save the preset as.
Then delete of this preset in the workflow once the output creation had run.
I might look at changing over the the method you have suggested as it looks a bit cleaner.
One thing I am trying to work out is how the separations work when imposing a job at the same time.
I was initially trying to separate based on Document Counts as wanted to try and keep full documents together in the separate output files to try an limit confusion in out production processing environment.
But it seems to ignore the separations if they are set to split on a document count and not sheets. I can kind of see why this would be the case but maybe thought I might be missing something.
One other thing I thought too is that I might need to set the stack height values as well when imposing.
How do these work when also separating the output? Do those 2 setting work independent of each other?
Sorry to respond with a question, but could you explain a bit more about why you need to split by number of documents? The reason I am asking is because I wonder if there is a way to get you what you need through grouping in a job preset. It might be a bit more involved to set up, but could avoid having to modify a preset on the fly.
I was wanting to keep whole records together when we create separate pdf files. It’s more for our production environment and so we don’t get records split across files going to our printers.
I’ve had some success separating on sheet counts, it’s just a little tricky for jobs that have variable page counts or page quantities that don’t divide evenly into the separation values that are set in the output presets. I’m thinking we’ll just work with files based on 10,000 sheets separations.
We also need to write corresponding report files for each output pdf, we’ve been doing this with a js script but this also need to know what records are in each output pdf. This is were I’m having a few issues as this reports needs the record counts and First & Last record names from the data for each output file to help reconcile/track files in our production environment.
We’re migrating out of Pres which can write these report files from the PDCs at runtime. So far we haven’t seen that Connect can replicate this functionality.
In Connect we are extracting this info from the run metadata which is where I’m having trouble working out what records are in each file especially for jobs that have varying page counts. Unless there is a way to extract info this from each pdf file after the output preset has run?
I’ve tried looking at the JobCreation presets but the help documentation isn’t really clear as to how the different options work.