zprinter.py
def print_binary_image(self, binary_data, quantity=1, centre=True, override_exit=False):
        """ Print a barcode with some text below it.

        Args:
            binary_data <str>: A string of binary information (only 1,
                0 and \n allowed) which will be converted to black or
                white space on the label.
            quantity <int>: How many barcodes that should be
                consecutively printed.
            centre <bool>: Set True to centre the graphics on the label
                else the graphics will be drawn from the top-right
                (i.e. the origin).

        Returns:
            Nothing.

        Raises:
            Nothing.
        """

        hex_string = ""
        for row in binary_data:
            hex_string += binary_string_to_hex_string(row)
        byte_string = hex_string_to_latin1_string(hex_string)

        image = BinaryImage(binary_data)

        if centre is True:
            xpos, ypos = self.align(image, x_align="centre", y_align="middle")
        else:
            xpos, ypos = self.align(image, x_align="left", y_align="top")

        for n in range(1, quantity + 1):
            self.commander.encode_binary_image(byte_string,
                                               width_dot=image.width_dot,
                                               length_dot=image.length_dot,
                                               start_x=xpos, start_y=ypos)
            self.commander.next_label()

        # If next_label has not been issued 'self.columns' times, then
        # force the printer to move to the next row.
        if not override_exit and n % self.columns != 0:
            self.commander.encode_print_label()
            self.commander.send_command()
 Print a barcode with some text below it.

        Args:
            binary_data <str>: A string of binary information (only 1,
                0 and \n allowed) which will be converted to black or
                white space on the label.
            quantity <int>: How many barcodes that should be
                consecutively printed.
            centre <bool>: Set True to centre the graphics on the label
                else the graphics will be drawn from the top-right
                (i.e. the origin).

        Returns:
            Nothing.

        Raises:
            Nothing.
        
Print a barcode with some text below it.
Args:
binary_data : A string of binary information (only 1,
0 and \n allowed) which will be converted to black or
white space on the label.
quantity : How many barcodes that should be
consecutively printed.
centre : Set True to centre the graphics on the label
else the graphics will be drawn from the top-right
.

Nothing.

Nothing.
Print a barcode with some text below it . Args : binary_data : A string of binary information ( only 1 0 and \ n allowed ) which will be converted to black or white space on the label . quantity : How many barcodes that should be consecutively printed . centre : Set True to centre the graphics on the label else the graphics will be drawn from the top - right . Nothing . Nothing .
def print_binary_image(self, binary_data, quantity=1, centre=True, override_exit=False):
        hex_string = ""
        for row in binary_data:
            hex_string += binary_string_to_hex_string(row)
        byte_string = hex_string_to_latin1_string(hex_string)
        image = BinaryImage(binary_data)
        if centre is True:
            xpos, ypos = self.align(image, x_align="centre", y_align="middle")
        else:
            xpos, ypos = self.align(image, x_align="left", y_align="top")
        for n in range(1, quantity + 1):
            self.commander.encode_binary_image(byte_string,
                                               width_dot=image.width_dot,
                                               length_dot=image.length_dot,
                                               start_x=xpos, start_y=ypos)
            self.commander.next_label()
        if not override_exit and n % self.columns != 0:
            self.commander.encode_print_label()
            self.commander.send_command()
def print_binary_image ( self , binary_data , quantity = 1 , centre = True , override_exit = False ) : hex_string = "" for row in binary_data : hex_string += binary_string_to_hex_string ( row ) byte_string = hex_string_to_latin1_string ( hex_string ) image = BinaryImage ( binary_data ) if centre is True : xpos , ypos = self . align ( image , x_align = "centre" , y_align = "middle" ) else : xpos , ypos = self . align ( image , x_align = "left" , y_align = "top" ) for n in range ( 1 , quantity + 1 ) : self . commander . encode_binary_image ( byte_string , width_dot = image . width_dot , length_dot = image . length_dot , start_x = xpos , start_y = ypos ) self . commander . next_label ( ) if not override_exit and n % self . columns != 0 : self . commander . encode_print_label ( ) self . commander . send_command ( )
Print a barcode with some text below it.
Print a barcode with some text below it .
""" Print a barcode with some text below it.

        Args:
            binary_data <str>: A string of binary information (only 1,
                0 and \n allowed) which will be converted to black or
                white space on the label.
            quantity <int>: How many barcodes that should be
                consecutively printed.
            centre <bool>: Set True to centre the graphics on the label
                else the graphics will be drawn from the top-right
                (i.e. the origin).

        Returns:
            Nothing.

        Raises:
            Nothing.
        """ # If next_label has not been issued 'self.columns' times, then # force the printer to move to the next row.
self
binary_data
quantity
centre
override_exit