Fixed error in pdf generator script.