function makenewpdf($base){
$GLOBALS['EUC2SJIS'] = true;
$pdf=& new MBfpdi('P','mm','A4');
$pagecount = $pdf->setSourceFile("./base/".$base);
$tplidx = $pdf->ImportPage(1);
$pdf->addPage();
$s = $pdf->useTemplate($tplidx,0,0,241,321);
$pdf->SetY(10);
$pdf->AddMBFont(KOZGO ,'SJIS');
$style="";
$pdf->SetTextColor(255, 255, 255);
$font_size="6";
$pdf->SetFont(KOZGO,$style,$font_size) ;
return $pdf;
}
function set_str($pdf,$x,$y,$myStr){
//$pdf->SetXY($x,$y);
$pdf->Text($x,$y, $myStr);
//$pdf->MultiCell(115, 2, $myStr,0,"J");
return $pdf;
}
function savepdf($pdf,$filename){
$pdf->Output($filename,"F");
}
function put_picture($pdf,$imageFile,$x,$y,$targetW,$targetH){
//print $imageFile;
if($imageFile == "./formatdata/"){return $pdf;}
if($imageFile == "./formatdata_tan/"){return $pdf;}
if($imageFile == "./formatdata_drink/"){return $pdf;}
if(! file_exists($imageFile)){$imageFile = "./formatdata/err.jpg";}
$pdf->Image($imageFile,$x,$y,$targetW,$targetH,'JPEG','');
return $pdf;
}
こんな感じで使います
トラックバック(0)
トラックバックURL: http://www.adg7.com/mt/mt-tb.cgi/220
コメントする