Hotel Card Printer

2021-10-15

As always, follow this link to see the GitHub repository.

Back in 2014...

For a period after university, I held a Night Auditor position with Accent Inns at their second property in town, Blue Ridge Inn (later Hotel Zed). The shift times weren't the greatest, running from 12-8a.m., but there was one benefit: I had hours every night to work on projects of my own creation that I thought would better the hotel experience for guests and employees.

Sometimes these projects were quick designs for maps or brochures. Sometimes they were IT tasks like syncing the computers with our Exchange server. One night, as I was wrapping up my nightly tasks, I started thinking about how much the room cards we gave guests simply sucked.

It wasn't really the cards that were the issue. It was the envelope we placed each one in to prepare it for check-in time. They were small yellow envelopes the size of the card, and every morning staff had to write —by hand— the name of the guest, their room number, and the Wi-Fi login details. Usually this task fell to me. The hotel had roughly 80 rooms, and on a Friday night in summer, it wasn't a far-fetched prospect to have to write out 80 cards. It wasn't fun for staff, and it didn't look professional for guests. Fortunately, I was looking for an opportunity to practice my Java.

The Process

I started writing a program that I had envisioned with three parts:

  1. a user interface that even the staff could use
  2. a way to comb the guest information from the management system we used
  3. a way to interact with the printer

Making a GUI was new to me. I had toyed with it before, but usually I worked off of a previously made solution and made it my own. It didn't look fantastic in the end, but it wasn't horrible, and it was reasonably clear. I slapped the company logo in there, and included two other options: a way for staff to print blanks (just Wi-Fi info) throughout the day was new walk-in guests came in and a way to print a single name.

The printer interaction wasn't as bad as I expected. I had some familiarity with printing formats already, and it was simple enough to create an array of guest information, combine that with the generic Wi-Fi info, and send that to the printer as a PDF. The hardest part was finding the correct positioning for the text so it would land properly on the tiny card envelopes.

Getting the guest information was the impossible hurdle, at least through Java. None of the data was in plain-text. The only way of getting that was using the management system to export a text file, which —although not beautifully formatted for reading— was at least somewhat parse-able. In the end, I settled on leaving the two or three clicks needed to generate this file to the end user, with instructions on how to do so in the GUI.

The result was something I was pretty happy with. I was able to pack it as a .jar file, and the computers already had a JRE, so I didn't have to convince anyone to install this for me (none of our staff had admin privileges for certain). It wasn't the prettiest solution, but it looked way better than the handwritten envelopes. This was the first real Java coding that I had done since finishing the elective courses at UVIC, and it felt like a real achievement at the time.

The single-page layout.

The Constraints

Of course, not everything is perfect.

There were a few things I didn't consider at the time. You have to convince people that using your application (learning how to use the computer) is better than doing things the way they've always done it. I think I might have been the only person to adopt it fully, which is fair, considering I had reason to use it the most.

The printer was not amazing. It certainly wasn't industrial grade. As a result, there was a hardware limit on how many envelopes you could stuff it with before it jammed up. Some babysitting was required.

I seriously regret my choice to use Comic Sans as the font. I don't know what I was thinking, but I'm going to chalk that up to youthful folly.