def set_codetext(self):
        dataDir = Settings.dataDir + 'WorkingWithBarcode/UtilityFeatures/CodeText/'

        # Instantiate barcode object
        bb = BarCodeBuilder()

        # Set the code text for the barcode
        bb.setCodeText("Aspose-123")

        # Set the symbology type to Code128
        symbology = Symbology
        bb.setSymbologyType(symbology.Code128)

        # Set the width of the bars to 0.5 millimeter
        bb.setxDimension(0.5)

        # save the barcode image to file
        bb.save(dataDir + "codetext.out.jpg")

        # Print message
        print "Barcode image generated successfully."
    def set_codetext(self):
        dataDir = Settings.dataDir + 'WorkingWithBarcode/UtilityFeatures/CodeText/'

        # Instantiate barcode object
        bb =  BarCodeBuilder()

        # Set the code text for the barcode
        bb.setCodeText("Aspose-123")

        # Set the symbology type to Code128
        symbology= Symbology
        bb.setSymbologyType(symbology.Code128)

        # Set the width of the bars to 0.5 millimeter
        bb.setxDimension(0.5)

        # save the barcode image to file
        bb.save(dataDir + "codetext.out.jpg")

        # Print message
        print "Barcode image generated successfully."
    def __init__(self):
        dataDir = Settings.dataDir + 'WorkingWithBarcode/AdvanceBarcodeFeatures/ManageDimension/'
        
        # Instantiate barcode object
        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)

        # Save the image to file
        bb.save(dataDir + "barcode.jpg")

        # Set the x-dimension for the bars of the barcode
        bb.setxDimension(0.5)
        # Save the image to file
        bb.save(dataDir + "barcodeXDimensionChanged.jpg")


        # Instantiate barcode object
        bb1 = BarCodeBuilder()

        # Set the code text of the barcode
        bb1.setCodeText("12345678")

        # Set the symbology type to code128
        bb1.setSymbologyType(symbology.Pdf417)

        # Set the x-dimension for the bars of the barcode
        bb1.setxDimension(0.5)

        # Save the image to file
        bb1.save(dataDir + "barcodeYDimensionChanged.jpg")

        # Display Status.
        print "BarCodes with different dimensions have been created successfully."
    def __init__(self):
        
        dataDir = Settings.dataDir + 'WorkingWith2DBarcodes/Basic2DBarcodeFeatures/Creating2DBarcode'
        
        # Instantiate barcode object
        builder =  BarCodeBuilder()

        symbology= Symbology
        builder.setSymbologyType(symbology.Pdf417)

        # Width of each module
        builder.setxDimension(0.6)

        # Height of each module
        builder.setyDimension(1.2)
        builder.setCodeText("this is some test code text. \n Second line \n third line.")

        # Save the image to your system and set its image format to Jpeg
        builder.save(dataDir + "Creating2DBarcode.jpg")

        # Display Status
        print "Created 2D Barcode Successfully."
Beispiel #5
0
    def __init__(self):
        dataDir = Settings.dataDir + 'WorkingWithBarcode/AdvanceBarcodeFeatures/ManageDimension/'

        # Instantiate barcode object
        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)

        # Save the image to file
        bb.save(dataDir + "barcode.jpg")

        # Set the x-dimension for the bars of the barcode
        bb.setxDimension(0.5)
        # Save the image to file
        bb.save(dataDir + "barcodeXDimensionChanged.jpg")

        # Instantiate barcode object
        bb1 = BarCodeBuilder()

        # Set the code text of the barcode
        bb1.setCodeText("12345678")

        # Set the symbology type to code128
        bb1.setSymbologyType(symbology.Pdf417)

        # Set the x-dimension for the bars of the barcode
        bb1.setxDimension(0.5)

        # Save the image to file
        bb1.save(dataDir + "barcodeYDimensionChanged.jpg")

        # Display Status.
        print "BarCodes with different dimensions have been created successfully."
    def __init__(self):

        dataDir = Settings.dataDir + 'WorkingWith2DBarcodes/Basic2DBarcodeFeatures/Creating2DBarcode'

        # Instantiate barcode object
        builder = BarCodeBuilder()

        symbology = Symbology
        builder.setSymbologyType(symbology.Pdf417)

        # Width of each module
        builder.setxDimension(0.6)

        # Height of each module
        builder.setyDimension(1.2)
        builder.setCodeText(
            "this is some test code text. \n Second line \n third line.")

        # Save the image to your system and set its image format to Jpeg
        builder.save(dataDir + "Creating2DBarcode.jpg")

        # Display Status
        print "Created 2D Barcode Successfully."