<?php
require('fpdf/mbfpdf.php');

$pdf=new MBFPDF('P', 'mm', 'A4');
$pdf->AddMBFont(GOTHIC ,'SJIS');
$pdf->AddPage();
$pdf->SetFont(GOTHIC,'',20);

$pdf->Write(10,'色の設定');
$pdf->SetDrawColor(0, 128, 0);
$pdf->Line(20.0, 30.0, 150.0, 90.0);

$pdf->SetDrawColor(255, 0, 0);
$pdf->Rect(30.0, 30.0, 50.0, 30.0, 'D');

$pdf->SetDrawColor(0, 0, 255);
$pdf->SetFillColor(255, 218, 185);
$pdf->Rect(50.0, 50.0, 50.0, 30.0, 'DF');

$pdf->Output();
?>