44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
|
//生成西部数据中心离线申请表
|
|
require_once('fpdf/chinese-unicode.php');
|
|
require_once('fpdi/fpdi.php');
|
|
class ApplicantWaterPDF extends FPDI
|
|
{
|
|
public $template;//模板文件的路径
|
|
public $data;//包含具体的数据,数组
|
|
public $fontsize=10;
|
|
function drawWestdc()
|
|
{
|
|
$pagecount = $this->setSourceFile($this->template);
|
|
$tplidx = $this->importPage(1, '/MediaBox');
|
|
$this->addPage();
|
|
$this->useTemplate($tplidx);
|
|
$tplidx = $this->importPage(2, '/MediaBox');
|
|
$this->addPage();
|
|
$this->useTemplate($tplidx);
|
|
$this->AddUniGBhwFont('ugb','AdobeSongStd-Light-Acro');
|
|
$this->SetFont('ugb','',$this->fontsize);
|
|
$this->SetXY(34,30);
|
|
$this->MultiCell (152, 5, str_replace(";","\n",$this->data['datalist']));
|
|
$this->setXY(34,100);
|
|
$this->MultiCell(152,4,trim($this->data['project']));
|
|
$this->setXY(36,252);
|
|
$this->Write($this->fontsize,$this->data['unit']);
|
|
$this->setXY(106,252);
|
|
$this->Write($this->fontsize,$this->data['address']);
|
|
$this->setXY(38,260);
|
|
$this->Write($this->fontsize,$this->data['email']);
|
|
$this->setXY(106,260);
|
|
$this->Write($this->fontsize,$this->data['phone']);
|
|
$this->setXY(159,260);
|
|
$this->Write($this->fontsize,$this->data['postcode']);
|
|
$t=getdate();
|
|
$this->setXY(152,190);
|
|
$this->Write($this->fontsize,$t['year']);
|
|
$this->setXY(165,190);
|
|
$this->Write($this->fontsize,$t['mon']);
|
|
$this->setXY(176,190);
|
|
$this->Write($this->fontsize,$t['mday']);
|
|
}
|
|
}
|
|
?>
|