BTW, "sudo chmod 777 /usr/lib/cups/backend/cups-pdf" is VERY VERY VERY VERY wrong! Please don't change permissions on those backends if you don't know for sure what that does. First you have a world-writable file in your system now which anyone can tamper with to create a local root exploit, and second this causes cups-pdf to not run as root any more. It needs to be root in order to function at all. Please change it back to 700.
BTW, "sudo chmod 777 /usr/lib/ cups/backend/ cups-pdf" is VERY VERY VERY VERY wrong! Please don't change permissions on those backends if you don't know for sure what that does. First you have a world-writable file in your system now which anyone can tamper with to create a local root exploit, and second this causes cups-pdf to not run as root any more. It needs to be root in order to function at all. Please change it back to 700.