Tech Blog

Print Daemon

Sometime ago our hold slip printer started printing more than what is should be. It included email headers and footers that are not supposed to be included on the print outs. We then realised that Thunderbird released an update and the plugin we used at that time for printing hold slips, is not compatible with this new build. In this regard we decided to make our own python-based solution that we can maintain and keep free from external updates.

After days of testing and wasting so much paper rolls (picture below) we have come up with the HoldSlipPrinter. At the time of posting it has been deployed for more than a week on a Windows 10 PC and its working as expected.

What does it really do? :

HoldSlipPrinter is a printer daemon/service that checks a mailbox for new emails. If the email received is a hold slip notification, the contents of the email will be sent to the printer for printing. In a nutshell what is does are :

  1. Checks for new email that matches the filter criteria i.e. subject, location, sender etc.
  2. Verify if this request has already been printed, if not send it to the printer.

In essence we want to achieve a similar effect to what this workaround will do, but without all the graphical user interface.

Advantages:

  1. There is no graphical interface i.e. Less distraction and less point of error.
  2. Configuration/settings are located in a single configuration file.
  3. Print output is smaller than my currently installed Thunderbird workaround. Finally we can save some trees!

Sample printout from (left) Thunderbird vs (right) the HoldSlipPrinter.

To install:

  1. Download, extract, and save it into a folder, mine is at C:\Program Files\HoldSlipPrinter\.
  2. Edit the HoldSlipPrinter.ini file to match the settings on your institution.
  3. On Windows Task Scheduler :
    • Create an entry to start app.exe at every startup.
    • Configure to run deletePrintedPDF.bat and restartSpooler.bat once a day.

For more detailed steps and if you’re interested at the source code please visit our github page.

Leave a Reply