コード例 #1
0
/**
 * Creates rectangles for line border for A4 size paper.
 *
 * @deprecated since iomadcertificate version 2012052501
 * @param stdClass $pdf
 * @param stdClass $iomadcertificate
 * @return null
 */
function draw_frame($pdf, $iomadcertificate)
{
    debugging('draw_frame is deprecated, please use iomadcertificate_draw_frame instead', DEBUG_DEVELOPER);
    iomadcertificate_draw_frame($pdf, $iomadcertificate);
}
コード例 #2
0
    $sigy = 230;
    $custx = 30;
    $custy = 230;
    $wmarkx = 26;
    $wmarky = 58;
    $wmarkw = 158;
    $wmarkh = 170;
    $brdrx = 0;
    $brdry = 0;
    $brdrw = 210;
    $brdrh = 297;
    $codey = 250;
}
// Add images and lines
iomadcertificate_print_image($pdf, $iomadcertificate, CERT_IMAGE_BORDER, $brdrx, $brdry, $brdrw, $brdrh);
iomadcertificate_draw_frame($pdf, $iomadcertificate);
// Set alpha to semi-transparency
$pdf->SetAlpha(0.2);
iomadcertificate_print_image($pdf, $iomadcertificate, CERT_IMAGE_WATERMARK, $wmarkx, $wmarky, $wmarkw, $wmarkh);
$pdf->SetAlpha(1);
iomadcertificate_print_image($pdf, $iomadcertificate, CERT_IMAGE_SEAL, $sealx, $sealy, '', '');
iomadcertificate_print_image($pdf, $iomadcertificate, CERT_IMAGE_SIGNATURE, $sigx, $sigy, '', '');
// Add text
$pdf->SetTextColor(0, 0, 120);
iomadcertificate_print_text($pdf, $x, $y, 'C', 'freesans', '', 30, get_string('title', 'iomadcertificate'));
$pdf->SetTextColor(0, 0, 0);
iomadcertificate_print_text($pdf, $x, $y + 20, 'C', 'freeserif', '', 20, get_string('certify', 'iomadcertificate'));
iomadcertificate_print_text($pdf, $x, $y + 36, 'C', 'freesans', '', 30, fullname($certuser));
iomadcertificate_print_text($pdf, $x, $y + 55, 'C', 'freesans', '', 20, get_string('statement', 'iomadcertificate'));
iomadcertificate_print_text($pdf, $x, $y + 72, 'C', 'freesans', '', 20, $course->fullname);
iomadcertificate_print_text($pdf, $x, $y + 92, 'C', 'freesans', '', 14, iomadcertificate_get_date($iomadcertificate, $certrecord, $course, $certuser->id));