mirror of
https://github.com/python-escpos/python-escpos
synced 2025-07-15 08:43:30 +00:00
Add profile params to 'Documentation and Usage'
This commit is contained in:
parent
fb9b4d82d2
commit
38fdf8bffc
20
README.rst
20
README.rst
@ -59,7 +59,7 @@ Another example based on the Network printer class:
|
|||||||
|
|
||||||
from escpos.printer import Network
|
from escpos.printer import Network
|
||||||
|
|
||||||
kitchen = Network("192.168.1.100") #Printer IP Address
|
kitchen = Network("192.168.1.100", profile="TM-T88III") #Printer IP Address
|
||||||
kitchen.text("Hello World\n")
|
kitchen.text("Hello World\n")
|
||||||
kitchen.barcode('4006381333931', 'EAN13', 64, 2, '', '')
|
kitchen.barcode('4006381333931', 'EAN13', 64, 2, '', '')
|
||||||
kitchen.cut()
|
kitchen.cut()
|
||||||
@ -71,18 +71,22 @@ Another example based on the Serial printer class:
|
|||||||
from escpos.printer import Serial
|
from escpos.printer import Serial
|
||||||
|
|
||||||
""" 9600 Baud, 8N1, Flow Control Enabled """
|
""" 9600 Baud, 8N1, Flow Control Enabled """
|
||||||
p = Serial(devfile='/dev/tty.usbserial',
|
p = Serial(
|
||||||
baudrate=9600,
|
devfile='/dev/tty.usbserial',
|
||||||
bytesize=8,
|
baudrate=9600,
|
||||||
parity='N',
|
bytesize=8,
|
||||||
stopbits=1,
|
parity='N',
|
||||||
timeout=1.00,
|
stopbits=1,
|
||||||
dsrdtr=True)
|
timeout=1.00,
|
||||||
|
dsrdtr=True,
|
||||||
|
profile="TM-T88III"
|
||||||
|
)
|
||||||
|
|
||||||
p.text("Hello World\n")
|
p.text("Hello World\n")
|
||||||
p.qr("You can readme from your smartphone")
|
p.qr("You can readme from your smartphone")
|
||||||
p.cut()
|
p.cut()
|
||||||
|
|
||||||
|
.. note:: It is highly recommended to include a matching profile to inform python-escpos about the printer's capabilities.
|
||||||
|
|
||||||
The full project-documentation is available on
|
The full project-documentation is available on
|
||||||
`Read the Docs <https://python-escpos.readthedocs.io>`_.
|
`Read the Docs <https://python-escpos.readthedocs.io>`_.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user