use of com.aspose.barcode.BarCodeBuilder in project Aspose.BarCode-for-Java by aspose-barcode.
the class CreatingAQRBarcode method createAQRBarcode.
public static void createAQRBarcode(String dataDir) throws IOException {
BarCodeBuilder b = new BarCodeBuilder();
b.setEncodeType(com.aspose.barcode.EncodeTypes.QR);
b.setCodeText("1234567890");
b.save(dataDir + "QRBarcode.bmp", BarCodeImageFormat.Bmp);
}
use of com.aspose.barcode.BarCodeBuilder in project Aspose.BarCode-for-Java by aspose-barcode.
the class CreatingAQRBarcode method errorCorrection.
public static void errorCorrection(String dataDir) throws IOException {
BarCodeBuilder b = new BarCodeBuilder();
b.setEncodeType(com.aspose.barcode.EncodeTypes.QR);
b.setQRErrorLevel(QRErrorLevel.LevelH);
b.setCodeText("1234567890");
b.save(dataDir + "errorCorrectionQRBarcode.bmp", BarCodeImageFormat.Bmp);
}
use of com.aspose.barcode.BarCodeBuilder in project Aspose.BarCode-for-Java by aspose-barcode.
the class CreatingAnAztecBarcode method createAnAztecBarcode.
public static void createAnAztecBarcode(String dataDir) throws IOException {
BarCodeBuilder b = new BarCodeBuilder();
b.setEncodeType(com.aspose.barcode.EncodeTypes.AZTEC);
b.setCodeText("1234567890");
b.save(dataDir + "aztec.bmp", BarCodeImageFormat.Bmp);
}
use of com.aspose.barcode.BarCodeBuilder in project Aspose.BarCode-for-Java by aspose-barcode.
the class CreatingTwoDimensional2DBarcode method creatingAPdf417Barcode.
public static void creatingAPdf417Barcode(String dataDir) {
BarCodeBuilder b = new BarCodeBuilder();
b.setEncodeType(com.aspose.barcode.EncodeTypes.PDF_417);
// Width of each module
b.setxDimension(0.6f);
// Height of each module
b.setyDimension(1.2f);
b.setCodeText("this is some test code text. \n Second line \n third line.");
b.save(dataDir + "pdf417.bmp");
}
use of com.aspose.barcode.BarCodeBuilder in project Aspose.BarCode-for-Java by aspose-barcode.
the class DetectTheUnicodeEncoding method main.
public static void main(String[] args) throws Exception {
ApplyALicense.applyALicense();
// The path to the resource directory.
String dataDir = Utils.getDataDir(DetectTheUnicodeEncoding.class) + "2DBarcode/BasicFeatures/";
String imageFilePath = dataDir + "unicodeEncoding.png";
BarCodeBuilder builder = new BarCodeBuilder();
builder.setCodeText("Слово");
builder.setEncodeType(com.aspose.barcode.EncodeTypes.QR);
builder.setCodeTextEncoding(StandardCharsets.UTF_8);
builder.save(imageFilePath, BarCodeImageFormat.Png);
BarCodeReader reader = new BarCodeReader(imageFilePath, com.aspose.barcode.barcoderecognition.DecodeType.QR);
reader.setDetectEncoding(true);
if (reader.read()) {
// "Слово"
System.out.println(reader.getCodeText());
}
}
Aggregations