use my own examples

This commit is contained in:
freeyoung 2014-03-14 02:09:10 +08:00
parent 6a4fbc191f
commit 0590ec90a2
1 changed files with 10 additions and 11 deletions

View File

@ -10,7 +10,7 @@ In order to start getting access to your printer, you must ensure
you have previously installed the following python modules: you have previously installed the following python modules:
* pyusb (python-usb) * pyusb (python-usb)
* PIL (Python Image Library) * PIL (Python Image Library) or Pillow (recommended)
2. Description 2. Description
------------------------------------------------------------------ ------------------------------------------------------------------
@ -69,16 +69,15 @@ The following example shows how to initialize the Epson TM-TI88IV
*** NOTE: Always finish the sequence with Epson.cut() otherwise *** NOTE: Always finish the sequence with Epson.cut() otherwise
you will endup with weird chars being printed. you will endup with weird chars being printed.
from escpos import * from escpos import printer
""" Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88IV) """ p = printer.Usb(0x04b8, 0x0202)
Epson = escpos.Escpos(0x04b8,0x0202,0) p.text("Hello World")
Epson.text("Hello World") p.image("logo.gif")
Epson.image("logo.gif") p.fullimage("a.really.large.image.png")
Epson.fullimage("a.really.large.image.png") p.barcode('1324354657687','EAN13',64,2,'','')
Epson.barcode p.qr('this is a piece of code')
Epson.barcode('1324354657687','EAN13',64,2,'','') p.cut()
Epson.cut()
5. Links 5. Links
------------------------------------------------------------------ ------------------------------------------------------------------