Skip to main content

Labeling

Project description

pypi actions codecov downloads

edc-label

Print labels from for clinic/edc projects

To add print servers update settings.CUPS_SERVERS:

# settings.py
...

CUPS_SERVERS = ["localhost", "prn.sample.org"]

...

If not set, the default print server is “localhost”.

Note: it is fine to just configure the local CUPS server (localhost) with remote printers as per below.

CUPS and printer Installation

Install CUPS Print Server:

sudo apt-get install cups

sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original

sudo chmod a-w /etc/cups/cupsd.conf.original

Edit /etc/cups/cupsd.conf to listen on your public IP:

sudo  nano /etc/cups/cupsd.conf

Add the last line with your public IP:

    Listen 127.0.0.1:631           # existing loopback Listen
    Listen /var/run/cups/cups.sock # existing socket Listen
--> Listen PUBLIC_IP:631      # Listen on the LAN interface, Port 631 (IPP)

Restart CUPS:

sudo systemctl restart cups.service

Add a remote printer by name to your CUPS server

LOCAL_PRINTER_NAME: printer as named on the EDC, your server

REMOTE_CUPS_IP_ADDRESS: IP of remote CUPS server

REMOTE_PRINTER_NAME: printer name installed on remote CUPS server

lpadmin -p LOCAL_PRINTER_NAME -E -v ipp://REMOTE_CUPS_IP_ADDRESS/printers/REMOTE_PRINTER_NAME

For example:

lpadmin -p ambition_clinic_label_printer -E -v ipp://154.70.150.42/printers/ambition_clinic_label_printer
lpadmin -p ambition_lab_label_printer -E -v ipp://154.70.150.42/printers/ambition_lab_label_printer
lpadmin -p specimen_reception_label_printer -E -v ipp://154.70.150.42/printers/specimen_reception_label_printer

Add an IP addressable remote printer

REMOTE_CUPS_IP_ADDRESS: printer IP installed on remote CUPS server

lpadmin -p LOCAL_PRINTER_NAME -E -v ipp://REMOTE_CUPS_IP_ADDRESS/ipp/print -m everywhere

For example:

lpadmin -p PRINTER_NAME -E -v ipp://REMOTE_IP_ADDRESS/ipp/print -m everywhere

See also http://labelary.com/viewer.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edc-label-0.3.18.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

edc_label-0.3.18-py3-none-any.whl (50.8 kB view details)

Uploaded Python 3

File details

Details for the file edc-label-0.3.18.tar.gz.

File metadata

  • Download URL: edc-label-0.3.18.tar.gz
  • Upload date:
  • Size: 44.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for edc-label-0.3.18.tar.gz
Algorithm Hash digest
SHA256 21d0df63e33a1d21df4cc95b70a819c87fd0754b9b59665e95bb96b7e34572cb
MD5 c12de0daa33c3ef3cb494be5f0c42597
BLAKE2b-256 69163c12470514dd3eeb51255f29296dc1827c4eb1b2e77363add73648a6c584

See more details on using hashes here.

File details

Details for the file edc_label-0.3.18-py3-none-any.whl.

File metadata

  • Download URL: edc_label-0.3.18-py3-none-any.whl
  • Upload date:
  • Size: 50.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for edc_label-0.3.18-py3-none-any.whl
Algorithm Hash digest
SHA256 29c8882353c2de0c28a6fefa2db3c70dbd31a07ce5619611f5d364e367697c74
MD5 8f65f2616bd7bb9e100463b04ad619fb
BLAKE2b-256 f20b1260f20a015215075db2ae165bfabcb609da85acb9c3b5731d1c0a7fca7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page