Alternative to Cloud Printing

Cloud Printing and Remote printing provide the flexibility to print from anywhere to a specific printer. These solutions are being offered by HP ePrint when you buy an ePrint enabled printer.

HP ePrint allows you to send mail to your printer.However, sometimes the print takes long time to deliver, in some instances more than 5 minutes.But we don’t have any control over the job.

We have created an alternative solution that can function similar to the Cloud Printing. Of course, there are multiple components for this to work, but this is an alternative where you have full control over the print job.

Once the basic functionality is working, you can add further code to send an eMail to the requestor etc.

What we need:

  1. Raspberry Pi
  2. Thunderbird mail client
  3. CUPS Print server installed in Raspberry Pi
  4. Shell script to print files automatically

Approach

  1. Printer Setup
    1. Install CUPS software in Raspberry Pi
    2. Setup a default printer
    3. Connect printer to Raspberry Pi (preferably wired connection )
  2. Thunderbird Setup
    1. Install Thunderbird
    2. Install FiltaQuilla add-on for Thunderbird
    3. Install PrintingToolsNG add-on for Thunderbird
    4. Create an eMail account for your printer (any eMail account dedicated to receive the print jobs)
    5. Create a new folder to save attachments (ex: /home/pi/files_to_print_folder)
    6. Configure Thunderbird in Raspberry Pi to receive eMails form the account created in step 4
    7. Create a rule to save attachments in the folder created in step 5
  3. Shell Script and other Linux commands
    1. Set inotify event on that folder to print any new file created in the folder
    2. Make Thunderbird start on boot

Steps:

  1. Install CUPS, add a new Printer. For more details click here
  2. Install Thunderbird mail client using Add, Remove Software option from Raspberry Pi Desktop. For more details click here
  3. Install FiltaQuilla. For more details click here
  4. Create a rule to save attachments to a folder
    1. Create a rule in Thunderbird to save eMail attachments. For more details click here
    2. From Thunderbird (Tools-> Message Filters—>New Rule—>



    3. Check "Manually Run" tick box
    4. Check "Getting New eMail" tick box and select "Filter after Junk Classification" in the dropdown
    5. Select "Attachment status", "Is" and "Has" attachments in the dropdown as shown in the above picture
    6. In Perform These actions section, select "Save Attachments to" : enter folder you create in step 5 of approch section
  5. Crete Shell Script (ex. autoprint.sh)
  6. ## Print Files
    ##
    inotifywait -m /your_path/folder -e create -e moved_to |
    while read dir action file; do
      sleep 10 ## this is needed
      lp /your_path/folder/$file
    done

  7. Autostart Thunderbird on boot
  8. Add the following lines to /etc/xdg/lxsession/LXDE-pi/autostart file.

      Thunderbird
      sh /your_path/your_shell_script.sh


Please send mail to info@zenindo.co.in for more details