zprinter.py
def print_box(self, width_mm, length_mm, stroke_mm, x_align="C", y_align="M", quantity=1,
                  override_exit=False):
        """ Print a box of specified height and length.

        Args:
            width_mm <float>: The length of the box, in mm
            length_mm <float>: The height of the box, in mm
            stroke_mm <float>: The thickness of the lines, in mm
            x_align <str>/<int>: "L"eft, "C"entre, "R"ight, or an
                integer representing in dots where the object should be
                printed from.
            y_align <str>/<int>: "T"op, "M"iddle, "B"ottom, or an
                integer representing in dots where the object should be
                printed from.
        """
        objBox = Box(width_mm, length_mm, stroke_mm)
        xpos, ypos = self.align(objBox, x_align=x_align, y_align=y_align)

        # Submit the print command.
        for n in range(1, quantity + 1):
            self.commander.encode_box(width_dot=objBox.width_dot,
                                      length_dot=objBox.length_dot,
                                      stroke_dot=objBox.stroke_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 box of specified height and length.

        Args:
            width_mm <float>: The length of the box, in mm
            length_mm <float>: The height of the box, in mm
            stroke_mm <float>: The thickness of the lines, in mm
            x_align <str>/<int>: "L"eft, "C"entre, "R"ight, or an
                integer representing in dots where the object should be
                printed from.
            y_align <str>/<int>: "T"op, "M"iddle, "B"ottom, or an
                integer representing in dots where the object should be
                printed from.
        
Print a box of specified height and length.
Print a box of specified height and length .
def print_box(self, width_mm, length_mm, stroke_mm, x_align="C", y_align="M", quantity=1,
                  override_exit=False):
        objBox = Box(width_mm, length_mm, stroke_mm)
        xpos, ypos = self.align(objBox, x_align=x_align, y_align=y_align)
        for n in range(1, quantity + 1):
            self.commander.encode_box(width_dot=objBox.width_dot,
                                      length_dot=objBox.length_dot,
                                      stroke_dot=objBox.stroke_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_box ( self , width_mm , length_mm , stroke_mm , x_align = "C" , y_align = "M" , quantity = 1 , override_exit = False ) : objBox = Box ( width_mm , length_mm , stroke_mm ) xpos , ypos = self . align ( objBox , x_align = x_align , y_align = y_align ) for n in range ( 1 , quantity + 1 ) : self . commander . encode_box ( width_dot = objBox . width_dot , length_dot = objBox . length_dot , stroke_dot = objBox . stroke_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 box of specified height and length.
Print a box of specified height and length .
""" Print a box of specified height and length.

        Args:
            width_mm <float>: The length of the box, in mm
            length_mm <float>: The height of the box, in mm
            stroke_mm <float>: The thickness of the lines, in mm
            x_align <str>/<int>: "L"eft, "C"entre, "R"ight, or an
                integer representing in dots where the object should be
                printed from.
            y_align <str>/<int>: "T"op, "M"iddle, "B"ottom, or an
                integer representing in dots where the object should be
                printed from.
        """ # Submit the print command. # If next_label has not been issued 'self.columns' times, then # force the printer to move to the next row.
self
width_mm
length_mm
stroke_mm
x_align
y_align
quantity
override_exit
width_mm <float>
The length of the box, in mm
The length of the box in mm
length_mm <float>
The height of the box, in mm
The height of the box in mm
stroke_mm <float>
The thickness of the lines, in mm
The thickness of the lines in mm
x_align <str>/<int>
"L"eft, "C"entre, "R"ight, or an
integer representing in dots where the object should be
printed from.
" L " eft " C " entre " R " ight or an integer representing in dots where the object should be printed from .
y_align <str>/<int>
"T"op, "M"iddle, "B"ottom, or an
integer representing in dots where the object should be
printed from.
" T " op " M " iddle " B " ottom or an integer representing in dots where the object should be printed from .