#1
|
|||
|
|||
![]()
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. |
#2
|
||||
|
||||
![]()
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.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#3
|
|||
|
|||
![]()
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. |
#4
|
||||
|
||||
![]() Quote:
Quote:
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.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#5
|
|||
|
|||
![]() Quote:
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. |
#6
|
|||
|
|||
![]()
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. |
![]() |
Tags |
datamatrix, page counter, sheet counter |
Thread Tools | Search this Thread |
Display Modes | |
|
|