Modification to allow use with Multi Site Manager

I've added a base parameter and adjusted some code to allow generation of PDFs that are hosted under a different domain (but on same server) as is the case with Multi Site Manager sites.