|
@@ -24,5 +24,42 @@ class Goods extends Core
|
|
|
return $this->data;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ public function pdf()
|
|
|
+ {
|
|
|
+ Dever::apply('fpdf184/chinese', 'pdf');
|
|
|
+
|
|
|
+ $pdf=new \PDF_Chinese();
|
|
|
+
|
|
|
+ $pdf->AddGBFont('simsun','宋体');
|
|
|
+
|
|
|
+ $pdf->AddGBFont('simhei','黑体');
|
|
|
+
|
|
|
+ $pdf->AddGBFont('simkai','楷体_GB2312');
|
|
|
+
|
|
|
+ $pdf->AddGBFont('sinfang','仿宋_GB2312');
|
|
|
+
|
|
|
+ $pdf->Open();
|
|
|
+
|
|
|
+ $pdf->AddPage();
|
|
|
+
|
|
|
+ $pdf->SetFont('simsun','',20);
|
|
|
+
|
|
|
+ $pdf->Write(10,'简体中文汉字');
|
|
|
+
|
|
|
+ $pdf->SetFont('simhei','',20);
|
|
|
+
|
|
|
+ $pdf->Write(10,'简体中文汉字');
|
|
|
+
|
|
|
+ $pdf->SetFont('simkai','',20);
|
|
|
+
|
|
|
+ $pdf->Write(10,'简体中文汉字');
|
|
|
+
|
|
|
+ $pdf->Write(10,'简体中文汉字');
|
|
|
+
|
|
|
+ $pdf->Output();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|