Android EAN-8 Generator generate, create barcode EAN-8 images in Android application
EAN-8 Generator for Android to Generate EAN-8 Barcodes in Android Application using Android Barcode Generator Library
- Easy to use Android EAN-8 generation api
- Developed from Java EAN-8 barcode generator
- Compatible with Android 1.5 SDK and later versions
- Easy to integrate the EAN-8 SDK into Android apps
- Generate high quality EAN-8 barcode with the Android EAN-8 SDK
- GIF, JPEG, and PNG are supported by the Android EAN-8 Barcode Generator
- Reliable and mature Android barcode library for EAN-8 generation
- Compatible with the latest EAN-8 barcode symbology standard
Index
Android EAN-8 Barcode Generator Introduction
Android EAN-8 barcode API is an EAN-8 generator for Android apps, designed for creating EAN-8 barcode on Android platform.
- Android EAN-8 SDK is entirely developed for Android platform
- Android EAN-8 generator is completely built in Android 1.5 SDK
- Developer Licenses for this Android EAN-8 library are royalty-free and perpetual
.net barcode sdk,
asp.net barcode generator free,
how to import barcode font into excel,
pdf417 c# open source,
c# qr code webcam scanner,
2d barcode generator c#
EAN-8 is a barcode and is derived from the longer European Article Number (EAN-13) code. It was introduced for use on small packages where an EAN-13 barcode would be too large.
OnBarcode provides several EAN-8 Generator library, SDK and software, including
C# EAN-8,
.NET EAN-8,
Java EAN-8,
VB.NET EAN-8,
ASP.NET EAN-8,
EAN-8 Generator.
EAN-8 Valid Data Scope
Android Barcode EAN-8 supports:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
How to generate EAN 8 barcodes in your Android application?
Generating barcode EAN-8 in Java Class example
EAN8 barcode = new EAN8();
/*
EAN 8 Valid data char set:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Digits)
EAN 8 Valid data length: 7 digits only, excluding the last checksum digit
*/
barcode.setData("7777777");
// for EAN8 with supplement data (2 or 5 digits)
/*
barcode.setSupData("12");
// supplement bar height vs bar height ratio
barcode.setSupHeight(0.8f);
// space between barcode and supplement barcode (in pixel)
barcode.setSupSpace(15);
*/
// Unit of Measure, pixel, cm, or inch
barcode.setUom(IBarcode.UOM_PIXEL);
// barcode bar module width (X) in pixel
barcode.setX(1f);
// barcode bar module height (Y) in pixel
barcode.setY(45f);
// barcode image margins
barcode.setLeftMargin(10f);
barcode.setRightMargin(10f);
barcode.setTopMargin(10f);
barcode.setBottomMargin(10f);
// barcode image resolution in dpi
barcode.setResolution(72);
// disply barcode encoding data below the barcode
barcode.setShowText(true);
// barcode encoding data font style
barcode.setTextFont(new AndroidFont("Arial", 0, 10));
// space between barcode and barcode encoding data
barcode.setTextMargin(6);
barcode.setTextColor(AndroidColor.black);
// barcode bar color and background color in Android device
barcode.setForeColor(AndroidColor.black);
barcode.setBackColor(AndroidColor.white);
/*
specify your barcode drawing area
*/
RectF bounds = new RectF(30, 30, 0, 0);
barcode.drawBarcode(canvas, bounds);
Android EAN-8 Barcode Properties
Barcode Java Class:
com.onbarcode.barcode.android.EAN8.
Category |
Properties |
Value |
Comments |
Basic
|
Property: data
|
Type: String
Default: ""
|
Barcode value to encode
EAN 8 Valid Data Char Set:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Digits)
EAN 8 Valid data length:
- 7 digits only, excluding the last checksum digit.
|
Property: addCheckSum
|
Type: boolean
Default: false
|
addCheckSum property is not applied here. Java Barcode will always add a check character in the last digit (modulo 10). |
|
EAN-8 Related |
Property: supData
|
Type: String
Default: ""
|
Set the supplement data to encode. Valid values are 2 or 5 digits |
Property: supHeight
|
Type: float
Default: 0.8f
|
This is a multiplicator of the height of the bar module; The default is 0.8 (80% of Y - bar module height). |
Property: supSpace
|
Type: float
Default: 15
|
The separation between the barcode and the supplement. Default is 15 pixel. |
|
Barcode Size Related |
Property: autoResize
|
Type: boolean
Default: false
|
Auto resize the generated barcode image
|
Property: barAlignment
|
Type: int
Default: 1 (center)
|
Barcode horizontal alignment inside the image. 0: left, 1: center, 2: right. |
Property: uom
|
Type: int
Default: 0 (pixel)
|
Unit of meature for all size related settings in the library.
Valid values: 0: pixel; 1: inch; 2: cm.
|
Property: X
|
Type: float
Default: 1
|
Width of barcode bar module (narrow bar), default is 1 pixel |
Property: Y
|
Type: float
Default: 30
|
Height of barcode bar module, default is 30 pixel |
Property: barcodeWidth
|
Type: float
Default: 0
|
Barcode image width.
If barcodeWidth setting is smaller than the barcode required minimum width, the library will automatically reset to barcode minimum width. |
Property: barcodeHeight
|
Type: float
Default: 0
|
Barcode image height.
If barcodeHeight setting is smaller than the barcode required minimum height, the library will automatically reset to barcode minimum height. |
Property: leftMargin
|
Type: float
Default: 0
|
Barcode image left margin size. |
Property: rightMargin
|
Type: float
Default: 0
|
Barcode image right margin size. |
Property: topMargin
|
Type: float
Default: 0
|
Barcode image top margin size. |
Property: bottomMargin
|
Type: float
Default: 0
|
Barcode image bottom margin size. |
Property: resolution
|
Type: int
Default: 72
|
Barcode image resolution in DPI (Dots per inch). |
Property: rotate
|
Type: int
Default: 0 (IBarcode.ROTATE_0)
|
Valid values:
- 0 (IBarcode.ROTATE_0)
- 1 (IBarcode.ROTATE_90)
- 2 (IBarcode.ROTATE_180)
- 3 (IBarcode.ROTATE_270)
|
|
Barcode Colors |
Property: backColor
|
Type: AndroidColor
Default: AndroidColor.white
|
Barcode image background color |
Property: foreColor
|
Type: AndroidColor
Default: AndroidColor.black
|
Barcode image foreground color
|
|
Font Style |
Property: showText
|
Type: boolean
Default: true
|
If true, display barcode data text under the barcode, otherwise do not display. |
Property: textFont
|
Type: AndroidFont
Default: new AndroidFont("Arial", Typeface.NORMAL, 11)
|
Barcode text font style.
|
Property: textMargin
|
Type: float
Default: 6
|
Space between barcode and barcode data text, default is 6 pixel |
Property: textColor
|
Type: AndroidColor
Default: AndroidColor.black
|
Barcode text color
|
All Android Barcode Generator Supporting Bar Code Symbology Types