Skip to main content

A package to communicate with (Zebra) label printers

Project description

Usage:

from zebra import Zebra

z = Zebra( [queue] )
  Constructor with optional printer queue

z.getqueues()
  Return a list containing available printer queues

z.setqueue( queue )
  Set the printer queue

z.setup( direct_thermal=None, label_height=None, label_width=None )
  Set up the label printer using EPL2. Parameters are not set if they are None.
  Not necessary if using AutoSense (hold feed button while powering on)
    direct_thermal - True if using direct thermal labels
    label_height   - tuple (label height, label gap) in dots
    label_width    - in dots

z.reset_default()
  Resets the printer to factory settings using EPL2

z.reset()
  Resets the printer using EPL2 - equivalent of switching off/on

z.autosense()
  Run AutoSense by sending an EPL2 command
  Get the printer to detect label and gap length and set the sensor levels

z.print_config_label()
  Send an EPL2 command to print label(s) with current config settings

z.store_graphic( name, filename )
  Store a 1 bit .PCX file on the label printer using EPL2
    name     - name to be used on printer
    filename - local filename

z.print_graphic( x, y, width, length, data, qty )
    Print a label from 1 bit data, using EPL2
      x,y    - top left coordinates of the image, in dots
      width  - width of image, in dots.  Must be a multiple of 8.
      length - length of image, in dots
      data   - raw graphical data, in bytes
      qty    - number of labels to print

z.output( commands )
  Output raw commands to the printer

z.print_config_label()
  Print label(s) containing the current printer configuration using EPL2

Note:

If you are on a Linux or MacOSX machine using CUPS, you may need to set up a printer queue using the admin panel at http://localhost:631

Changelog

0.1.0

  • class name is now ‘Zebra’ instead of ‘zebra’

  • Fix for missing win32print module in pypi

  • Drop python 2 support

  • use setuptools instead of distutils

  • improve documentation

  • Added reset(), reset_default(), autosense(), print_config_label() and print_graphic() functions

0.0.5

  • Added -oraw to lpr command to make more CUPS installations work

0.0.4 and earlier

Undocumented!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zebra-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

zebra-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file zebra-0.1.0.tar.gz.

File metadata

  • Download URL: zebra-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for zebra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 84cd4b1d2dbb276e538732ae97742fa8020cc70c431ea7c53de1b0a2f42fae54
MD5 00505d36eb04a0ac6516cf75d91e6b6f
BLAKE2b-256 75cc340ff148dd227b883e8ee4d5075fa99dccd80b41a90596830f8188f5a2d8

See more details on using hashes here.

File details

Details for the file zebra-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zebra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for zebra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 002e068a685d2d3d3083c20f3a4345bfb8741e900496daf16408045cb7f7df70
MD5 b0ee3b7f016ad74afa34289b1939b3ef
BLAKE2b-256 4f9a2809ca21327e7010ddec2ec385b5eba966da595d994e2d319650ac25dcae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page