Commit 2df56e7f authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

Update documentation

parent 49d3d38b
......@@ -10,11 +10,9 @@ Requirements
To build backend: golang
* wkhtmltopdf (webkit html to pdf renderer) for rastering html
must be placed in /usr/bin on the cups server
* 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
......@@ -22,6 +20,13 @@ To build backend: golang
Setup and Testing
## 0. Athena document conversion service
You'd be best off with docker:
docker run -p 8089:8080 --rm -d arachnysdocker/athenapdf-service
## 1. In Cups, a Raw Print Queue must be set up to point to backend.
......@@ -34,7 +39,7 @@ lpadmin -p KohaKvittPrinter -v kohaprinter:/ -m raw -E
This means any job sent to this Queue on this Cups server will be passed along to the `kohaprinter` backend
with the kohaprinter:/ Device URI.
with the kohaprinter:/ Device URI. (in short, looking for the executable file /usr/lib/cups/backend/kohaprinter)
If the Cups server was running on host, say, `cupsserver`, the queue would now be accessible as normal by Cups, e.g.
......@@ -95,5 +100,5 @@ What happens is that :
* html document is sent raw to the Remote Print Queue KohaKvittPrinter
* it is delegated to the kohaprinter backend which :
* fetches originating IP and DeviceURI from request
* rasters the html document to PDF with Webkit
* POSTS the html document as file in multipart form to running HTML->PDF service athenapdf at localhost:8089
* forwards generated PDF to Print Queue of Thermal Printer or Label Printer found in json mapping
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