$this->Cell(32, 7, '�ѹ �� ��', 0, 1, 'C'); $this->SetXY(94, 235); $this->Cell(45, 7, '����Ѻ�ͧ', 0, 1, 'C'); $this->SetXY(144, 235); $this->Cell(32, 7, '�ѹ �� ��', 0, 1, 'C'); } } $m = date('m'); if (!isset($date_serve)) { $date_serve = date('d') . ' ' . $def_fullm_th[$m] . ' ' . (date('Y') + 543); } $pdf = new PDF_AutoPrint("P", 'mm', "A4"); $pdf->SetThaiFont(); // �絿�� $pdf->SetAutoPageBreak(true, 0); $pdf->SetMargins(8, 4); $pdf->AddPage(); $pdf->SetFont('THSarabun', '', 15); $max_row = 34; // �ӹǹ�ǵ��˹��˹�ҡ�д�� $y_start = 59; $line_height = 7.5; // �Ҩӹǹ����ͧ���ҧ $item_rows = count($full_items); $full_rows = ceil($item_rows / $max_row) * $max_row; $row_i = 0; $line_num = 0; // �Ѻ�ӹǹ�Ǣͧ column ������Т�� $item_i = 0; for ($i = 1; $i <= $full_rows; $i++) { ++$line_num;
); $db->update($sql, $data); $sql = "SELECT `hn`,`idcard`,`yot`,`name`,`surname`,`ptright`,`dbirth`,`no_card` 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);
//Print on a shared printer (requires at least Acrobat 6) $script = "var pp = getPrintParams();"; if ($dialog) { $script .= "pp.interactive = pp.constants.interactionLevel.full;"; } else { $script .= "pp.interactive = pp.constants.interactionLevel.automatic;"; } $script .= "pp.printerName = '\\\\\\\\" . $server . "\\\\" . $printer . "';"; $script .= "print(pp);"; $this->IncludeJS($script); } } define('FPDF_FONTPATH', '../../pdf/font/'); # creamos el nuevo objeto partiendo de la clase ampliada $MiPDF = new PDF_AutoPrint(); $MiPDF->SetMargins(20, 20, 20); # ajustamos al 100% la visualización $MiPDF->SetDisplayMode('fullpage'); // Consulta en curso. if (substr($curso, 0, 1) == '1') { $mas = ", colegio"; } $n_curso = substr($curso, 0, 1); $result0 = mysqli_query($db_con, "select distinct id_matriculas from matriculas_bach_temp, matriculas_bach where id=id_matriculas order by curso" . $mas . ", letra_grupo, apellidos, nombre"); while ($id_ar = mysqli_fetch_array($result0)) { $id = $id_ar[0]; $result = mysqli_query($db_con, "select * from matriculas_bach where id = '{$id}'"); if ($datos_ya = mysqli_fetch_object($result)) { $naci = explode("-", $datos_ya->nacimiento); $nacimiento = "{$naci['2']}-{$naci['1']}-{$naci['0']}"; $apellidos = $datos_ya->apellidos;