Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@yelizariev
Last active November 13, 2018 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yelizariev/abd4ada6e4a249e6619e4ef5e74ea8b7 to your computer and use it in GitHub Desktop.
Save yelizariev/abd4ada6e4a249e6619e4ef5e74ea8b7 to your computer and use it in GitHub Desktop.
How-to print pdf on a ticket printer.

Instruction provided by @invitu

1- Install Cups on the posbox:

  • The posbox is a read-only system, you have to chroot it to install cups
  • Run a posbox on a raspberry-pi and plug a pen drive containing another posbox image
  • chroot the posbox in the pen drive
  • install cups with apt-get
  • plug the epson on the posbox
  • setup a Raw queue using usb://EPSON/TM-T20II in cups and share it (remove the "?serial=xxxxxxx" part if you want to use the image with another printer
  • there is no driver for epson printer for raspbian, that's the reason we must use raw queue

2- Install the printer driver on a Windows PC (or Macos) and use the raw queue (http://ipaddress:631/printers/EPSON_TM-T20II)

3- Fixing IP address on the posbox If you don't want to fix the ip address on the dhcp server, you can fix the IP address by modifying /etc/dhcpcd.conf in chrooted posbox :

# example :
Custom static IP address for eth0.
interface eth0
static ip_address=192.168.0.190/24
static routers=192.168.0.254
static domain_name_servers=172.22.232.1 172.22.233.2

Note that if you use a PC (check pywebdriver from Akretion) instead of a posbox, you could use cups with Epson driver installed on the PC... We did not test that solution but it should work

@ahmadsanny
Copy link

Hi! I wonder how to chroot the posbox? I searched many pages but I can't find a way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment