1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-08-24 09:03:34 +00:00

Docs: profile usage additions and clarifications (#677)

* Add link to github

* Add profile params to 'Documentation and Usage'

* More profile additions and clarifications

* Fix code style

* Fix Include link to github in documentation topbar

* Fix Black code style

* Fix GH link

* Fix GH link path

---------

Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
This commit is contained in:
Benito López
2025-02-21 21:01:40 +01:00
committed by GitHub
parent e383b7a397
commit a394826d69
3 changed files with 27 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ Another example based on the Network printer class:
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.barcode('4006381333931', 'EAN13', 64, 2, '', '')
kitchen.cut()
@@ -71,18 +71,22 @@ Another example based on the Serial printer class:
from escpos.printer import Serial
""" 9600 Baud, 8N1, Flow Control Enabled """
p = Serial(devfile='/dev/tty.usbserial',
baudrate=9600,
bytesize=8,
parity='N',
stopbits=1,
timeout=1.00,
dsrdtr=True)
p = Serial(
devfile='/dev/tty.usbserial',
baudrate=9600,
bytesize=8,
parity='N',
stopbits=1,
timeout=1.00,
dsrdtr=True,
profile="TM-T88III"
)
p.text("Hello World\n")
p.qr("You can readme from your smartphone")
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
`Read the Docs <https://python-escpos.readthedocs.io>`_.