Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
kohaprinter
Commits
2df56e7f
Commit
2df56e7f
authored
Jan 17, 2020
by
Benjamin Rokseth
Browse files
Update documentation
parent
49d3d38b
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
2df56e7f
...
...
@@ -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
https://github.com/wkhtmltopdf/wkhtmltopdf/releases
*
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment