I have a job with complex splitting requirements, and want some advice on how best to proceed.
Data source is a PDF full of one-page letters. Multiple letters might go to the same household. These are not necessarily contiguous in the source file. Datamatrix barcode is required.
Our inserter can fold and insert 8 sheets maximum.
What I’ve managed so far:
-
Map a document recipient identifier field (something unique to household, such as an Account Number)
-
Job Preset to Sort by this field and Group by this field into Document Sets.
-
In the same Job Preset, Size Grouping 1-8, 9-Largest, into Job Segments.
-
In the Output Preset, Additional Barcode, and Separation by Job Segment.
This gives me two output files:
- All the insertable mailpieces, barcoded across the Document Set
- All the 9-page + documents in a separate file, also barcoded (the “overlimit” mailpieces)
What I would ideally like to achieve is to split the “overlimit” documents into separate 8-sheet mailpieces, in essence turning a single mailpiece into several 8-sheet mailpieces, appropriately barcoded. For example if an overlimit document set has 11 letters, I want 1 8-page mailpiece and one 3-page mailpiece, with the first barcoded as an 8-sheeter and the second as a 3-sheeter.
What I tried was to create a second Output Preset with Sheet Count splitting at exactly 8 sheets, and run the overlimit output file back through the data map/template/job preset/ and new “Sheet Split” output preset. This works, it does separate the file into 8-sheet/3-sheet, but this still barcodes the full 11 pages. It barcodes BEFORE it splits, it seems, rather than after the split.
In other words: I want to sort and group into Document Sets by Address (household), and if a Document Set ends up being over 8 sheets, split this into smaller, 8-sheet Document sets. Apply the barcode after all the sorting/grouping/splitting so the barcode is accurate to each mailpiece.
Also, it seems “Sheet Count” splitting is just that, a specified number of sheets, regardless of Documents or Document Sets. If I have an 11-sheet document and a 15-sheet document, I’ll get an 8-sheet file with the first 8 sheets of the 11-sheet Document Set, a second file with the last 3 sheets of first Document Set combined with the first 5 sheets of the second Document Set… the resulting output files don’t respect any other Document/Document Set boundaries, it’s just every X number of sheets.
If you do not need to create separate files for each of the 8sheets then you can control the inserting process from within the datamatrix barcode if I understand correctly.
If so, then you can use sheet.sequence.set to figure out what should go in the barcode, eg if sheet.sequence.set % 8 == 0 then enable enclose flag in the barcode
This is something I’ve been trying to work out, but cannot quite get the math figured out.
If I have a 20-sheet document (document set, actually):
1: 1 of 8
2: 2 of 8
3: 3 of 8
4: 4 of 8
.
.
8: 8 of 8
9: 1 of 8
10: 2 of 8
.
.
16: 8 of 8
17: 1 of 4
18: 2 of 4
19: 3 of 4
20: 4 of 4
Working out the algorithm for the page count and conditions is where I’m stuck.
Maybe that will help:
var sheetCount = 20;
var envelopeNo = 1;
var envelopeCapacity = 8;
var envelopeCount = Math.ceil(sheetCount / envelopeCapacity);
var lastEnvelopeSheetCount = sheetCount % envelopeCapacity
console.log('envelopeCount: ' + envelopeCount);
console.log('lastEnvelopeSheetCount: ' + lastEnvelopeSheetCount);
for (var sheetSequence = 1; sheetSequence<=sheetCount; sheetSequence++ ) {
var envelopeSheetSequence = sheetSequence % envelopeCapacity || envelopeCapacity;
var envelopeSheetCount = sheetCount - lastEnvelopeSheetCount < sheetSequence ? lastEnvelopeSheetCount : envelopeCapacity;
console.log(sheetSequence + ': ' + envelopeSheetSequence + ' of ' + envelopeSheetCount);
}
1 Like
Yes, it does all the math correctly, now to figure out how to use this within an Output Preset. Thank you.