#1
|
|||
|
|||
![]()
Hello:
In address labels - we have to insert a 3 of 9 barcode (human readable) with check digit. Client has told us to start barcode number series beginnning with 200,00,000. Printing has to be done daily lots with barcode numbering continuing from the earlier lot. Each barcode has to have 13 characters: First 2 characters - alphabets 'EA' Next 8 characters - number digits Next 1 character - check digit Next 2 characters - alphabets 'IN' Other fields for address details are in Excel format. Please guide. Regards. Milind Vaze. |
#2
|
|||
|
|||
![]() Quote:
Formula in excel is available to generate the check digit for 3 of 9 barcode. Can this formula be converted for use in javascript to generate the barcode data (including prefix, check digit and suffix)? Thanks with regards. Milind Vaze |
#3
|
||||
|
||||
![]() Quote:
By referencing that website, I was able to come up with this function to create a human-readable barcode with a check digit: Code:
function Encode(barcode) { var map = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.',' ','$','/','+','%']; var check = 0; barcode = ToUpper(barcode); for (i in barcode) check += map.indexOf(barcode[i]); check %= 43; return barcode + map[check]; } Code:
return Encode('20000000'); // returns 200000002 Code:
var start = 20000000 - 1; // Minus one so the first record will be 20000000 Code:
var seq = FusionPro.Composition.inputRecordNumber + start; return 'EA' + Encode(seq) + 'IN'; // returns EA200000002IN
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#4
|
|||
|
|||
![]()
Hi Milind,
example attached. I googled for an excel forumula for Mod43 check digit and got this. http://www.excelbanter.com/showthread.php?t=426855 The excel formula was applied to the eight digit number a check digit and the results were concatenated with the alpha characters. In FusionPro the building block was used to create the 3of9 barcode and applied to the field. The second barcode is the same except the alphas were applied in a FusionPro rule. Not sure if any of it is correct or what you are trying to achieve but the barcodes do scan. Note: I haven't tried Steve's solution yet but I believe it would be a more exceptional solution to have the work/process all done in FusionPro. Leo
__________________
Leo Smith - Novice FusionPro VDP Creator 10 Adobe Pro CC Windows 7 |
#5
|
|||
|
|||
![]()
Hi Ste,
Thanks for your step by step reply. Worked great. It is very helpful for learning and understanding Javascript and FusionPro. Leo
__________________
Leo Smith - Novice FusionPro VDP Creator 10 Adobe Pro CC Windows 7 |
#6
|
||||
|
||||
![]() Quote:
Quote:
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#7
|
|||
|
|||
![]()
Hello and wishing all a Happy New Year.
Many thanks for your replies and help. I am presently on leave. After I am back I will work on the solutions given by all and reply. Regards. Milind Vaze. |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|