Free Support Forum - aspose.com

Aspose barcode for java


#1

Hi Team,

Can you share me the input and output sample for the barcode. I am new to this product and need to explore on how to use this product.Kindly share me some sample codes as well. In this link https://github.com/aspose-barcode/Aspose.BarCode-for-Java/blob/master/Examples/src/main/java/com/aspose/barcode/examples/barcode/basic_features/SpecifySymbology.java what is the input folder we should provide. Please attach the sample input.

Thank you


#2

@Saranya_Sekar

Thank you for contacting Aspose Support.

For generating barcode, you may use the following code sample:

BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODE_128, "123456789");
		
generator.save("D:\\Aspose\\" + "test.png"); 

The above code sample shall generate barcode and save it as PNG image. For reading barcode, you may use the following code sample:

     BarCodeReader rd = new BarCodeReader("D:\\Aspose\\" + "test.png");
	 // read barcode of type Code39Extended
	 while(rd.read())
	 {
	    // print the code text, if barcode found
	    System.out.println("CodeText: " + rd.getCodeText().toString());
	    // print the symbology type
	    System.out.println("Symbology type: " + rd.getCodeType());
	 }

The input folder represents current working directory where the resulting image shall be saved or from where the application shall read the barcode image. As in above provided code sample, “D:\Aspose\” is the working directory.

Moreover, you may get detailed documentation regarding various features of our API at this link:
https://docs.aspose.com/display/barcodejava/Developer+Guide

Furthermore, please free to write back to us if you need additional information.


#3

Thanks for the support.


#4

@Saranya_Sekar

You are welcome and please feel free to write back to us if you have queries in future.


#5

@MuzammilKhan,

Other than Github is there any other feature to explore. If so, kindly please share the code.


#6

@Saranya_Sekar

GitHub is the code examples repository for various functionalities of our API. However, you may get detailed documentation regarding various features along with sample code snippet at this link:
https://docs.aspose.com/display/barcodejava/Developer+Guide