Java Data Matrix Generator Size Setting Tutorial
sample source code to generate 2D Data Matrix images and adjust barcode size in Java
- Easy encapsulation, integration and customization are supported with JavaBean conforming to a particular convention under a developmental environment
- Mature & Reliable Java Data Matrix generation library with latest barcode symbology ISO Standards
- Provide professional features to set inter-character space and wide narrow bar ratio for Data Matrix
- Completely developed in Java for any operating systems with Java Virtual Machine
- Pre-configured industry standards Data Matrix allow any untrained users to insert Data Matrix in Java
- Java Server Side projects (JSP, Servlet, EJB, J2EE, Web Service) can be easily integrated
- Data Matrix image width in Java can be changed with Y (bar height), barcodeHeight, topMargin and bottomMargin
- High quality Data Matrix images may be printed with any printers, including those low resolution printers
- Common-used image formats are valid here, which are png, tiff, gif, jpeg and bmp
- Encoding Data Matrix valid data set to generate valid Data Matrix images in Java applications
Data Matrix, also known as Data Matrix ECC200, is great 2-dimensional matrix barcode to store different data up to 2,335 alphanumeric characters.
Java Data Matrix generator provides other setting pages for more detailed information on how to generate and create high qulaity 2D Data Matrix barcode images in Java programming.
Java Data Matrix image setting concentrates on setting Data Matrix image color, resolution, rotation, bar lignment and so on;
Java Data Matrix data encoding concentrates on setting Data Matrix data encoding and valid data length in Java projects.
Properties to change the Size of Data Matrix in Java
Overall Properties to Influence Data Matrix Size in Java
- uom: Unit of meature for all size related settings in the Java barcode library. Valid values: 0: pixel; 1: inch; 2: cm.
- formatMode: Java Data Matrix module format.
- X: value of Data Matrix module width and height, default is 3 pixel.
Data Matrix Width Related Settings in Java
- barcodeWidth: Generated Data Matrix barcode image width, default is 0 pixel.
- leftMargin: Data Matrix image left margin size, default is 0.
- rightMargin: Data Matrix image right margin size, default is 0.
Data Matrix Height Related Settings in Java
- barcodeHeight: Generated Data Matrix barcode image height, default is 0.
- topMargin: Java Data Matrix image top margin size, default is 0.
- bottomMargin: Java Data Matrix image bottom margin size, default is 0 pixel.
AutoResize for Data Matrix Size in Java
- autoResize: Auto resize the generated Data Matrix barcode image in Java, especially setting the width and height
More Specific Guide on How to Adjust the Data Matrix Size
//Set a Data Matrix object in Java applications
DataMatrix barcode = new DataMatrix();
Then, modify the following properties you may need:
Set Format Mode to change the Data Matrix size in Java
If format mode you set is conflict with the encoding data you set, the library can automatically set the proper mode in Java
Adjust Unit of Measure of Java Data Matrix
Adjust X in Java Data Matrix
As a 2D barcode in Java, Java Data Matrix is obviously the bar module width and height is the same. For this reason, when ajusting the X, it will change the size of the module with changing the height and width at the same time in Java applicaions
Adjust the Width of Data Matrix with Java
Adjust the height of Data Matrix using Java