MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   Barcodes (http://forums.pti.com/forumdisplay.php?f=34)
-   -   DataMatrix with sheet number (http://forums.pti.com/showthread.php?t=5300)

jpmiller February 25th, 2019 07:38 AM

DataMatrix with sheet number
 
3 Attachment(s)
Below is the code I am using to generate a 25 character DataMatrix barcode.

// Rule converted from XML Template "DataMatrix Barcode":
// Choose the following values:
// Begin XML Template selections //

var jobID = "0103999"; // 7 digit
var sequence = Field("sequence"); // 6 digit
var currSheet = FormatNumber( "00", FusionPro.Composition.impositionSheetNumber ); // 2 digit
var totSheets = FormatNumber( "00", FusionPro.Composition.impositionTotalSheets ); // 2 digit

var feeder1 = Field("feeder1"); // 1 digit
var feeder2 = Field("feeder2"); // 1 digit
var feeder3 = Field("feeder3"); // 1 digit
var feeder4 = Field("feeder4"); // 1 digit
var feeder5 = Field("feeder5"); // 1 digit
var feeder6 = Field("feeder6"); // 1 digit
var divertBin = Field("divertbin"); // 1 digit
var sortYN = Field("sort"); // 1 digit
var EncodingMode = "Text";
var PreferredFormat = "0";
var PointSize = StringToNumber("6");
var NoFontTag = false;
var Font = "IDAutomationDMatrix"; //
var ProcessTilde = false;
// End XML Template selections //

var DataToEncode = (jobID + sequence + currSheet + totSheets + feeder1 + feeder2 + feeder3 + feeder4 + feeder5 + feeder6 + divertBin + sortYN);
return MakeDataMatrixBarcode(DataToEncode, ProcessTilde,
EncodingMode, PreferredFormat,
PointSize, NoFontTag, Font);

Need a unique DataMatrix barcode on front of each sheet of a set.
(sheet = front+back. NON-IMPOSED) Imposition is done at print device.
(set = 2 sheets)

The Sheet Counter should generate four digits. (0102, 0202; 0102, 0202; etc...)
The result I am getting is always 0100 for each record.

I have also tried the CurrentPage counter too.
I just can't figure out how to get the counter to work properly.
Please help.

Dan Korn February 25th, 2019 10:52 AM

Re: DataMatrix with sheet number
 
As their names suggest, properties like FusionPro.Composition.impositionSheetNumber and FusionPro.Composition.impositionTotalSheets work only if you're actually using Imposition (with an FPI file created in FusionPro Imposer, specified on the Imposition tab of the Composition Settings dialog, after checking the "Use Imposition Definition" box).

As you discovered, since you have the "Re-evaluate this rule for every text flow" box checked in your rule, you can use the properties
FusionPro.Composition.currentPageNumber and FusionPro.Composition.totalPages instead. However, those will output per-record page numbers, not per-job page or sheet numbers.

Frankly, the entire concept of "Need a unique DataMatrix barcode on front of each sheet of a set" is meaningless in a non-imposed job, since technically there are no output "sheets" or "sets" at all, just pages. (And the fact that you intend to impose the job on the press/RIP at some point in the future doesn't impact whether FusionPro knows to treat the job as imposed when it's doing the composition, let alone whether FusionPro knows how the pages might hypothetically be laid out onto imposed sheets by such a future process.)

Even if you do know exactly how the job is going to be imposed in the future, i.e. how many pages will go onto each imposed sheet (the "n" in "n-up"), then you could theoretically just do some math with the FusionPro.Composition.pageNumberInJob property to figure out what the sheet number will be for each page. But, FusionPro does NOT have a FusionPro.Composition.totalPagesInJob property, because it doesn't do a "look ahead" or pre-processing step to determine exactly how many records or pages (or sheets) will be composed unless it needs to do that for (stacked) imposition.

Furthermore, if you are using barcodes which really are per-imposed sheet, rather than per-page, then you probably don't want to output those numbers on the pages themselves at all. Instead, you want to output the barcode once on each imposed sheet, outside of the trim area of any finished page. The way to do this is to set a custom imposition sheet background, as in the example here:
http://forums.pti.com/showpost.php?p=11530&postcount=3

Again, though, all of that requires that FusionPro is doing the imposition. Otherwise, FusionPro has no way of looking into the future to a scenario where you might possibly be re-processing its composed output, such as by imposing it on a press or RIP, therefore it has no way to know what sheet numbers to typeset or encode into a barcode when it's composing.

jpmiller February 25th, 2019 11:20 AM

Re: DataMatrix with sheet number
 
Thank you Dan.

I was trying to create a DataMatrix 2D barcode that included the page number and page count so the mail Inserter would know when a particular set started and ended. I wanted to automate the counter in case there were variable number of pages per set.

Dan Korn February 25th, 2019 01:39 PM

Re: DataMatrix with sheet number
 
Quote:

Originally Posted by jpmiller (Post 21737)
I was trying to create a DataMatrix 2D barcode that included the page number and page count so the mail Inserter would know when a particular set started and ended. I wanted to automate the counter in case there were variable number of pages per set.

Okay. Though that seems to be a very different description of what you're trying to accomplish then what you wrote in your original post, which included this:
Quote:

Originally Posted by jpmiller (Post 21734)
(sheet = front+back. NON-IMPOSED) Imposition is done at print device.
(set = 2 sheets)

Which, as I read it, pretty much defines a set number of pages per sheet, and therefore per set. Unless I'm misunderstanding what you meant in the first place.

Anyway, my question back to you now is: Exactly what specifies or determines how many pages/sheets make up a set? If you know how to determine or calculate that number at the time of the FusionPro composition, then we can use that number to make the barcode. But FusionPro doesn't have any independent way of figuring that out for you, because, again, it doesn't know what intent you have for re-organizing its output in the future.

jpmiller February 26th, 2019 04:34 AM

Re: DataMatrix with sheet number
 
Quote:

Originally Posted by Dan Korn (Post 21736)
As you discovered, since you have the "Re-evaluate this rule for every text flow" box checked in your rule, you can use the properties FusionPro.Composition.currentPageNumber and FusionPro.Composition.totalPages instead. However, those will output per-record page numbers, not per-job page or sheet numbers.

Dan, I think we are getting somewhere now. I wasn't clear in my first post, but I do want a current sheet number and total sheets per record in the barcode for the Inserter to scan. The scanner only scans the front of the sheet.

In this particular instance the total pages per record is constant. The numbers will alternate 0102, 0202. I can manually configure this in the data. I was just trying to automate the function for a possible instance where the total pages per record could vary depending on the data -- perhaps using trigger fields.

(To be clear: I come from commercial printing; a page is either the front or back of a sheet; a sheet is the front and back of a set; a sig or signature is an imposition of sheets)

Thank you for all you do, your time and your patience.

jpmiller February 26th, 2019 11:27 AM

Re: DataMatrix with sheet number
 
2 Attachment(s)
One solution that does work is to create multiple rules.

1) OnPageCount rule.
2) OnPageNumber rule.
3) OnRecordStart rule to determine which pages to output.
4) DataMatrix barcode rule for each possible front page
5) DataMatrix barcode rule...
6) DataMatrix barcode rule...

A bit hideous but it does work.


All times are GMT -7. The time now is 06:42 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.