From 0f33d68f3ab00b80838f433b12382ac7602a6387 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 27 Mar 2017 15:30:14 +0200 Subject: [PATCH] add doc for ESCPOS_CAPABILITIES_FILE --- doc/user/usage.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/user/usage.rst b/doc/user/usage.rst index 4ef0439..6d4e462 100644 --- a/doc/user/usage.rst +++ b/doc/user/usage.rst @@ -216,6 +216,32 @@ Here you can download an example, that will print a set of common barcodes: * :download:`barcode.bin ` by `@mike42 `_ +Advanced Usage: change capabilities-profile +------------------------------------------- + +Packaged together with the escpos-code is a capabilities-file. This file in +JSON-format describes the capabilities of different printers. It is developed and hosted in +`escpos-printer-db `_. + +Certain applications like the usage of `cx_freeze `_ might change the +packaging structure. This leads to the capabilities-profile not being found. +In this case you can use the environment-variable `ESCPOS_CAPABILITIES_FILE`. +The following code is an example. + +.. code-block:: shell + + # use packaged capabilities-profile + python-escpos cut + + # use capabilities-profile that you have put in /usr/python-escpos + export ESCPOS_CAPABILITIES_FILE=/usr/python-escpos/capabilities.json + python-escpos cut + + # use packaged file again + unset ESCPOS_CAPABILITIES_FILE + python-escpos cut + + Hint: preprocess printing -------------------------