예제 #1
0
    {
        return $this->fontlist;
    }
    public function _getfontpath()
    {
        return parent::_getfontpath();
    }
}
if ($getpdf) {
    $doc = new testable_pdf();
    $doc->SetTitle('Moodle PDF library test');
    $doc->SetAuthor('Moodle ' . $CFG->release);
    $doc->SetCreator('admin/tool/unittest/pdflibtestpage.php');
    $doc->SetKeywords('Moodle, PDF');
    $doc->SetSubject('This has been generated by Moodle as its PDF library test page');
    $doc->SetMargins(15, 30);
    $doc->setPrintHeader(true);
    $doc->setHeaderMargin(10);
    $doc->setHeaderFont(array($fontfamily, 'b', 10));
    $doc->setHeaderData('pix/moodlelogo-med-white.gif', 40, $SITE->fullname, $CFG->wwwroot);
    $doc->setPrintFooter(true);
    $doc->setFooterMargin(10);
    $doc->setFooterFont(array($fontfamily, '', 8));
    $doc->AddPage();
    $doc->SetTextColor(255, 255, 255);
    $doc->SetFillColor(255, 203, 68);
    $doc->SetFont($fontfamily, 'B', 24);
    $doc->Cell(0, 0, 'Moodle PDF library test', 0, 1, 'C', 1);
    $doc->SetFont($fontfamily, '', 12);
    $doc->Ln(6);
    $doc->SetTextColor(0, 0, 0);