Updated README and documentation
This commit is contained in:
parent
4bb94c2662
commit
7e3b6ce586
10
CHANGELOG
10
CHANGELOG
|
@ -26,12 +26,18 @@ CHANGELOG
|
||||||
* 2015-04-21 - Version 1.0.5
|
* 2015-04-21 - Version 1.0.5
|
||||||
- Merge pull request #45 from Krispy2009/master
|
- Merge pull request #45 from Krispy2009/master
|
||||||
. Raising the right error when wrong charcode is used
|
. Raising the right error when wrong charcode is used
|
||||||
. Sent by Krispy2009@gmail.com
|
. Sent by Kristi <Krispy2009@gmail.com>
|
||||||
|
|
||||||
* 2015-07-06 - Version 1.0.6
|
* 2015-07-06 - Version 1.0.6
|
||||||
- Merge pull request #53 from ldos/master
|
- Merge pull request #53 from ldos/master
|
||||||
. Extended params for serial printers
|
. Extended params for serial printers
|
||||||
. Sent by cafeteria.ldosalzira@gmail.com
|
. Sent by ldos <cafeteria.ldosalzira@gmail.com>
|
||||||
|
|
||||||
* 2015-08-22 - Version 1.0.7
|
* 2015-08-22 - Version 1.0.7
|
||||||
- Issue #57: Fixed transparent images
|
- Issue #57: Fixed transparent images
|
||||||
|
|
||||||
|
* 2015-10-27 - Version 1.0.8
|
||||||
|
- Merge pull request #59 from zouppen/master
|
||||||
|
. Support for images vertically longer than 256 pixels
|
||||||
|
. Sent by Joel Lehtonen <joel.lehtonen@koodilehto.fi>
|
||||||
|
- Updated README
|
||||||
|
|
62
README
62
README
|
@ -4,16 +4,7 @@ ESCPOS
|
||||||
Python library to manipulate ESC/POS Printers.
|
Python library to manipulate ESC/POS Printers.
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
1. Dependencies
|
1. Description
|
||||||
|
|
||||||
In order to start getting access to your printer, you must ensure
|
|
||||||
you have previously installed the following python modules:
|
|
||||||
|
|
||||||
* pyusb (python-usb)
|
|
||||||
* PIL (Python Image Library)
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
2. Description
|
|
||||||
|
|
||||||
Python ESC/POS is a library which lets the user have access to all
|
Python ESC/POS is a library which lets the user have access to all
|
||||||
those printers handled by ESC/POS commands, as defined by Epson,
|
those printers handled by ESC/POS commands, as defined by Epson,
|
||||||
|
@ -33,60 +24,13 @@ paper, carrier return, printer reset and others concerned to the
|
||||||
carriage alignment.
|
carriage alignment.
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
3. Define your printer
|
2. Documentation
|
||||||
|
|
||||||
Before start create your Python ESC/POS printer instance, you must
|
|
||||||
see at your system for the printer parameters. This is done with
|
|
||||||
the 'lsusb' command.
|
|
||||||
|
|
||||||
First run the command to look for the "Vendor ID" and "Product ID",
|
|
||||||
then write down the values, these values are displayed just before
|
|
||||||
the name of the device with the following format:
|
|
||||||
|
|
||||||
xxxx:xxxx
|
|
||||||
|
|
||||||
Example:
|
|
||||||
Bus 002 Device 001: ID 1a2b:1a2b Device name
|
|
||||||
|
|
||||||
Write down the the values in question, then issue the following
|
|
||||||
command so you can get the "Interface" number and "End Point"
|
|
||||||
|
|
||||||
lsusb -vvv -d xxxx:xxxx | grep iInterface
|
|
||||||
lsusb -vvv -d xxxx:xxxx | grep bEndpointAddress | grep OUT
|
|
||||||
|
|
||||||
The first command will yields the "Interface" number that must
|
|
||||||
be handy to have and the second yields the "Output Endpoint"
|
|
||||||
address.
|
|
||||||
|
|
||||||
By default the "Interface" number is "0" and the "Output Endpoint"
|
|
||||||
address is "0x82", if you have other values then you can define
|
|
||||||
with your instance.
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
4. Define your instance
|
|
||||||
|
|
||||||
The following example shows how to initialize the Epson TM-TI88IV
|
|
||||||
*** NOTE: Always finish the sequence with Epson.cut() otherwise
|
|
||||||
you will endup with weird chars being printed.
|
|
||||||
|
|
||||||
from escpos import *
|
|
||||||
|
|
||||||
""" Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88IV) """
|
|
||||||
Epson = escpos.Escpos(0x04b8,0x0202)
|
|
||||||
Epson.text("Hello World")
|
|
||||||
Epson.image("logo.gif")
|
|
||||||
Epson.barcode
|
|
||||||
Epson.barcode('1324354657687','EAN13',64,2,'','')
|
|
||||||
Epson.cut()
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
5. Links
|
|
||||||
|
|
||||||
Please visit project documentation at:
|
Please visit project documentation at:
|
||||||
https://github.com/manpaz/python-escpos/wiki
|
https://github.com/manpaz/python-escpos/wiki
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
6. Donations
|
3. Donations
|
||||||
|
|
||||||
There are some different prints I'd like to acquire, but unfortunately
|
There are some different prints I'd like to acquire, but unfortunately
|
||||||
not all, even used, are cheaper and easy to get.
|
not all, even used, are cheaper and easy to get.
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from distutils.core import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='escpos',
|
name='escpos',
|
||||||
version='1.0.7',
|
version='1.0.8',
|
||||||
url='https://github.com/manpaz/python-escpos',
|
url='https://github.com/manpaz/python-escpos',
|
||||||
download_url='https://github.com/manpaz/python-escpos.git',
|
download_url='https://github.com/manpaz/python-escpos.git',
|
||||||
description='Python library to manipulate ESC/POS Printers',
|
description='Python library to manipulate ESC/POS Printers',
|
||||||
|
|
Loading…
Reference in New Issue