Clarifiy and update usage.rst
relevant to #230 clarifies the config-file in the usage.rst
This commit is contained in:
parent
7c17141fb2
commit
4882c31531
|
@ -1,6 +1,7 @@
|
|||
*****
|
||||
Usage
|
||||
*****
|
||||
:Last Reviewed: 2017-06-10
|
||||
|
||||
Define your printer
|
||||
-------------------
|
||||
|
@ -157,10 +158,12 @@ The printer section
|
|||
|
||||
The ``printer`` configuration section defines a default printer to create.
|
||||
|
||||
The only required paramter is ``type``. The value of this should be one of the
|
||||
The only required paramter is ``type``. The value of this has to be one of the
|
||||
printers defined in :doc:`/user/printers`.
|
||||
|
||||
The rest of the parameters are whatever you want to pass to the printer.
|
||||
The rest of the given parameters will be passed on to the initialization of the printer class.
|
||||
Use these to overwrite the default values as specified in :doc:`/user/printers`.
|
||||
This implies that the parameters have to match the parameter-names of the respective printer class.
|
||||
|
||||
An example file printer::
|
||||
|
||||
|
@ -171,10 +174,19 @@ An example file printer::
|
|||
And for a network printer::
|
||||
|
||||
printer:
|
||||
type: network
|
||||
type: Network
|
||||
host: 127.0.0.1
|
||||
port: 9000
|
||||
|
||||
An USB-printer could be defined by::
|
||||
|
||||
printer:
|
||||
type: Usb
|
||||
idVendor: 0x1234
|
||||
idProduct: 0x5678
|
||||
in_ep: 0x66
|
||||
out_ep: 0x01
|
||||
|
||||
Printing text right
|
||||
-------------------
|
||||
Python-escpos is designed to accept unicode. So make sure that you use ``u'strings'`` or import ``unicode_literals``
|
||||
|
|
Loading…
Reference in New Issue