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
d957ebd5
Commit
d957ebd5
authored
Jan 24, 2020
by
Benjamin Rokseth
Browse files
Update documentation on setup
parent
bee6faf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d957ebd5
...
...
@@ -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
...
...
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