I have been searching for examples the last couple of days and have been trying to do it myself, but I'm stuck at the following.
I'm using Magento 1.7.0.2. I want to add the invoice PDF as an attachment to the transactional email when generating the invoice.
I have tried several things including changing /Mage/Sales/Model/Order/Invoice.php, /Mage/Core/Model/Email/Template.php and /Mage/Core/Model/Email/Template/Mailer.php.
I know which files are involved in the process, I know where to add the attachment, I just can't figure out how to actually generate the PDF and attach it to the email.
It also seems that the way emails are generated has been changed with magento 1.7.0.0 and all explanations are for 1.6.x
I'm also aware that there are several extentions (i.e. FOOMAN's), but I prefer to change the files myself (I want to keep my installation clean of extentions as much as possible).