Commit d957ebd5 authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

Update documentation on setup

parent bee6faf9
......@@ -5,24 +5,40 @@ A Cups Backend and printer delegator for use in Koha Intra and other services at
Purpose is to generate a simple connection between browser and thermal printers connected
in local network, so that you can print any HTML slip or label to a printer in the network.
Requirements
Requirements: Docker
Setup and Testing
==
To build backend: golang
You'd be best off with docker and docker-compose:
* compiled backend (kohaprinter) must be placed in /usr/lib/cups/backend/ on the cups server
* a json mapping file (see example) must be placed in same directory as backend and named kohaprinter_mapping.json
* a running athena pdf service must be found at localhost:8089
* print job needs two extra options passed for mapping to function: koha-printer-type and koha-origin-ip
* Cups is strict on permissions, so make sure backend is owned by root and chmod 0755
* also beware that backend is run by user `lp` so main log turns up in /tmp/kohaprinter.log and
spool logs and output in /var/spool/cups/
Configuration files should be placed in `config` and will be mounted in from host, so they can be edited
and migrated easily outside Docker.
Setup and Testing
config/printers.conf : the printers and queues setup
config/ppd/*.ppd : the individual printer ppd containing printer settings
config/kohaprinter_mapping.json : the koha printer mapping to the network attached printers, client ip mapped against label and receipt printer
migrating to another environment is as easy as copying these over
Building and starting:
docker-compose up -d
Adding a new printer
==
## 0. Athena document conversion service
You'd be best off with docker:
The Cups admin service is exposed on port :631 on localhost, so you can add/remove printers and manage queue there
From cli, to add a printer: ./tools/add-kvitt-printer <printqueue> <ip> <location>
The components
==
## Athena document conversion service
A document conversion service that can take many inputs and convert on the fly. We use it for HTML -> PDF
```
docker run -p 8089:8080 --rm -d arachnysdocker/athenapdf-service
......@@ -95,6 +111,16 @@ lp -d ipp://cupsserver/printers/KohaKvittPrinter -o document-format=text/html -o
Behind the scenes
==
Info on kohaprinter backend: golang
* compiled backend (kohaprinter) must be placed in /usr/lib/cups/backend/ on the cups server
* a json mapping file (see example) must be placed in same directory as backend and named kohaprinter_mapping.json
* a running athena pdf service must be found at localhost:8089
* print job needs two extra options passed for mapping to function: koha-printer-type and koha-origin-ip
* Cups is strict on permissions, so make sure backend is owned by root and chmod 0755
* also beware that backend is run by user `lp` so main log turns up in /tmp/kohaprinter.log and
spool logs and output in /var/spool/cups/
What happens is that :
* html document is sent raw to the Remote Print Queue KohaKvittPrinter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment