zprinter.py
def print_qr(self, data, quantity=1, scale=3, centre=True, override_exit=False):
        """ Print a QR code.

        Args:
            data: A string containing the data of interest.
            quantity: How many barcodes that should be consecutively
                      printer.
            scale: An integer to scale the size of the QR code.
            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.
        """
        binary_data, byte_string = create_binary_qr(data, scale)
        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")

        # Configure the printer
        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 QR code.

        Args:
            data: A string containing the data of interest.
            quantity: How many barcodes that should be consecutively
                      printer.
            scale: An integer to scale the size of the QR code.
            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 QR code.
Args:
data: A string containing the data of interest.
quantity: How many barcodes that should be consecutively
printer.
scale: An integer to scale the size of the QR code.
centre : Set True to centre the graphics on the label
else the graphics will be drawn from the top-right
.

Nothing.

Nothing.
Print a QR code . Args : data : A string containing the data of interest . quantity : How many barcodes that should be consecutively printer . scale : An integer to scale the size of the QR code . centre : Set True to centre the graphics on the label else the graphics will be drawn from the top - right . Nothing . Nothing .
def print_qr(self, data, quantity=1, scale=3, centre=True, override_exit=False):
        binary_data, byte_string = create_binary_qr(data, scale)
        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_qr ( self , data , quantity = 1 , scale = 3 , centre = True , override_exit = False ) : binary_data , byte_string = create_binary_qr ( data , scale ) 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 QR code.
Print a QR code .
""" Print a QR code.

        Args:
            data: A string containing the data of interest.
            quantity: How many barcodes that should be consecutively
                      printer.
            scale: An integer to scale the size of the QR code.
            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.
        """ # Configure the printer # If next_label has not been issued 'self.columns' times, then # force the printer to move to the next row.
self
data
quantity
scale
centre
override_exit