Java PDF 417 Generator Size Setting Tutorial
sample source code to generate PDF 417 images and adjust barcode size in Java
- Easily generate high quality PDF 417 images on any operating system with a JVM
- Servlets, Applets, JavaBean and class library are provided in PDF 417 generator for Java
- Class library contains all necessary class files for java barcode generation
- Compatible with Headless Java, in which images can be generated without a graphic environment in JDK 1.4 and above
- Easy integration with Oracle Reports
- Generate and print PDF 417 in JDK 1.4.0 and later version
- Easy to Integrate PDF 417 Generator other properties in your Java applications
- Text margin, text font can influence the size of PDF 417 in Java
- autoResize can adjust the generated PDF 417 barcode image in Java automatically
- High quality PDF 417 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
PDF-417, also known as Portable Data File 417, PDF 417, PDF417 Truncated, is a stacked linear barcode symbol format used in a variety of applications.
If you need to change 2D barcode PDF 417 color, image format, resolution, rotation in Java, please go to Java PDF 417 image setting;
If you need to know how to encode 2D barcode PDF 417 valid data set and data length in Java, please go to Java PDF 417 data encoding.
PDF 417 in Java Size Concerned Properties
PDF 417 Width Related Settings in Java
- X: Width and height of PDF 417 bar module, default is 1 pixel.
- barcodeWidth: Generated PDF 417 barcode image width, default is 0.
- leftMargin: PDF 417 image left margin size, default is 0.
- rightMargin: PDF 417 image right margin size, default is 0.
PDF 417 Height Related Settings in Java
- X: Width and height of PDF 417 bar module, default is 1 pixel.
- barcodeHeight: Generated PDF 417 barcode image height, default is 0.
- topMargin: PDF 417 image top margin size, default is 0.
- bottomMargin: PDF 417 image bottom margin size, default is 0.
Other PDF 417 Size Setting Properties in Java
- autoResize: Auto resize the generated PDF 417 barcode image.
- uom: Unit of meature for all size related settings in the Java barcode library. Valid values: 0: pixel; 1: inch; 2: cm.
How to Implement PDF 417 Size Setting Properties in Java Projects
Other PDF 417 Size Setting Properties in Java
Java PDF 417 generator supports all PDF 417 size related solution to specify the PDF 417 images generated in Java. After purchasing the PDF 417 generator for Java, please install and set up it, then copy the following code into your Java IntelliJ IDEA:
PDF417 barcode = new PDF417();
barcode.setData("Java PDF 417");
Then, modify the following properties you may need:
How to Change the Overall size of Java PDF 417 - Uom
barcode.setUom(IBarcode.UOM_PIXEL);
How to Change the Width of PDF 417 with Java
barcode.setX(1f);
barcode.setLeftMargin(0f);
barcode.setRightMargin(0f);
During setting the PDF 417 width with the above properties, you need to pay attention that after you set a fixed bar width (X), an auto barcode width - minimum barcode width will be set in Java applications. However, if the set barcodeWidth value is less than the minimum barcode width, the created PDF 417 image width in Java will be the minimum value. If the set barcodeWith is larger than the minimum one, the extra width will be added on the right and left margins in Java.
How to Adjust the height of PDF 417 using Java
barcode.setY(75f);
barcode.setTopMargin(0f);
barcode.setBottomMargin(0f);
For PDF 417 image height adjustment, the situation is as same as PDF 417 image width adjustment.