跳转到主要内容

用于与(Zebra)标签打印机通信的软件包

项目描述

用法

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

注意

如果您在使用CUPS的Linux或MacOSX机器上,可能需要使用http://localhost:631的管理员面板设置打印机队列

变更日志

0.1.0

  • 类名现在为‘Zebra’而不是‘zebra’

  • 修复pypi中缺失win32print模块的问题

  • 停止对python 2的支持

  • 使用setuptools代替distutils

  • 改进文档

  • 添加了reset(),reset_default(),autosense(),print_config_label()和print_graphic()函数

0.0.5

  • 添加了-oraw到lpr命令,使更多CUPS安装工作

0.0.4及之前版本

未记录!

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

zebra-0.1.0.tar.gz (5.7 kB 查看哈希值)

上传于

构建分发

zebra-0.1.0-py3-none-any.whl (5.8 kB 查看哈希值)

上传于 Python 3

由以下支持