INGuser Posted February 17, 2010 Share Posted February 17, 2010 I am wanting to set up a print job with a 2d barcode to run on our inserters. Within the barcode I need to have a page count so our inserter will insert in to the envelope after every so many pages. Does anyone have any ideas on how to get this to work? Thank you for your time. Link to comment Share on other sites More sharing options...
mhilger Posted February 17, 2010 Share Posted February 17, 2010 Hello Amber, FusionPro does include the 2D barcodes called Datamatrix and PDF417. I worked with another customer that had a similar need and they used the Datamatrix barcode to meet that need. There's a couple pieces of information needed to help you with this. For starters, do you know the exact barcode type that's needed by the inserter (if it's Datamatrix or not)? Also, are there any specifications for the exact data that is to be included in the barcode? Is it just the page number of the current page of output? I assume that the manufacturer of the inserter would have this information readily available. Link to comment Share on other sites More sharing options...
INGuser Posted February 17, 2010 Author Share Posted February 17, 2010 It is a 2D Datamatrix bar code. Below are the pieces of information we include: Position 1 Demand Feed - If this is the last page in the document, the value = "G" else the value = "0" 2 "0" 3-4 # of sheets of paper in the document 5-10 document in file e.g. this is the 15th statement in the file, 16th statement, etc. 11-12 sheet in document e.g. this is the 1st sheet, 2nd sheet, etc in an x sheet document 13-15 "000" I am having trouble understanding how to get this information into the barcode. None of the above inforamtion is generated in my CSV file. Link to comment Share on other sites More sharing options...
mhilger Posted February 17, 2010 Share Posted February 17, 2010 Amber, Excellent -this sounds like exactly what's needed. In looking at some of this data that's needed, I see that it's dependent on the number of pages in the output that will be composed. Here's a key question - does your document going to have the same exact number of pages of output for every record (e.g. each record will have exactally 4 pages of output) or will it be a variable number of pages per record (e.g. record 1 makes 3 pages, record 2 makes 8 pages, record 3 makes 4 pages, etc)? I believe we can accomplish this if you have the same number of pages of output per record but I'm not sure if it can be accomplished if you have the varying number of pages per record. Link to comment Share on other sites More sharing options...
INGuser Posted February 17, 2010 Author Share Posted February 17, 2010 My document will always have the same number of pages for each record. Link to comment Share on other sites More sharing options...
mhilger Posted February 17, 2010 Share Posted February 17, 2010 Ah. Good news then. I mocked up a sample template (attached to this post) that shows how this can be accomplished. Note that there is a separate rule written for each page that will have a barcode on it and some info is changed in each rule. I commented the code thoroughly so hopefully it all makes sense. Let me know if this works for you. I would recommend making sure the barcode scans correctly on the equipment at your earliest convenience so any tweaks needed to the logic or size of the barcode can be made on the production template.2d-example.zip Link to comment Share on other sites More sharing options...
INGuser Posted February 17, 2010 Author Share Posted February 17, 2010 Thank you for the help. I completed a test job but the inserter scanners timeout trying to read the barcodes. I am assuming that this means that the barcode needs to be a bigger point size on the job. I have it set as 10 right now. When the scanners did read the barcode it pulled four pages instead of two. I did find out that the scanner programs are set up to work on a 24x24 grid. Is it possible to change the grid size in the code below? I have gone back into the code and the code seems to read correctly for two pages. Here is the code for the first page: barcodeData = ""; barcodeData = "0"; barcodeData += "0"; barcodeData += "02"; recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); barcodeData += "01"; barcodeData += "000"; var DMbarcode = new DataMatrixBarcode; DMbarcode.pointSize = 10; return DMbarcode.Make(barcodeData); Here is the code for the second page, It is the last page for this job: barcodeData = ""; barcodeData = "G"; barcodeData += "0"; barcodeData += "02"; recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); barcodeData += "02"; barcodeData += "000"; var DMbarcode = new DataMatrixBarcode; DMbarcode.pointSize = 10; return DMbarcode.Make(barcodeData); Is there something that I did incorrect when writing the code for this? Link to comment Share on other sites More sharing options...
mhilger Posted February 18, 2010 Share Posted February 18, 2010 Amber, For starters, you can specify the 24X24 format for the barcode with a simple tweak in your code (see red text here in your 1st page rule). barcodeData = ""; barcodeData = "0"; barcodeData += "0"; barcodeData += "02"; recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); barcodeData += "01"; barcodeData += "000"; var DMbarcode = new DataMatrixBarcode; DMbarcode.pointSize = 10; DMbarcode.preferredFormat = 7; return DMbarcode.Make(barcodeData); BTW, I was able to determine this preferredFormat value by reviewing the IDAutomation website (the supplier of our barcode fonts) at: http://www.idautomation.com/datamatrixfaq.html#DataMatrix_Formats This will generate a barcode that is physically larger than the default size you are using now. Note that the pointsize you specify (currently 10) will also influence the physical size of the barcode so you might need to tweak this if it's too small/large. Does the vendor for the inserter supply any guidance on the point size? Just like this preferredFormat property, there are a couple of other properties that can be set for the DataMatrix barcode if needed (FusionPro uses basic default values for these but they can be overridden if needed. One of these properties is encodingMode which we default to ASCII. Other possible values can be BASE256, C40, or TEXT. Any idea if the inserter requires the barcode to be encoded in one of the other encoding modes? Link to comment Share on other sites More sharing options...
INGuser Posted February 18, 2010 Author Share Posted February 18, 2010 The scanners are able to read the barcode but it is erroring out. It does not seem to be putting a record number into the barcode. I have never ran a job where I have inserted the record number before do I need to change this code some how or enter another rule to pull the record number? recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); Link to comment Share on other sites More sharing options...
mhilger Posted February 18, 2010 Share Posted February 18, 2010 Hmmm.... Well let's check to make sure the record number is getting pulled into this script as expected. Try adding the following red code and do a validate on your rule to make sure it's returning the 6-digit record number as expected: recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); return FormatNumber("000000", recNum); So this should display the 6 digit required record number - 000001 for record 1, 000002 for record 2, etc. Does it look like the data is completely missing from the barcode? Like those 6 digits are all 0's or not even there in the barcode at all? Link to comment Share on other sites More sharing options...
INGuser Posted February 18, 2010 Author Share Posted February 18, 2010 It is missing all together. When I add the red text and validate it it returns nothing. Link to comment Share on other sites More sharing options...
mhilger Posted February 18, 2010 Share Posted February 18, 2010 Amber, My apologies - I see that you are on version 5.8 of FusionPro and we added the "inputRecordNumber" property I listed in my original script in the 6.0 version. However, there's a simple change that should work for you. Remove this line: recNum = FusionPro.Composition.inputRecordNumber; And replace with this line: recNum = CurrentRecordNumber(); Link to comment Share on other sites More sharing options...
INGuser Posted February 18, 2010 Author Share Posted February 18, 2010 Replacing "recNum = FusionPro.Composition.inputRecordNumber;" with "recNum = CurrentRecordNumber();" worked to get the record number recorded in the barcode. However, it looks like the line in red below is now being dropped when the barcode is created. barcodeData = ""; barcodeData = "0"; barcodeData += "0"; barcodeData += "02"; recNum = FusionPro.Composition.inputRecordNumber; barcodeData += FormatNumber("000000", recNum); barcodeData += "01"; barcodeData += "000"; var DMbarcode = new DataMatrixBarcode; DMbarcode.pointSize = 10; DMbarcode.preferredFormat = 7; return DMbarcode.Make(barcodeData); When the barcode is created I should have 15 data characters but it is only creating 13. The barcode for record one should read 000200000101000 but it is coming out as 0000000101000. The tech for our inserter's is insisting that the tweak needs to come from my end and not his program. Any other suggestions? Link to comment Share on other sites More sharing options...
esmith Posted February 18, 2010 Share Posted February 18, 2010 Does your last post reflect your current code? I see it does not include the update for "recNum" that Mark mentions above. If I use the following code, I return a 15-digit number for the variable "barcodeData": barcodeData = ""; barcodeData = "0"; barcodeData += "0"; barcodeData += "02"; recNum = CurrentRecordNumber(); barcodeData += FormatNumber("000000", recNum); barcodeData += "01"; barcodeData += "000"; var DMbarcode = new DataMatrixBarcode; DMbarcode.pointSize = 10; DMbarcode.preferredFormat = 7; return DMbarcode.Make(barcodeData); Link to comment Share on other sites More sharing options...
INGuser Posted February 18, 2010 Author Share Posted February 18, 2010 It works, it works. Thank you to everyone who helped get this setup. I owe all of you a big thank you. Link to comment Share on other sites More sharing options...
mhilger Posted February 18, 2010 Share Posted February 18, 2010 Excellent! Great to hear we got this working for you. Link to comment Share on other sites More sharing options...
INGuser Posted February 19, 2010 Author Share Posted February 19, 2010 I was able to run my very first job yesterday using this and it worked perfectly. Thank you for the time that you spent explaining the process. I do have two other questions. 1. Should this same code work on our Fusion Pro Software on our MAC's? 2. If so, are there any adjustments that will need to be made to the code, as our MAC's only have version 5.1 on them? Your team is truly Awesome. Once again thank you for getting this working for me. It will come in very handy when process multiple page documents. Link to comment Share on other sites More sharing options...
mhilger Posted February 19, 2010 Share Posted February 19, 2010 Hello Amber, I believe that this same script will work on the Mac w/ Desktop 5.1 with no issue. If you do have any difficulty with it, though, just let us know. Always glad to help customers with their work - thank you for the thank you! Link to comment Share on other sites More sharing options...
saml Posted May 26, 2011 Share Posted May 26, 2011 I know this is an old thread but has anyone dealt with creating a 2d barcode with varying page counts for the inserter. I have been asked to take a Mail Manager csv file that has multiple common client IDs (ID1 has 3 records with different pages, ID2 has 2 records with 2 different pages, ID3 has 5 pages...) each requiring a different set of pages. Our inserter functions the same way except I don't have the same page count. Is there a way to apply this by counting common "client IDs" and adding it to the barcodedata without hard coding the pages. My template has around 60 different pages. Link to comment Share on other sites More sharing options...
Dan Korn Posted May 27, 2011 Share Posted May 27, 2011 I know this is an old thread but has anyone dealt with creating a 2d barcode with varying page counts for the inserter. I have been asked to take a Mail Manager csv file that has multiple common client IDs (ID1 has 3 records with different pages, ID2 has 2 records with 2 different pages, ID3 has 5 pages...) each requiring a different set of pages. Our inserter functions the same way except I don't have the same page count. Is there a way to apply this by counting common "client IDs" and adding it to the barcodedata without hard coding the pages. My template has around 60 different pages. Sure, you can just use the page count as the barcode data. But that's not really a barcode question. Please start a new thread asking about how to count the pages. Attaching an example of what you have so far would be helpful. Link to comment Share on other sites More sharing options...
saml Posted May 27, 2011 Share Posted May 27, 2011 I will do that. I was actually was addressing this thread because it seemed relevant to the question of the use of a 2d barcode in reference to our inserter it just it takes it further. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.