def __init__(self): dataDir = Settings.dataDir + 'WorkingWithBarcodeImage/BarcodeImageUtilityFeatures/SetBarcodeImageUnitSize/' # Instantiate barcode object symbology = Symbology bb = BarCodeBuilder("12345678", symbology.Code128) # Measurement is Milimeter graphicsUnit = GraphicsUnit bb.setGraphicsUnit(graphicsUnit.Point) # Set the bar height to 3 points bb.setBarHeight(3.0) bb.save(dataDir + "SetBarcodeImageUnitSize.jpg") # Display Status. print "Set Barcode Image Unit Size, please check the output file."
def __init__(self): dataDir = Settings.dataDir + 'WorkingWithBarcodeImage/BarcodeImageUtilityFeatures/SetBarcodeImageUnitSize/' # Instantiate barcode object symbology = Symbology bb = BarCodeBuilder("12345678", symbology.Code128) # Measurement is Milimeter graphicsUnit = GraphicsUnit bb.setGraphicsUnit(graphicsUnit.Point) # Set the bar height to 3 points bb.setBarHeight(3.0) bb.save(dataDir + "SetBarcodeImageUnitSize.jpg") # Display Status. print "Set Barcode Image Unit Size, please check the output file."
def __init__(self): dataDir = Settings.dataDir + 'WorkingWithBarcode/AdvanceBarcodeFeatures/SetBarsHeight' bb = BarCodeBuilder() # Set up code text (data to be encoded) bb.setCodeText("1234567") # Set the symbology type to Code128 symbology = Symbology bb.setSymbologyType(symbology.Code128) # Set the bar height to be 3 milimeter bb.setBarHeight(3.0) bb.save(dataDir + "barcode3.jpg") # Set the bar height to be 7 milimeter bb.setBarHeight(7.0) bb.save(dataDir + "barcode7.jpg") # Set the bar height to be 11 milimeter bb.setBarHeight(11.0) bb.save(dataDir + "barcode11.jpg") # Display Status. print "Barcode with different heights has been created successfully."
def __init__(self): dataDir = Settings.dataDir + 'WorkingWithBarcode/AdvanceBarcodeFeatures/SetBarsHeight' bb = BarCodeBuilder() # Set up code text (data to be encoded) bb.setCodeText("1234567") # Set the symbology type to Code128 symbology = Symbology bb.setSymbologyType(symbology.Code128) # Set the bar height to be 3 milimeter bb.setBarHeight(3.0) bb.save(dataDir + "barcode3.jpg") # Set the bar height to be 7 milimeter bb.setBarHeight(7.0) bb.save(dataDir + "barcode7.jpg") # Set the bar height to be 11 milimeter bb.setBarHeight(11.0) bb.save(dataDir + "barcode11.jpg") # Display Status. print "Barcode with different heights has been created successfully."