Exemplo n.º 1
0
class Envelope:
  def __init__(self, xid, name, company, city):
    self.label = Label()

    self.barcode(xid)
    self.xid(xid)
    self.name(name)
    self.company(company)

    self.label.close()

  def barcode(self, xid):
    prefix, number = xid.split('-')
    self.label.code(int(number), 280, 200, source=prefix, height=50, ori=3, size=15)

  def name(self, name):
    self.label.wrapped_and_adjusted_text(name, 10, 160, max_size=2, width=0.7)

  def company(self, company):
    self.label.wrapped_and_adjusted_text(company, 10, 200, max_size=1)

  def xid(self, xid):
    prefix, number = xid.split('-')
    prefix = prefix[0].upper()
    output = "-".join([prefix,number])
    self.label.text(output, 10, 100, size=8)
Exemplo n.º 2
0
    def __init__(self, xid, name, company, city):
        self.label = Label()

        self.barcode(xid)
        self.xid(xid)
        self.name(name)
        self.company(company)

        self.label.close()
Exemplo n.º 3
0
    def __init__(self, prefix, xid, name, company, city, copies=1, device=settings.DEVICE):
        self.label = Label(device=device)

        self.barcode(prefix, xid)
        self.xid(prefix, xid)
        self.name(name)
        self.company(company)

        self.label.close(copies)
Exemplo n.º 4
0
  def __init__(self, xid, name, company, city):
    self.label = Label()

    self.barcode(xid)
    self.xid(xid)
    self.name(name)
    self.company(company)

    self.label.close()
Exemplo n.º 5
0
class Envelope:
    def __init__(self, prefix, xid, name, company, city, copies=1, device=settings.DEVICE):
        self.label = Label(device=device)

        self.barcode(prefix, xid)
        self.xid(prefix, xid)
        self.name(name)
        self.company(company)

        self.label.close(copies)

    def barcode(self, prefix, xid):
        self.label.code(int(xid), 280, 200, source=prefix, height=50, ori=3, size=15)

    def name(self, name):
        self.label.wrapped_and_adjusted_text(name, 10, 160, max_size=2, width=0.7)

    def company(self, company):
        self.label.wrapped_and_adjusted_text(company, 10, 200, max_size=1)

    def xid(self, prefix, xid):
        output = "{}-{}".format(prefix, xid)
        self.label.text(output, 10, 100, size=8)
Exemplo n.º 6
0
class Envelope:
    def __init__(self, xid, name, company, city):
        self.label = Label()

        self.barcode(xid)
        self.xid(xid)
        self.name(name)
        self.company(company)

        self.label.close()

    def barcode(self, xid):
        prefix, number = xid.split('-')
        self.label.code(int(number),
                        280,
                        200,
                        source=prefix,
                        height=50,
                        ori=3,
                        size=15)

    def name(self, name):
        self.label.wrapped_and_adjusted_text(name,
                                             10,
                                             160,
                                             max_size=2,
                                             width=0.7)

    def company(self, company):
        self.label.wrapped_and_adjusted_text(company, 10, 200, max_size=1)

    def xid(self, xid):
        prefix, number = xid.split('-')
        prefix = prefix[0].upper()
        output = "-".join([prefix, number])
        self.label.text(output, 10, 100, size=8)
Exemplo n.º 7
0
class Badge:
  def __init__(self, prefix, xid, name, company, city, copies=1, device=settings.DEVICE):
    self.label = Label(device=device)

    self.barcode(prefix, xid)
    self.xid(prefix, xid)
    self.name(name)
    self.line()
    self.company(company)
    self.city(city)

    self.label.close(copies)

  def barcode(self, prefix, xid):
    self.label.code(int(xid), 280, 200, source=prefix, ori=3, size=4, height=30)

  def xid(self, prefix, xid):
    output = "{}-{}".format(prefix.upper(), xid)
    self.label.text(output, 190, 205, size=1)

  def line(self):
    self.label.text("____________", 10, 105)

  def name(self, name):
    self.label.wrapped_and_adjusted_text(name, 10, 80, max_size=5)

  def company(self, company):
    self.label.wrapped_and_adjusted_text(company, 10, 140, max_size=2)

  def city(self, city):
    self.label.wrapped_and_adjusted_text(city, 10, 200, max_size=1, width=0.6)
Exemplo n.º 8
0
class Badge:
  def __init__(self, xid, name, company, city):
    self.label = Label()

    self.barcode(xid)
    self.xid(xid)
    self.name(name)
    self.line()
    self.company(company)
    self.city(city)

    self.label.close()

  def barcode(self, xid):
    prefix, number = xid.split('-')
    self.label.code(int(number), 280, 200, source=prefix, ori=3, size=4, height=30)

  def xid(self, xid):
    prefix, number = xid.split('-')
    prefix = prefix[0].upper()
    output = "-".join([prefix,number])
    self.label.text(output, 190, 205, size=1)

  def line(self):
    self.label.text("____________", 10, 105)

  def name(self, name):
    self.label.wrapped_and_adjusted_text(name, 10, 80, max_size=5)

  def company(self, company):
    self.label.wrapped_and_adjusted_text(company, 10, 140, max_size=2)

  def city(self, city):
    self.label.wrapped_and_adjusted_text(city, 10, 200, max_size=1, width=0.6)
Exemplo n.º 9
0
class Badge:
    def __init__(self, xid, name, company, city):
        self.label = Label()

        self.barcode(xid)
        self.xid(xid)
        self.name(name)
        self.line()
        self.company(company)
        self.city(city)

        self.label.close()

    def barcode(self, xid):
        prefix, number = xid.split('-')
        self.label.code(int(number),
                        280,
                        200,
                        source=prefix,
                        ori=3,
                        size=4,
                        height=30)

    def xid(self, xid):
        prefix, number = xid.split('-')
        prefix = prefix[0].upper()
        output = "-".join([prefix, number])
        self.label.text(output, 190, 205, size=1)

    def line(self):
        self.label.text("____________", 10, 105)

    def name(self, name):
        self.label.wrapped_and_adjusted_text(name, 10, 80, max_size=5)

    def company(self, company):
        self.label.wrapped_and_adjusted_text(company, 10, 140, max_size=2)

    def city(self, city):
        self.label.wrapped_and_adjusted_text(city,
                                             10,
                                             200,
                                             max_size=1,
                                             width=0.6)