printnatura/README.md

104 lines
1.7 KiB
Markdown
Raw Normal View History

2022-11-07 10:33:26 +00:00
# PrintNatura (Print Server)
2022-11-10 18:37:46 +00:00
This project is used to print pdf, it acts as a print server.
2022-11-07 10:33:26 +00:00
## Requeriments
* Git
* Docker
## Installaton
Clone the repository
2022-11-04 13:41:36 +00:00
```
2022-12-15 14:04:36 +00:00
> git clone https://gitea.verdnatura.es/verdnatura/printnatura.git
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Build
2022-11-04 13:41:36 +00:00
```
2022-12-15 14:04:36 +00:00
> $CUPS_PASSWORD = 1234
> docker build --build-arg CUPS_PASSWORD -t printnatura .
2022-11-04 13:41:36 +00:00
```
2022-11-07 13:19:48 +00:00
Create file named "config.local.yml" and put your private configuration:
```
debug: true
db:
host: localhost
port: 3306
user: user
password: password
database: schema
salix:
url: http://localhost:3000
user: user
reconnectTimeout: 30
refreshRate: 1000
```
2022-11-07 10:33:26 +00:00
## How to use
2022-11-04 13:41:36 +00:00
2022-11-07 10:33:26 +00:00
Exec
2022-11-04 13:41:36 +00:00
```
2022-12-15 14:04:36 +00:00
> docker run --name printnatura -it --rm -v $PWD/config.local.yml:/printnatura/config.local.yml:ro -v $PWD/cupsd.conf:/etc/cups/cupsd.conf:ro -p 80:631 printnatura
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Bash
2022-11-04 13:41:36 +00:00
```
2022-12-15 14:04:36 +00:00
> docker exec -i -t printnatura bash
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Has a graphical web interface (cupsd.conf)
## Commands
### Install printer
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
$ lpadmin -p [<printer>] -E -v socket://[<ip>] -m [<driver>]
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Print document
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
$ lp [<file>] [<printer>]
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Search driver
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
$ lpinfo --make-and-model '[<printer-model>]' -m
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:37:46 +00:00
### Show intalled printers
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
$ lpstat -p
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Delete installed printer
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
$ lpadmin -x [<printer>]
2022-11-04 13:41:36 +00:00
```
2022-11-10 18:33:59 +00:00
### [More here](https://www.cups.org/doc/man-lp.html)
2022-11-07 10:33:26 +00:00
## Drivers:
### ZEBRA
Generic driver
_Example:_
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
drv:///sample.drv/zebra.ppd
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### RICOH
Each printer has its own driver
_Example:_
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
gutenprint.5.3://ricoh-mp_c2011/expert
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### GODEX
Installed by the Dockerfile (GoDEXdriver-1.1.6.tar.gz)
_Example:_
2022-11-04 13:41:36 +00:00
```
lsb/local/godex/godex-zx420i.ppd
2022-11-07 10:33:26 +00:00
```
## Build With
* [Git](https://git-scm.com/)
* [Nodejs](https://nodejs.org/)
* [Docker](https://www.docker.com/)