improve spelling

This commit is contained in:
Patrick Kanzler 2023-09-06 00:30:51 +02:00
parent b81c841a1b
commit 3f7b86e7d2
4 changed files with 18 additions and 12 deletions

View File

@ -4,7 +4,7 @@ Printing Barcodes
:Last Reviewed: 2023-08-10 :Last Reviewed: 2023-08-10
Many printers implement barcode printing natively. Many printers implement barcode printing natively.
This hardware renderered barcodes are fast but the supported These hardware rendered barcodes are fast but the supported
formats are limited by the printer itself and different between models. formats are limited by the printer itself and different between models.
However, almost all printers support printing images, so barcode However, almost all printers support printing images, so barcode
rendering can be performed externally by software and then sent rendering can be performed externally by software and then sent

View File

@ -206,10 +206,12 @@ For normal usage you can simply pass your text to the printers ``text()``-functi
the right codepage and then send the encoded data to the printer. If this feature does not work, please try to the right codepage and then send the encoded data to the printer. If this feature does not work, please try to
isolate the error and then create an issue on the GitHub project page. isolate the error and then create an issue on the GitHub project page.
If you want or need to you can manually set the codepage. For this please use the ``charcode()``-function. You can set If you want or need to you can manually set the codepage.
any key-value that is in ``CHARCODE``. If something is wrong, an ``CharCodeError`` will be raised. For this please use the ``charcode()``-function.
After you have manually set the codepage the printer won't change it anymore. You can revert to normal behaviour You can set any key-value that is in ``CHARCODE``.
by setting charcode to ``AUTO``. If something is wrong, an ``CharCodeError`` will be raised.
After you have manually set the codepage the printer won't change it anymore.
You can revert to normal behavior by setting charcode to ``AUTO``.
Advanced Usage: Print from binary blob Advanced Usage: Print from binary blob
-------------------------------------- --------------------------------------

View File

@ -848,7 +848,7 @@ class Escpos(object):
self.text("\n" * count) self.text("\n" * count)
def block_text(self, txt, font="0", columns=None): def block_text(self, txt, font="0", columns=None):
"""Print text wrapped to specifiec columns. """Print text wrapped to specific columns.
Text has to be encoded in unicode. Text has to be encoded in unicode.

View File

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""This module contains the implementation of the CupsPrinter printer driver. """This module contains the implementation of the Network printer driver.
:author: python-escpos developers :author: python-escpos developers
:organization: `python-escpos <https://github.com/python-escpos>`_ :organization: `python-escpos <https://github.com/python-escpos>`_
@ -21,18 +21,22 @@ def is_usable() -> bool:
class Network(Escpos): class Network(Escpos):
"""Network printer. """Network printer.
This class is used to attach to a networked printer. You can also use this in order to attach to a printer that This class is used to attach to a networked printer.
You can also use this in order to attach to a printer that
is forwarded with ``socat``. is forwarded with ``socat``.
If you have a local printer on parallel port ``/dev/usb/lp0`` then you could start ``socat`` with: If you have a local printer on parallel port ``/dev/usb/lp0``
then you could start ``socat`` with:
.. code-block:: none .. code-block:: none
socat -u TCP4-LISTEN:4242,reuseaddr,fork OPEN:/dev/usb/lp0 socat -u TCP4-LISTEN:4242,reuseaddr,fork OPEN:/dev/usb/lp0
Then you should be able to attach to port ``4242`` with this class. Then you should be able to attach to port ``4242`` with this class.
Otherwise the normal usecase would be to have a printer with ethernet interface. This type of printer should Otherwise the normal use case would be to have a printer with
work the same with this class. For the address of the printer check its manuals. Ethernet interface.
This type of printer should work the same with this class.
For the address of the printer check its manuals.
inheritance: inheritance: