MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.
authorDamyon Wiese <damyon@moodle.com>
Fri, 24 Jan 2014 05:52:53 +0000 (13:52 +0800)
committerDamyon Wiese <damyon@moodle.com>
Fri, 24 Jan 2014 08:16:38 +0000 (16:16 +0800)
commitac2b4ffc8c62aa95ad2eccc1d38832e132cb8849
treeb5e6639b7e1ebb95b762146bf0c870e75ab98ec7
parent9788e26805cdb59d77e28faaa006644f157a7e05
MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.

This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.
lib/pdflib.php
mod/assign/feedback/editpdf/classes/document_services.php
mod/assign/feedback/editpdf/classes/pdf.php