Пример #1
0
	FROM  `opcard` 
	WHERE  `hn` LIKE  :hn_patient ";
	$data = array(':hn_patient' => $cHn);
	$db->select($sql, $data);
	$item = $db->get_item();


	$pdf = new PDF_AutoPrint("P",'mm', "A4");
	$pdf->SetThaiFont(); // à«çµ¿Í¹µì
	$pdf->SetAutoPageBreak(false, 0);
	$pdf->SetMargins(0, 0);
	$pdf->SetTopMargin(2);
	$pdf->AddPage();
	$pdf->SetFont('THSarabun'); // àÃÕ¡ãªé§Ò¹¿Í¹µì·ÕèàµÃÕÂÁäÇé

	$pdf->SetFontSize(17);

	$pdf->SetXY(185, 7);
	$pdf->Cell(10, 6, $item['no_card'],0,1);

	$pdf->SetXY(45, 19);
	$pdf->Cell(40, 6, $item['hn'],0,1);

	$pdf->SetXY(110, 19);
	$pdf->Cell(100, 6, $item['yot'].' '.$item['name'].' '.$item['surname'],0,1);

	$pdf->SetXY(45, 27);
	$pdf->Cell(0, 6, "Ç/´/» à¡Ô´: ".$item['dbirth']." ID: ".$item['idcard']." ÊÔ·¸Ô: ".$item['ptright'],0,1);

	$pdf->AutoPrint(true);
	$pdf->Output();
Пример #2
0
$row_id = trim($_GET['row_id']);
$sql = "SELECT * FROM  `booking`  WHERE  `row_id` ='" . $row_id . "' ";
$query = mysql_query($sql);
$dbarr = mysql_fetch_array($query);
$age = calcage($dbarr['bdate']);
// header('Content-type: application/pdf');
$pdf = new PDF_AutoPrint("P", 'mm', "A4");
$pdf->SetThaiFont();
// �絿͹��
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(0, 0);
$pdf->SetTopMargin(2);
$pdf->AddPage();
$pdf->SetFont('THSarabun');
// ���¡��ҹ�͹������������
$pdf->SetFontSize(17);
$pdf->Cell(0, 4, "�ͧ/Ἱ�/��ǹ �ٹ��������  �͡��������Ţ FR-IPC-001/3  ��䢤��駷�� 00  �ѹ����ռźѧ�Ѻ�� 28 �.�.44", 0, 1, "C");
$pdf->SetFontSize(30);
$pdf->Cell(0, 10, "㺨ͧ��§", 0, 1, "C");
$pdf->SetFontSize(23);
$pdf->Cell(0, 8, "�ç��Һ�Ť�������ѡ�������� �.���ͧ �.�ӻҧ", 0, 1, "C");
$pdf->SetXY(0, 26);
$pdf->Cell(30, 6, "����-ʡ��", 0, 1);
$pdf->SetXY(30, 26);
$pdf->Cell(60, 6, $dbarr['ptname'], 0, 1);
$pdf->SetXY(90, 26);
$pdf->Cell(40, 6, "����", 0, 1);
$pdf->SetXY(130, 26);
$pdf->Cell(80, 6, $age, 0, 1);
$pdf->SetXY(0, 34);
$pdf->Cell(30, 6, "HN", 0, 1);