45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
|
<?php
|
||
|
//生成西部数据中心离线申请表
|
||
|
require_once('fpdf/chinese-unicode.php');
|
||
|
require_once('fpdi/fpdi.php');
|
||
|
class ApplicantPDF 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);
|
||
|
$this->AddUniGBhwFont('ugb','AdobeSongStd-Light-Acro');
|
||
|
$this->SetFont('ugb','',$this->fontsize);
|
||
|
$this->setXY(45,65);
|
||
|
$this->Write($this->fontsize,$this->data['realname']);
|
||
|
$this->SetXY(34,80);
|
||
|
$this->MultiCell (0, 4, str_replace(";","\n",$this->data['datalist']));
|
||
|
$this->setXY(34,121);
|
||
|
$this->Write($this->fontsize,trim($this->data['project']));
|
||
|
$this->setXY(34,245);
|
||
|
$this->Write($this->fontsize,$this->data['realname']);
|
||
|
$this->setXY(34,252);
|
||
|
$this->Write($this->fontsize,$this->data['unit']);
|
||
|
$this->setXY(100,252);
|
||
|
$this->Write($this->fontsize,$this->data['address']);
|
||
|
$this->setXY(164,252);
|
||
|
$this->Write($this->fontsize,$this->data['postcode']);
|
||
|
$this->setXY(34,259);
|
||
|
$this->Write($this->fontsize,$this->data['email']);
|
||
|
$this->setXY(100,259);
|
||
|
$this->Write($this->fontsize,$this->data['phone']);
|
||
|
$t=getdate();
|
||
|
$this->setXY(163,259);
|
||
|
$this->Write($this->fontsize,$t['year']);
|
||
|
$this->setXY(176,259);
|
||
|
$this->Write($this->fontsize,$t['mon']);
|
||
|
$this->setXY(185,259);
|
||
|
$this->Write($this->fontsize,$t['mday']);
|
||
|
}
|
||
|
}
|
||
|
?>
|