Changed pdfgenerator.php as per utils.php