May 29, 2017 Replies: 1 Latest Version 2.01 The attached project contains an example of a code module that writes a bar code in Code 128 format to a B4J Canvas. V1 is based on some code for B4A that did something similar. It does not require a bar code font as it creates the bar code by drawing the individual lines of the bar code as rectangles. I've updated the code to work with B4J's use of graphics. The V2 code is loosely based on some VBNet code; I've improved the efficiency though and it now supports characters in ISO/IEC 8859-1 eg £ V2.01 Fixed bug in V2 where signed numbers were not properly encoded. Derek Attachments ShowBarCode.zip ShowBarCode.zip 5.3 KB · Views: 657 £100.PNG 25.7 KB · Views: 3,562 ShowBarCode V2.01.zip ShowBarCode V2.01.zip 4.7 KB · Views: 614 Last edited: May 30, 2017 Click to expand...
Latest Version 2.01 The attached project contains an example of a code module that writes a bar code in Code 128 format to a B4J Canvas. V1 is based on some code for B4A that did something similar. It does not require a bar code font as it creates the bar code by drawing the individual lines of the bar code as rectangles. I've updated the code to work with B4J's use of graphics. The V2 code is loosely based on some VBNet code; I've improved the efficiency though and it now supports characters in ISO/IEC 8859-1 eg £ V2.01 Fixed bug in V2 where signed numbers were not properly encoded. Derek
Derek Johnson Active Member Licensed User Longtime User May 30, 2017 #2 I've updated the original post with a more efficient version, with coverage for a greater symbol range. The bar code encoding creates the shortest bar code in nearly all usage cases. (A curious consequence of this is that numeric bar codes with 2n digits are shorter then bar codes with 2n-1 digits).
I've updated the original post with a more efficient version, with coverage for a greater symbol range. The bar code encoding creates the shortest bar code in nearly all usage cases. (A curious consequence of this is that numeric bar codes with 2n digits are shorter then bar codes with 2n-1 digits).