draco66 Posted April 5, 2017 Share Posted April 5, 2017 I have a data file that contains a number that needs to be parsed and represented by a barcode on certified mail letters. The human readable part needs to be represented a certain way and the barcode needs to be constructed with special characters from what I understand. It's not as simple as printing the number with a C128 large font. Has anyone done anything with these barcodes in fusion pro? Quote Link to comment Share on other sites More sharing options...
draco66 Posted April 5, 2017 Author Share Posted April 5, 2017 I may have a solution for the barcode itself. But I need to make the human readable number underneath in chunks of 4 digits - example: 92148901066154000105004961 Has to appear as 9214 8901 0661 5400 0105 0049 61 under the barcode. The number of digits in this number can vary so it is not always the same number of digits. Quote Link to comment Share on other sites More sharing options...
step Posted April 5, 2017 Share Posted April 5, 2017 I may have a solution for the barcode itself. But I need to make the human readable number underneath in chunks of 4 digits - example: 92148901066154000105004961 Has to appear as 9214 8901 0661 5400 0105 0049 61 under the barcode. The number of digits in this number can vary so it is not always the same number of digits. var barcode = '92148901066154000105004961'; return barcode.match(/(\d{1,4})/g).join(' '); Quote Link to comment Share on other sites More sharing options...
draco66 Posted April 6, 2017 Author Share Posted April 6, 2017 Thank you for the help with the human readable portion. I have more details on the barcode itself. The code is GS1 128 and I need to place a FNC1 character within the generated barcode. Looking for any suggestions on how to do that. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 6, 2017 Share Posted April 6, 2017 Thank you for the help with the human readable portion. I have more details on the barcode itself. The code is GS1 128 and I need to place a FNC1 character within the generated barcode. Looking for any suggestions on how to do that. You can use the MakeGS1ExtendedBarcode function, like so: var barcode_data = '92148901066154000105004961'; return MakeGS1ExtendedBarcode(barcode_data); There are other options you can specify, but that will make a valid barcode with the FNC1 character included as appropriate. Quote Link to comment Share on other sites More sharing options...
draco66 Posted April 7, 2017 Author Share Posted April 7, 2017 Thank you for the input Dan. However, the generated barcode does not match the Postal Certified Mail barcode. I am guessing they are using other special characters or different start/stop symbols, when constructing the barcode. For now I am just imaging barcodes with another piece of software, saving them as .jpg and inserting into my template as a graphic. Quote Link to comment Share on other sites More sharing options...
Leosmith Posted April 7, 2017 Share Posted April 7, 2017 The USPS uses what they call an IMpB. Intelligent Mail Parcel Barcode. This should get you close.ShippingLabel_3x4_IMpB_FP.zip Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 7, 2017 Share Posted April 7, 2017 Thank you for the input Dan. However, the generated barcode does not match the Postal Certified Mail barcode. I am guessing they are using other special characters or different start/stop symbols, when constructing the barcode. For now I am just imaging barcodes with another piece of software, saving them as .jpg and inserting into my template as a graphic. I think you're jumping to a conclusion about what kind of barcode you need to generate. Let's take a step back. Can you post an example of the kind of barcode you're trying to emulate? Quote Link to comment Share on other sites More sharing options...
draco66 Posted April 7, 2017 Author Share Posted April 7, 2017 Attached is the barcode I need to produce.barcode_sample.pdf Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 7, 2017 Share Posted April 7, 2017 Attached is the barcode I need to produce. I think that's just a regular 138 barcode, not a GS1 barcode. Try this: var barcode_data = '92148901066154000105019859'; return '<span><f name="IDAutomationC128L">' + NormalizeEntities(Make128Barcode(barcode_data)) + '</span>'; Quote Link to comment Share on other sites More sharing options...
draco66 Posted April 14, 2017 Author Share Posted April 14, 2017 I think that's just a regular 138 barcode, not a GS1 barcode. Try this: var barcode_data = '92148901066154000105019859'; return '<span><f name="IDAutomationC128L">' + NormalizeEntities(Make128Barcode(barcode_data)) + '</span>'; Dan, I have been out of the office for a few days. Just had a chance to try your code suggestion. I have attached a PDF showing the difference in the barcodes. Thank you for your input.barcode_sample2.pdf Quote Link to comment Share on other sites More sharing options...
dreimer Posted April 14, 2017 Share Posted April 14, 2017 (edited) Try this, keep in mind this is for the IMpB barcode but it may work. You don't seem to know the construct of the Certified barcode so it is tough to help. This adds the FNC1 Create this rule called something like "ForBarcodeRule" var s = Field("YourData"); return s.replace(/(\d{3})(\d{5})(\d{2})/, '($1)$2($3)'); Then create a rule for the barcode itself. return '<f name = "IDAutomationC128L">' + NormalizeEntities(MakeEAN128Barcode(Rule("ForBarcodeRule")));IMpB Sample.pdf Edited April 14, 2017 by dreimer 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.