Skip to main content

Print XML-defined Receipts on ESC/POS Receipt Printers

Project description

XML-ESC/POS
===========

XML-ESC/POS is a simple library that allows you to
interact with ESC/POS devices with a simple utf8
encoded xml format similar to HTML. The following
example is self-explanatory:

.. code:: xml
<receipt>
<h1>Receipt!</h1>
<h2>div,span,p,ul,ol are also supported</h2>
<line>
<left>Product</left>
<right>0.15€</right>
</line>
<hr />
<line size='double-height'>
<left>TOTAL</left>
<right>0.15€</right>
</line>
<barcode encoding='ean13'>
5449000000996
</barcode>
<cashdraw />
<cut />
</receipt>

.. code:: python
from xmlescpos.printer import Usb
printer = Usb(0x04b8,0x0e03)
printer.receipt("<div>Hello World!</div>")

Limitations
-----------
The utf8 support is incomplete, mostly asian languages
are not working since they are badly documented and
only supported by region-specific hardware.

This is also the very first release, which is a simple
extraction from the Odoo code base. While it works well,
it needs some cleanup for public use.

Also, the doc is non-existent.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxmlescpos-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file pyxmlescpos-0.1.0.tar.gz.

File metadata

  • Download URL: pyxmlescpos-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyxmlescpos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e08d3cd8b467a8f26a3255dc6cac174ccc62309277c57124a6dec43d69bf57d5
MD5 b38f306a660f7646a8c95251119e33fe
BLAKE2b-256 4ab8d7899140795f8eaef76d95feac32aa28caf8ed7770d1c00012ffff0e553c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page