sschardan Posted May 23, 2014 Share Posted May 23, 2014 I have used the OpenNewOutput feature of FusionPro many times with great success. Recently I needed to add a twist to using this feature. I had a job that needed to be split into separate files based on a "Package" field. These separate files needed to be further split into 4000 record segments so our press' imposition software could print them as a 2-up stack of 2000 sheets. I am sure someone else could write a more concise code, but here is the code I used, which worked perfectly: Javascript Globals var SetCount = 0 var SubSetCount = 1 OnRecordStart Rule var JobNumber = "12345 " var StackSize = 4000 function NewName() { FusionPro.Composition.OpenNewOutputFile(JobNumber + Field("Package") + "_" + SubSetCount + "." + FusionPro.Composition.outputFormatExtension); } if (FieldChanged("Package")) { SetCount = 1; SubSetCount = 1; NewName() } else { if (SetCount < StackSize) { SetCount = SetCount + 1; } else { SubSetCount = SubSetCount + 1; NewName() SetCount = 1; } } This created the desired output files named by job number, package number, and subset number. (12345 P1_1, 12345 P1_2, 12345 P15_12, etc.) Questions about this: 1 - We have another press that does not have its own imposition capabilities. When trying to use a stacked imposition template, the output is generated sequentially instead of stacked. If I am simply using the OpenNewOutput without the additional sub-setting, in conjunction with this OnJobStart rule: FusionPro.Composition.chunksBreakStacks = true; the stacking works perfectly. Is it possible to get stacked impositioning to work with my code? 2 - To avoid having to enter the job number manually, I would love to capture it from the name of the input template file. I know I can read the name of the input data file, but is it possible to read the name of the input pdf template file? Thank you, VDP Creator 9.2.26 Mac OS 10.7 Acrobat XI Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.