require('./public/chinese/chinese-unicode.php');
$pdf=new PDF_Unicode();
$pdf->Open();
$pdf->AddUniGBhwFont('uni');
$pdf->SetFont('uni','',10);
//$pdf->SetTextColor(0,0,255);
//$pdf->Rect(10, 10, 200, 200 , char);
$pdf->SetAutoPageBreak(TRUE,0);
$arrM = array(
$_POST['trait'],
$_POST['uses'],
$_POST['explains'],
);
//var_dump($arrM);die;
for($i=0;$i<10;$i++){
$pdf->Image('d:/img/m'. $i .'.jpg', 5, 5, 200, 150);
$pdf->Write(8, $arrM[$i]);
}
$pdf->Output('m.pdf',D);
}
$pdf=new PDF_Unicode();
$pdf->Open();
$pdf->AddUniGBhwFont('uni');
$pdf->SetFont('uni','',10);
//$pdf->SetTextColor(0,0,255);
//$pdf->Rect(10, 10, 200, 200 , char);
$pdf->SetAutoPageBreak(TRUE,0);
$arrM = array(
$_POST['trait'],
$_POST['uses'],
$_POST['explains'],
);
//var_dump($arrM);die;
for($i=0;$i<10;$i++){
$pdf->Image('d:/img/m'. $i .'.jpg', 5, 5, 200, 150);
$pdf->Write(8, $arrM[$i]);
}
$pdf->Output('m.pdf',D);
}
參數
file 图像文件名称
x 左上角的横坐标(x)
y 左上角的纵坐标(y)
w 在页面上图像的宽度。如果没有定义或定义为0,它会自动计算。
h 在页面上图像的高度。如果没有定义或定义为0,它会自动计算。
type 图像格式。格式值为:JPG、JPEG、PNG。如果没有定义图像格式,会由图像文件名称后面的扩展名来推论出图像的格式。
link URL 或 identifier 由 AddLink() 处理。
不是有 AddPage 方法吗?
$pdt->AddPade($pdf->CurOrientation);