Home: Products: Font Tools: Source Code for Barcode Fonts:

Source Code for Barcode Fonts
Including Visual Basic, 4D, FoxPro, ANSI C, C++, PowerBuilder, Oracle, LotusScript and Java

IDAutomation's source code, header files and modules are provided to help users of IDAutomation barcode fonts to format the start character, stop character, data strings and checksum characters for IDAutomation barcode fonts. All of IDAutomation's source code is copyrighted, and can be incorporated in an application only if a valid Multi-user or Developer License from IDAutomation.com, Inc. is owned for the associated barcode font and the copyright notices are not removed from the source code. Distributing IDAutomation source code or fonts outside a company or organization requires a Developer License.

If a source code is created for IDAutomation's barcode fonts and it might be shared with others, please contact IDAutomation. In some cases, a discount can be provided for IDAutomation's products if a working source code is provided that would be beneficial to others.

Source Code Index:

NOTE: When selecting the barcode font from the pull down menu, please do not use the fonts that begin with the "@" Symbol. Instead, scroll down in the list and select the ones that begin with "IDAutomation".

LICENSE NOTICE: This source code may be incorporated in the application only if there is a valid license from IDAutomation.com, Inc. for the associated font and the copyright notices are not removed from the source code. Redistribution of IDAutomation fonts and components requires a Developer License.

REPORT SOFTWARE PIRACY: If a company sells a barcode font with the company's copyright notice on it and it works with IDAutomation's source code and font tools it may be an illegal counterfeit. See IDAutomation's document about how to identify and report illegal and counterfeit barcode fonts for more information.


Visual Basic and VB.NET

Download the Visual Basic Barcode Font Module for VB 6 and VB dotnet. IDAutomation's VB Font Modules calculate the start, stop and check digits for the barcode and return a character string, that when combined with IDAutomation's barcode font, create a correct barcode. Using this method, there is nothing to distribute with the application except the barcode font because the functions of the module are compiled into IDAutomation's EXE file. IDAutomation's barcode font module is free to use as long as a license to one of IDAutomation's barcode fonts is owned. Also review IDAutomation's VB 6 and VB.NET tutorial on how to use the module.


ANSI C and C++

IDAutomation has source code and header files available in ANSI C for Code 39, Code 39 Mod 43, Codabar, UPC-A, UPC-E, EAN-8, EAN-13, POSTNET, Interleaved 2 of 5, Code 128 and MSI. The Code128() function also supports UCC/EAN-128. The header file was written to be ANSI C compatible and has been tested in Visual C++.

Download the C++ header file that can be added to the application. The text can be formatted for IDAutomation's barcode fonts simply by adding an include statement such as #include "IDAutomation.h" to the project and then access the function like this: output = Code128b("abc12345");

Click to view the ANSI C source code.

Visual C# (Microsoft® C sharp)

For C#, please refer to IDAutomation's C Sharp Barcode FAQ and Tutorial. IDAutomation's barcode C sharp class library is available for integration into a C# application.


Java Source Code

IDAutomation has Java source code available for Code 39, Code 39 Mod 43, Code 128, Interleaved 2 of 5, Interleaved 2 of 5 Mod10 and POSTNET. Click to view or download the Java source code.


Omnis 4GL

Click for Omnis 4GL source code written for Code 128 character set C for the Macintosh.


4th Dimension 4D

Click for 4D source code written for Code 128 character set B on the Macintosh.

IDAutomation also has more advanced source code for Code 128 Auto.


Macintosh AppleWorks

Macintosh Apple Works calculations for POSTNET barcode fonts.


Oracle Reports and PL/SQL

IDAutomation has a compiled Barcode Library for Oracle Reports. The barcode library is a PLL file that formats data from fields in the report to IDAutomation's barcode fonts to create a correct barcode. Read the tutorial about this or download the library. PL/SQL source code is also provided for advanced Oracle programmers in the IDAutomation.pkg file.

The following source code is an example of PL/SQL code used in Oracle Reports 3.0 to create the proper string for the Interleaved 2 of 5 barcode font. Also see IDAutomation's write up about installing barcode fonts for Oracle Reports on UNIX.


FoxPro & Visual FoxPro

The following Visual FoxPro source code includes most of the barcode functions listed at the bottom of this page. Add this file as a program module to the VFP project, set it as a procedure file using SET PROCEDURE TO .. ADDITIVE command somewhere in the main (startup) code of the project and access the function in the application as necessary. IDAutomation has demonstrated how this works in Visual FoxPro Sample Project.


PowerBuilder

The following PowerBuilder source code is used to create the proper string for the Code 128 Barcode Font.


Other Options:

IDAutomation also has complete Java Barcode Packages and easy to use ActiveX Barcode Controls that can create several linear barcodes plus PDF417 and DataMatrix as graphics without fonts.


Visual Basic Source Code, Function List & Conversion to other Languages:

IDAutomation's Visual Basic source code can be easily used in Lotus applications as LotusScript such as Lotus Smart Suite, Lotus Approach and Lotus Notes. The VB source code listed here can also be used for MS Office as VBA code (also called VB Script) to create macros and of course in Visual Basic.

It is IDAutomation's intention to write our Visual Basic source code using as few functions as possible to allow for easy conversion to other programming languages. If a source code is created in another language and might be shared with others, please contact us. In some cases discounts may be provided for IDAutomation's products if a working source code is provided that would be beneficial to others. Click to view or download the Visual Basic source code only (not the module).

