Package org.krysalis.barcode4j

Examples of org.krysalis.barcode4j.BarcodeGenerator


      return null;
    }

    try
    {
      final BarcodeGenerator generator = SimpleBarcodesUtility.createBarcode4J
          (type, showText, checksum, Integer.valueOf(barHeight));
      if (generator != null)
      {
        return new BarcodeDrawable(generator, data);
      }
View Full Code Here


    final boolean checksum = ElementTypeUtils.getBooleanAttribute
        (element, SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.CHECKSUM_ATTRIBUTE, true);

    try
    {
      final BarcodeGenerator generator = SimpleBarcodesUtility.createBarcode4J(type, showText, checksum, barHeight);
      if (generator != null)
      {
        return new BarcodeDrawable(generator, value.toString());
      }
View Full Code Here

    String data = msg.replace("<GS>", "\u00F1");

    try
    {
      Configuration cfg = builder.buildFromFile(new File(filename));
      BarcodeGenerator gen = BarcodeUtil.getInstance().createBarcodeGenerator(cfg);

      BarcodeDimension barDim = gen.calcDimensions(data);
      bufImage = new BufferedImage((int) barDim.getWidth(), (int) barDim.getHeight(), BufferedImage.TYPE_BYTE_GRAY);

      bufImage = BitmapBuilder.getImage(gen, data, 300);
    }
    catch (Exception e)
View Full Code Here

      if (json.has("barcodeGenerator")) {
        BarcodeDimension dim = new BarcodeDimension(100, 100);
        if (json.has("dimensionWidth") && json.has("dimensionHeight")) {
          dim = new BarcodeDimension(json.getDouble("dimensionWidth"), json.getDouble("dimensionHeight"));
        }
        BarcodeGenerator bg = BarcodeFactory.lookupGenerator(json.getString("barcodeGenerator"));
        if (bg != null) {
          bi = barcodeFactory.generateBarcode(sample, bg, dim);
        }
        else {
          return JSONUtils.SimpleJSONError("'" + json.getString("barcodeGenerator") + "' is not a valid barcode generator type");
View Full Code Here

      if (json.has("barcodeGenerator")) {
        BarcodeDimension dim = new BarcodeDimension(100, 100);
        if (json.has("dimensionWidth") && json.has("dimensionHeight")) {
          dim = new BarcodeDimension(json.getDouble("dimensionWidth"), json.getDouble("dimensionHeight"));
        }
        BarcodeGenerator bg = BarcodeFactory.lookupGenerator(json.getString("barcodeGenerator"));
        if (bg != null) {
          bi = barcodeFactory.generateBarcode(pool, bg, dim);
        }
        else {
          return JSONUtils.SimpleJSONError("'" + json.getString("barcodeGenerator") + "' is not a valid barcode generator type");
View Full Code Here

      if (json.has("barcodeGenerator")) {
        BarcodeDimension dim = new BarcodeDimension(100, 100);
        if (json.has("dimensionWidth") && json.has("dimensionHeight")) {
          dim = new BarcodeDimension(json.getDouble("dimensionWidth"), json.getDouble("dimensionHeight"));
        }
        BarcodeGenerator bg = BarcodeFactory.lookupGenerator(json.getString("barcodeGenerator"));
        if (bg != null) {
          bi = barcodeFactory.generateBarcode(plate, bg, dim);
        }
        else {
          return JSONUtils.SimpleJSONError("'" + json.getString("barcodeGenerator") + "' is not a valid barcode generator type");
View Full Code Here

      if (json.has("barcodeGenerator")) {
        BarcodeDimension dim = new BarcodeDimension(100, 100);
        if (json.has("dimensionWidth") && json.has("dimensionHeight")) {
          dim = new BarcodeDimension(json.getDouble("dimensionWidth"), json.getDouble("dimensionHeight"));
        }
        BarcodeGenerator bg = BarcodeFactory.lookupGenerator(json.getString("barcodeGenerator"));
        if (bg != null) {
          bi = barcodeFactory.generateBarcode(library, bg, dim);
        }
        else {
          return JSONUtils.SimpleJSONError("'"+json.getString("barcodeGenerator") + "' is not a valid barcode generator type");
View Full Code Here

TOP

Related Classes of org.krysalis.barcode4j.BarcodeGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.