Print to Email (print2email) in Ubuntu

I plan to write up here how I was able to pull together some nice pieces to create a printer in Ubuntu (actually, should work on most if not all Linux distributions) which you can print anything to and have it emailed. A pop-up window comes up and allows you to select from a pre-define set of email addresses or type in another recipient. What is printed is then emailed with a PDF attachment of the contents.

I found I was just tired of printing to PDF (PDF-CUPS), then having to go to my email client, attach the file and send it out. I was hoping to find a browser plug-in as this is what I most often want to print from, but was surprised there wasn’t one or at least I didn’t see one that was what I wanted. Anyway, having this solution independent of the browser allows any application to be the source of what you want to print from.

Here is an example of this page if it was printed and emailed to you as a PDF:

TEST_DOCUMENT