A system to keep track of and print employee identification cards.
Info & Cropping |
Preview |
Design |
It does not do any encoding, though adding a barcode would be simple since prawn is used to generate the badge.
https://www.rubydoc.info/github/sandal/prawn/toplevel
{cursor} = The current y drawing position relative to the innermost bounding box, or to the page margins at the top level.
Disable CUPS printer discovery by editing /etc/cups/cups-browsed.conf, setting 'BrowseRemoteProtocols none'
Deploy with capistrano. cap staging deploy
If you get a weird error from passenger about a binary ruby version, then check to make sure your database.yml and ldap.yml files are set up properly.
If Chrome says that you've disallowed access to your camera, it might be because you need to have SSL enabled for the site and it will only work under a secure connection to the server.
You may choose to run rake db:seed
to populate the sample badge designs.
It currently looks up the employee information based on the employeeId attribute, you could change this to something else in badge_controller#lookup or in the badge model's lookup_employee method if more complex query is needed.
May need to add a nowhere printer.
lpadmin -p nowhere -E -v file:/dev/null
Badger image taken from photo by James Perdue, via [CC2 license] (https://creativecommons.org/licenses/by/2.0/).