Hello everyone,
I'm add .pdf in data format. I have error in "Exception - Class 'dataformat_pdf\TCPDF_FONTS' not found". But TCPDF_FONTS exist in tcpdf class.
namespace dataformat_pdf;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/pdflib.php');
TCPDF_FONTS::addTTFfont('../tcpdf/fonts/arial.ttf', 'TrueTypeUnicode',32);
class writer extends \core\dataformat\base
{
/** @var $mimetype */
public $mimetype = "application/pdf";
/** @var $extension */
public $extension = ".pdf";
public function write_record($record, $rownum) {
$pdf = pdf_new();
}
Please help me!