The following table is a list of common Visual Basic functions used in IDAutomation's source code and what they do:

VB Function What it does
Asc(character) Converts a character to the ASCII value
Chr(n) Returns the character represented by the number n in ASCII
Len(string) Returns the length of a string
Mid(string, x, n) Returns n number characters from a string starting from location x
(number Mod n) Returns the remainder after number is divided by n
Right$(string, n) Returns n characters starting from the right of the string
RTrim(LTrim(string)) Removes spaces before and after a string

To sign up for monthly updates about new products or upgrades, please click here.For all functions below the data input type is a single string. A number may be required for additional parameters. For example, Code128c("123456",0). For all number symbologies such as POSTNET and UPC, dashes or spaces may be inputted for easier readability which will be filtered out by the function before the barcode is generated. For UPC-A, UPC-E & EAN-13 enter the +2 and +5 add-on codes by just adding them to the end of the string.
 

Function Notes
Code128(Data, Number) If there is a doubt as to which Code 128 set is for the application, then use this one. This is a "Code 128 Auto" function that will automatically encode any data from ASCII 0 to ASCII 127. It will automatically switch to character set C for numbers also.
To encode alpha-numeric UCC/EAN-128, ASCII 202 or character Ê is entered as the FNC1 before each AI. For example, the UCC number of (8100)712345(21)12WH5678 should be entered as: Ê8100712345Ê2112WH5678.
More information about AI's and UCC/EAN-128 is located here.
(Data, 0) formats barcode output string for the Code 128 barcode fonts.
(Data, 1) returns the human readable data.
(Data, 2) returns only the check digit.
Code128a() Use the characters from set B to print characters not on the keyboard; the scanner will scan characters from set A. Formats output to the Code 128 barcode fonts.
Code128b() Returns codes formatted to the Code 128 character set B. Formats output to the Code 128 barcode fonts.
Code128c(Data, Number) This code128 function "interleaves" numbers into pairs for high density.
(Data, 0) formats output to the Code 128 barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
I2of5() This function "interleaves" numbers into pairs for high density without check digits and formats the return string to the Interleaved 2 of 5 fonts.
I2of5Mod10(Data, Number) (Data, 0) performs the mod10 checksum calculation for increased accuracy and formats the return string to the Interleaved 2 of 5 fonts. USPS requires MOD 10 checksums for special services and for SSC-14 when using Interleaved 2 of 5 for that purpose.
(Data, 1) returns the human readable data with the MOD10 check digit included.
(Data, 2) returns the MOD10 check digit.
Code39() Formats the output to print using Code 39 fonts.
Code39Mod43(Data, Number) (Data, 0) performs the mod43 checksum calculation for increased accuracy and then formats the output to print using Code 39 fonts. The mod43 checksum is usually required for LOGMARS applications.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Codabar() Formats the output to print using Codabar fonts.
UCC128() This symbology option encodes an even number of number digits and includes the FNC1 character in set C as required. Use Code 128 Auto to encode additional FNC1 codes or data containing text or odd numbers. Use the UCC128 function only for UCC-128 applications where the input data is an even number such as in SSCC-18 and SCC-14 barcodes. For example, to encode an SSCC-18 barcode, the user would enter 00000123455555555558 as the data input. For more information, please visit here.
SCC14(Data, Number) SCC14(Data, 0) generates the MOD10 required and then formats the output to print EAN-14 and SCC-14 using Code 128 fonts. The input for Data must be a 13 to 17 digit number; however, only 13 are needed. The required application identifier of (01) is automatically added.
SCC14(Data, 1) returns the human readable data for SCC14 / EAN14.
SCC14(Data, 2) returns the MOD10 check digit.
SSCC18(Data, Number) SCC18(Data, 0) generates the MOD10 required for SSCC-18 and then formats the output to print SSCC-18 using Code 128 fonts. The input for Data must be a 17 to 21 digit number; however, only 17 are needed. The required application identifier of (00) is automatically added.
SCC18(Data, 1) returns the human readable data for SCC-18.
SCC18(Data, 2) returns the MOD10 check digit.
Postnet(Data, Number) Enter a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point. The input for Data must be a number and can include dashes and spaces.
(Data, 0) formats output to the POSTNET barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
USPSss(Data, Number) Used for 20 digit USPS special services numbers with Code 128 fonts. Enter a 19 or 20 digit number; only the first 19 are used.
(Data, 0) formats output to the Code 128 barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
RM4SCC() Formats the output to print using RM4SCC fonts. Checksum calculated according to the mailsort customer barcoding specification.
MSI(Data, Number) (Data, 0) formats output to the MSI barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Code11() Only the "C" check digit is calculated which is the standard when encoding 10 digits or less.
UPCa() Enter UPC-A with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font.
UPCe() Enter the full 11 or 12 digit UPC-A number. The purpose of this function is to print the UPC-E barcode from a UPC-A barcode that can be compressed. It will print a UPC-A if it cannot be compressed by zero suppression rules. Formats output to the UPC/EAN barcode font.
EAN13() Enter EAN-13 with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font.
EAN8() Enter exactly 7 characters (EAN-8 without the check digit). Formats output to the UPC/EAN barcode font.

 

© Copyright 2001-2008 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.  

Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.