|
Home > Java Barcode Generator
> Java Barcode Generation Guide
> Java MSI Plessey Barcodes Generator
Java MSI Plessey Barcodes Generator Guide
MSI Plessey Bar Code Generation Guide in Java class, J2EE, Jasper Reports, iReport & Eclipse BIRT
- Easily generate MSI Plessey barcodes in Java applications
- Generate high quality MSI Plessey images in JPEG, GIF & PNG formats
- 100% build in Java, compatible with JDK 1.4 and later version
- Generate MSI barcodes on any platforms with a Java virtual machine
- Generate MSI in Jasper Reports & iReport
- Generate MSI in Eclipse BIRT
- Mature Java Barcode Generator library since 2003
- Royalty-free and perpetual developer license
Quick Navigate
1. MSI Plessey Barcode Introduction
MSI Plessey is also known as
MSI/Plessey, Modified Plessey
MSI was developed by the MSI Data Corporation, based on the
original Plessey Code.
MSI, also known as Modified Plessey, is used primarily to mark
retail shelves for inventory control. MSI is a continuous, non-self-checking
symbology.
While the length of an MSI barcode can be of any length, a
given application usually implements a fixed-length code.

Sample of a MSI Barcode
2. MSI Plessey Encoding Data Scope
MSI Barcode for Java supports.
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
3. How to Generate MSI Plessey Barcode in Java Class?
The following Java code illustrates how to create a MSI Plessey barcode, and output to various formats
1 Linear linear = new Linear();
2 linear.setType(Linear.MSI);
3 linear.setData("123456789");
4 linear.renderBarcode("c:/barcode.gif");
5 BufferedImage bufferedImage = linear.renderBarcode();
6 byte[] barcodeBytes = linear.renderBarcodeToBytes();
7 Graphics2D g = ...
8 Rectangle2D rectangle = ...
9 linear.renderBarcode(g, rectangle);
10 OutputStream outputStream = ...
11 linear.renderBarcode(outputStream);
- Create a Linear barcode object (line 1)
- Set Linear object barcode type to MSI Plessey (line 2)
- Set MSI Plessey barcode data to encode (line 3)
- Encode generated MSI Plessey barcode into gif image file (line 4)
- Generate MSI Plessey and output to BufferedImage object (line 5)
- Generate MSI Plessey in bitmap and output to byte[] (line 6)
- Generate MSI Plessey and draw to defined area (Rectangle2D) on Graphics2D (line 7-9)
- Generate MSI Plessey and output to OutputStream (line 10-11)
4. How to Generate MSI Plessey Barcode Image in Java Web Applications?
There are two methods to create MSI Plessey barcode images in your Java web applications.
-
The simplest way is to stream barcode image using our buildin barcode servlet application.
- Download the Barcode for Java Trial Package, and unzip it.
- Under java_barcode_trial package, copy barcode folder to your java servlet container like tomcat.
- Restart tomcat. Now you have installed successfully.
- To test your installation, open your web browser and navigate to
http://YourDomain:Port/barcode/linear?Data=123456789&Type=MSI
- To create barcode image in your JSP or html page, you need pass the url to IMG tag src value.
For example,
<img src="http://YourDomain:Port/barcode/linear?Data=123456789&Type=MSI" />
Using this method, it will not generate any barcode images in your server side.
-
The second method is to generate barcode images in your server side
5. How to Generate Barcode MSI Plessey Image in Jasper Reports, iReport, Eclipse BIRT?
6. MSI Plessey Barcode Property Settings
-
Set the type property to Linear.MSI, or Linear.MSI10, or Linear.MSI11, or Linear.MSI1010, or Linear.MSI1110
Servlet URL Parameter: "Type". Value: 31 (MSI), 32 (MSI10), 33 (MSI11), 34 (MSI1010), 35 (MSI1110). Sample: &Type=31
-
Set the data property with the value to encode.
Type is String.
- Valid Data Scope:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- Sample: "1234567890"
Servlet URL Parameter: Data.
-
For Type Linear.MSI, addCheckSum is optional. Modulo 10 will be applied, if addCheckSum property is true.
For Type Linear.MSI10,
addCheckSum is not applicable. Barcode Library will always add check character with Modulo 10.
For Type Linear.MSI11,
addCheckSum is not applicable. Barcode Library will always add check character with Modulo 11 using IBM algorithm.
For Type Linear.MSI1010,
addCheckSum is not applicable. Barcode Library will always calculate the Modulo 10 check digit the first time and then calculate it again with the previous result and append the result of the second Modulo 10 Calculation to the string to be encoded.
For Type Linear.MSI1110,
addCheckSum is not applicable. Barcode Library will always calculate the Modulo 11 check digit the first time and then calculate it again with the previous result and append the result of the second Modulo 10 Calculation to the string to be encoded.
Servlet URL Parameter: "AddCheckSum". Values: "t" (true), "f" (false). Sample: &AddCheckSum=t
-
Barcode image size settings:
-
Set property uom (Unit of Measure) for properties X, Y, leftMargin, rightMargin, topMargin and bottomMargin.
Default is Linear.UOM_PIXEL (0). Valid values are Linear.UOM_PIXEL (0), Linear.UOM_CM (1), Linear.UOM_Inch (2).
Servlet URL Parameter: "UOM". Value: 0 (pixel), 1 (cm), 2 (inch). Sample: &UOM=0
-
Set the X (for barcode module width) and Y (for barcode module height) properties.
Both types are float. Default X is 3. Y is 75.
Servlet URL Parameter: "X", "Y". Sample: &X=3&Y=75
-
Set the leftMargin, rightMargin, topMargin and bottomMargin properties, and types are all float.
Default values are 0 for all 4 margin settings.
Servlet URL Parameter: "LeftMargin", "RightMargin", "TopMargin", "BottomMargin". Sample: &LeftMargin=0
-
Set the resolution property (Value is expressed in DPI - Dots per inch).
Default is 72 dpi.
Servlet URL Parameter: "Resolution". Sample: &Resolution=72
-
Setting up text style in barcode image:
-
Set the showText properties. If this value is true, barcode data will be displayed with the barcode.
Default is true.
Servlet URL Parameter: "ShowText". Value: "t" (true), "f" (false). Sample: &ShowText=t
-
Set the textFont property. The font used to display text in barcode image.
Default is new Font("Arial", Font.PLAIN, 11).
Servlet URL Parameter: "TextFont".
Value format: [font name]|[font style]|[font size].
Sample Values: &TextFont=Arial|Bold|12
-
With rotate property, you can display barcode horizontally or vertically.
Value can be
- 0 (Linear.ANGLE_0),
- 1 (Linear.ANGLE_90),
- 2 (Linear.ANGLE_180),
- 3 (Linear.ANGLE_270)
Default value is 0.
Servlet URL Parameter: "Rotate". Sample: &Rotate=0
7. How to Set Generated MSI Plessey Barcode Image Size?
All Java Barcode Types/Symbologies
|