I upgraded my suitecrm from 7.9.4 to 7.10.7. After upgradation pdf generation stoped working from invoice and quote modules.Today I installed fresh suitecrm latest 7.10.7 instance and same thing is happening i.e., pdf generation is not working.
Buttons are there and working fine but pdf generation action was not completing and some html error was coming at the end.
I have fixed it now. I removed new lines added in generatePDF.php file and now it is working.
I removed these three commented lines from E:\wamp64\www\SuiteERP1\modules\AOS_PDF_Templates/generatePdf.php and it is working fine now.
if (!isset($_REQUEST['uid']) || empty($_REQUEST['uid']) || !isset($_REQUEST['templateID']) || empty($_REQUEST['templateID'])) {
die('Error retrieving record. This record may be deleted or you may not be authorized to view it.');
}
// $state = new \SuiteCRM\StateSaver();
// $state->pushErrorLevel();
error_reporting(0);
require_once('modules/AOS_PDF_Templates/PDF_Lib/mpdf.php');
require_once('modules/AOS_PDF_Templates/templateParser.php');
require_once('modules/AOS_PDF_Templates/sendEmail.php');
require_once('modules/AOS_PDF_Templates/AOS_PDF_Templates.php');
// $state->popErrorLevel();
global $mod_strings, $sugar_config;