本文整理汇总了PHP中Pdf::SetPrintFooter方法的典型用法代码示例。如果您正苦于以下问题:PHP Pdf::SetPrintFooter方法的具体用法?PHP Pdf::SetPrintFooter怎么用?PHP Pdf::SetPrintFooter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pdf
的用法示例。
在下文中一共展示了Pdf::SetPrintFooter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ubet
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function ubet()
{
$this->load->library('pdf');
$pdf = new Pdf('L', 'mm', 'A4', true, 'UTF-8', false);
//$pdf->setPrintHeader(false);
//$pdf->setPrintFooter(false);
$pdf->SetPrintFooter(false);
//$pdf->SetAutoPageBreak(true, 9);
$pdf->SetFont('dejavusans', '', 10);
//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 127);
//$pdf->SetFont('helvetica', 'B', 12);
//$pdf->getPageDimensions();
//$hasBorder = false; //flag for fringe case
$sql = "select customerName,contactLastName,contactFirstName from customers";
$sqlq = $this->db->query($sql);
$sqla = $sqlq->result_array();
//print_r($sqla); //exit();
$page = 0;
foreach ($sqla as $row) {
$maxnocells = 0;
$cellcount = 0;
//write text first
$startX = $pdf->GetX();
$startY = $pdf->GetY();
//draw cells and record maximum cellcount
//cell height is 6 and width is 80
$cellcount = $pdf->MultiCell(30, 6, $row['customerName'], 0, 'L', 0, 0);
if ($cellcount > $maxnocells) {
$maxnocells = $cellcount;
}
$cellcount = $pdf->MultiCell(80, 6, $row['contactLastName'], 0, 'L', 0, 0);
if ($cellcount > $maxnocells) {
$maxnocells = $cellcount;
}
$cellcount = $pdf->MultiCell(80, 6, $row['contactFirstName'], 0, 'L', 0, 0);
if ($cellcount > $maxnocells) {
$maxnocells = $cellcount;
}
$page++;
$pdf->SetXY($startX, $startY);
//if($page>20){
//$pdf->AddPage();
//$page=0;
//}
//now do borders and fill
//cell height is 6 times the max number of cells
$pdf->MultiCell(30, $maxnocells * 6, '', 1, 'L', 0, 0);
$pdf->MultiCell(80, $maxnocells * 6, '', 1, 'L', 0, 0);
$pdf->MultiCell(80, $maxnocells * 6, '', 1, 'L', 0, 0);
$pdf->Ln();
}
//$pdf->Cell(240,0,'','T'); //last bottom border
$pdf->Output('example_005.pdf', 'I');
}
示例2: MatricRollNoGroupwise
public function MatricRollNoGroupwise()
{
// DebugBreak() ;
$this->load->helper('url');
//Load the library
$this->load->library('html2pdf');
$grp_cd = $this->uri->segment(3);
$sess = 1;
$class = 10;
$year = 2016;
$this->load->library('session');
$Logged_In_Array = $this->session->all_userdata();
$user = $Logged_In_Array['logged_in'];
//DebugBreak();
$this->load->library('Pdf');
$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setHeaderData('', 0, '', '', array(0, 0, 0), array(255, 255, 255));
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->SetTitle('Matric Roll Number Slip');
$pdf->SetHeaderMargin(1);
$pdf->SetTopMargin(1);
$pdf->setFooterMargin(1);
$pdf->SetFont('helvetica', '', 8);
$pdf->SetAutoPageBreak(TRUE, 0);
$pdf->SetAuthor('BiseGrw');
$pdf->SetMargins(4, 1, 4, true);
$Inst_Id = $user['Inst_Id'];
$this->load->model('RollNoSlip_model');
// DebugBreak();
$studeninfo = array('data' => $this->RollNoSlip_model->get10thrslipWith_Grp_CD($class, $year, $sess, $grp_cd, $Inst_Id));
$template_pdf = '';
$totalslips = count($studeninfo['data']['slip']);
$studentslip = array();
//DebugBreak();
for ($i = 0; $i < count($studeninfo['data']['info']); $i++) {
$pdf->AddPage();
$rno = $studeninfo['data']['info'][$i]['Rno'];
$temp = "{$rno}@{$class}@{$sess}@{$year}@{$Inst_Id}";
$image = $this->set_barcode($temp);
$studeninfo['data']['info'][$i]['barcode'] = $image;
for ($j = 0; $j < $totalslips; $j++) {
if ($rno == $studeninfo['data']['slip'][$j]['rno']) {
$studeninfo['data']['info'][$i]['slips'][] = $studeninfo['data']['slip'][$j];
}
}
// DebugBreak();
$html = $this->load->view('RollNoSlip/MatricRollNoCombine', $studeninfo['data']['info'][$i], true);
$pdf->writeHTML($html, true, false, true, false, '');
if ($i == 0) {
break;
}
}
$pdf->Output('pdfexample.pdf', 'I');
//$this->html2pdf->html($this->load->view('RollNoSlip/MatricRollNoCombine', $studeninfo['data'], true));
// $this->html2pdf->html($template_pdf);
/* if($this->html2pdf->create('downlaod')) {
if($class == 10)
redirect('RollNoSlip/TenthStd');
else if($class == 9)
redirect('RollNoSlip/NinthStd');
} */
}
示例3: cetak_rujukan
public function cetak_rujukan()
{
$kd_trans_pelayanan = $this->uri->segment(3);
$q = "SELECT kd_status_pasien, tempat_rujukan FROM pelayanan WHERE kd_trans_pelayanan='{$kd_trans_pelayanan}'";
$kueri = $this->m_crud->manualQuery($q);
$hasil = $kueri->row_array();
if ($hasil['kd_status_pasien'] != 'SKP-4' and $hasil['tempat_rujukan'] == '') {
echo "Pasien tidak dirujuk ke luar puskesmas";
} elseif ($hasil['kd_status_pasien'] == 'SKP-4' and $hasil['tempat_rujukan'] == '') {
echo "Tempat rujukan belum diisi oleh dokter";
} elseif ($hasil['kd_status_pasien'] == 'SKP-4' and $hasil['tempat_rujukan'] != '' or $hasil['kd_status_pasien'] != 'SKP-4' and $hasil['tempat_rujukan'] != '') {
$this->load->library('Pdf');
$pdf = new Pdf('P', 'mm', 'F4', true, 'UTF-8', false);
// $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetPageOrientation('P');
$pdf->SetAuthor('Pemerintah Kota Bogor');
$pdf->SetTitle('Surat Rujukan Umum');
$pdf->SetSubject('Surat Rujukan Rumah Sakit');
$pdf->SetKeywords('Surat Rujukan');
// $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
//$pdf->setFooterData(array(0,64,0), array(0,64,128));
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
require_once dirname(__FILE__) . '/lang/eng.php';
$pdf->setLanguageArray($l);
}
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 9, '', true);
$pdf->SetTopMargin(10);
$pdf->AddPage();
$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
$puskesmas = $this->m_rujukan->get_puskesmas_info($this->session->userdata('kd_puskesmas'));
$kd_trans_pelayanan = $this->uri->segment(3);
$surat = $this->m_rujukan->get_data_rujukan($kd_trans_pelayanan);
if ($surat['alamat'] == '') {
$surat['alamat'] = "-";
}
if ($surat['umur'] == '') {
$surat['umur'] = "-";
}
if ($surat['jenis_kelamin'] == '') {
$surat['jenis_kelamin'] = "-";
}
if ($surat['penyakit'] == '') {
$surat['penyakit'] = "-";
}
if ($surat['tindakan'] == '') {
$surat['tindakan'] = "-";
}
if ($surat['tempat_rujukan'] == '') {
$surat['tempat_rujukan'] = "-";
}
if ($surat['poli_rujukan'] == '') {
$surat['poli_rujukan'] = "-";
}
if ($surat['cat_dokter'] == '') {
$surat['cat_dokter'] = "-";
}
if ($surat['cat_fisik'] == '') {
$surat['cat_fisik'] = "-";
}
if ($surat['nip_dokter'] == '') {
$surat['nip_dokter'] = "-";
}
if ($surat['nm_dokter'] == '') {
$surat['nm_dokter'] = "_____________________";
}
$tgl = date('d-m-Y');
#echo $this->db->last_query(); exit;
$html = '<table width="100%" align="center" border="0">';
$html .= '<tr>
<td width="20%" style="text-align: center;"><img src="' . base_url() . 'assets/img/' . $puskesmas["logo"] . '" width="80" height="80"/></td>
<td width="80%" align="center"><h2>PEMERINTAH PROPINSI ' . $puskesmas["nm_propinsi"] . '<br>DINAS KESEHATAN KOTA ' . $puskesmas["nm_kota"] . '</h2>
<h1>UPTD ' . $puskesmas["nm_puskesmas"] . '</h1>
<h3>' . $puskesmas["alamat"] . ' Telp. ' . $puskesmas["no_telp"] . '</h3>
</td>
</tr>
<tr>
<td colspan="" bordercolordark="#0A0A0A" style="text-align: center;">____________________________________________________________________________________________________</td>
</tr>';
$html .= '</table><p></p>';
$html .= '<table width="100%" border="0" >
<tr>
<td width="13%">Nomor</td>
<td width="1%">:</td>
<td width="86%">' . $surat["no_rujukan"] . '</td>
</tr>
<tr>
<td>Lampiran</td>
<td>:</td>
//.........这里部分代码省略.........
示例4: cetak_rm
public function cetak_rm()
{
$no_rm = $this->uri->segment(3);
$view_rekam_medis = $this->m_crud->get_list_pasien($no_rm);
$view_trans_pelayanan = $this->m_crud->get_pasien_rekam_medis($no_rm);
$this->load->library('Pdf');
$pdf = new Pdf('P', 'mm', 'F4', true, 'UTF-8', false);
// $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetPageOrientation('P');
$pdf->SetAuthor('Pemerintah Kota Bogor');
$pdf->SetTitle('Rekam Medis');
$pdf->SetSubject('Rekam Medis Pasien');
$pdf->SetKeywords('Medical Record');
// $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
//$pdf->setFooterData(array(0,64,0), array(0,64,128));
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
require_once dirname(__FILE__) . '/lang/eng.php';
$pdf->setLanguageArray($l);
}
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 9, '', true);
$pdf->SetTopMargin(10);
$pdf->AddPage();
$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
$puskesmas = $this->m_rujukan->get_puskesmas_info($this->session->userdata('kd_puskesmas'));
#echo $this->session->userdata('kd_puskesmas');
#echo $this->db->last_query(); exit;
$html = '<table width="100%" align="center" border="0">';
$html .= '<tr>
<td width="20%" style="text-align: center;"><img src="' . base_url() . 'assets/img/' . $puskesmas["logo"] . '" width="80" height="80"/></td>
<td width="80%" align="center"><h2>PEMERINTAH PROPINSI ' . $puskesmas["nm_propinsi"] . '<br>DINAS KESEHATAN KOTA ' . $puskesmas["nm_kota"] . '</h2>
<h1>UPTD ' . $puskesmas["nm_puskesmas"] . '</h1>
<h3>' . $puskesmas["alamat"] . ' Telp. ' . $puskesmas["telp"] . '</h3>
</td>
</tr>
<tr>
<td colspan="" bordercolordark="#0A0A0A" style="text-align: center;">____________________________________________________________________________________________________</td>
</tr>';
$html .= '</table><p></p>';
$html .= '<div id="rekam-medis">
<h4 class="widgettitle nomargin">Rekam Medis Pasien</h4>
<div class="widgetcontent bordered">
<div class="row-fluid">
<div class="span6">
<table class="table table-bordered table-invoice">
<tbody>
<tr>
<td width="30%">No. Rekam Medis</td>
<td width="70%">' . $view_rekam_medis['kd_rekam_medis'] . '</td>
</tr>
<tr>
<td>Nama Pasien</td>
<td>' . $view_rekam_medis['nm_lengkap'] . '</td>
</tr>
<tr>
<td>Tempat, Tgl Lahir</td>
<td>' . $view_rekam_medis['tempat_lahir'] . ' / ' . $this->functions->format_tgl_cetak2($view_rekam_medis['tanggal_lahir']) . '</td>
</tr>';
$hitung = $this->functions->CalcAge($view_rekam_medis['tanggal_lahir'], date('Y-m-d'));
//$hitung = $this->functions->dateDifference($view_rekam_medis['tanggal_lahir'], date('Y-m-d'));
$umurku = $hitung[0] . ' Tahun ' . $hitung[1] . ' Bulan ' . $hitung[2] . ' Hari';
// echo $umurku;
$html .= '
<tr>
<td>Umur</td>
<td>' . $umurku . '
</td>
</tr>
<tr>
<td>Jenis Kelamin</td>
<td>' . ucwords(strtolower($view_rekam_medis['jenis_kelamin'])) . '</td>
</tr>
<tr>
<td>Alamat</td>
<td>' . $view_rekam_medis['alamat'] . '</td>
</tr>
<tr>
<td>Puskesmas</td>
<td>' . $view_rekam_medis['nm_puskesmas'] . '</td>
</tr>
</tbody>
</table>
</div>';
$html .= '
</div> <!-- </row-fluid> -->
<div class="clearfix"><br/></div>';
$html .= '
<h4 class="widgettitle">Kunjungan Pasien</h4>
<div class="row-fluid">
//.........这里部分代码省略.........