Fixed #7875, and changed PDF generation from jsPDF to phpPDF