本文整理汇总了PHP中Pdf::setPrintHeader方法的典型用法代码示例。如果您正苦于以下问题:PHP Pdf::setPrintHeader方法的具体用法?PHP Pdf::setPrintHeader怎么用?PHP Pdf::setPrintHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pdf
的用法示例。
在下文中一共展示了Pdf::setPrintHeader方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: imprimir_detalle
public function imprimir_detalle()
{
$data['id'] = $this->input->post('id');
$data['cliente'] = $this->clientes->buscar_cliente_detalle($data);
$data['orden'] = $this->clientes->buscar_orden_detalle($data);
$html = $this->load->view('pdf/detalle_cliente', $data, true);
/////////////
$this->load->library('Pdf');
$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetTitle('Titulo Generación de Etiqueta');
$pdf->SetSubject('Subtitulo');
$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->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('freemono', '', 14, '', true);
$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(10, 10, 10);
$pdf->SetAutoPageBreak(true, -10);
$pdf->AddPage('P', array(215.9, 279.4));
//en mm 21.59cm por 27.94cm
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
$nombre_archivo = utf8_decode("informe" . ".pdf");
$pdf->Output($nombre_archivo, 'I');
}
示例2: generar_turno
public function generar_turno($numero, $cita)
{
$data['numero'] = base64_decode($numero);
$data['cita'] = base64_decode($cita);
$this->load->library('Pdf');
$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
//$pdf->SetAuthor('Osmel Calderón');
$pdf->SetTitle('Titulo Generación de Etiqueta');
$pdf->SetSubject('Subtitulo');
//$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// datos por defecto de cabecera, se pueden modificar en el archivo tcpdf_config_alt.php de libraries/config
//$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($tc = array(0, 64, 0), $lc = array(0, 64, 128));
// datos por defecto de cabecera, se pueden modificar en el archivo tcpdf_config.php de libraries/config
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// se pueden modificar en el archivo tcpdf_config.php de libraries/config
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//relación utilizada para ajustar la conversión de los píxeles
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// ---------------------------------------------------------
// establecer el modo de fuente por defecto
$pdf->setFontSubsetting(true);
// Establecer el tipo de letra
//Si tienes que imprimir carácteres ASCII estándar, puede utilizar las fuentes básicas como
// Helvetica para reducir el tamaño del archivo.
//$pdf->SetFont('freemono', '', 14, '', true);
// Añadir una página
// Este método tiene varias opciones, consulta la documentación para más información.
// $pdf->AddPage();
//fijar efecto de sombra en el texto
$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
// Establecemos el contenido para imprimir
//$provincia = $this->input->post('provincia');
//$data['id_movimiento']='29';
// remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
//$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT, PDF_MARGIN_BOTTOM);
// set margins
$pdf->SetMargins(0, 0, 0);
// set auto page breaks
$pdf->SetAutoPageBreak(true, -10);
$pdf->AddPage('P', array(100.0, 100.0));
//en mm
//$pdf->AddPage(); //en mm
$html = $this->load->view('pdfs/turno', $data, true);
// Imprimimos el texto con writeHTMLCell()
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
// ---------------------------------------------------------
// Cerrar el documento PDF y preparamos la salida
// Este método tiene varias opciones, consulte la documentación para más información.
$nombre_archivo = utf8_decode($data['numero'] . ".pdf");
$pdf->Output($nombre_archivo, 'I');
}
示例3: tiparire
function tiparire($fromDate, $toDate)
{
$this->load->model('cerere_model');
$filtru = array('fromDate' => $fromDate, 'toDate' => $toDate);
$cereri = $this->cerere_model->getCereriAll($filtru);
$this->load->library('Pdf');
$pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetTitle('Cereri');
$pdf->SetTopMargin(5);
$pdf->setFooterMargin(5);
$pdf->SetAutoPageBreak(true);
$pdf->SetAuthor('poartacerului.ro');
$pdf->SetDisplayMode('real', 'default');
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$output = "<strong>Cereri rugaciune din data {$fromDate} in data {$toDate}</strong>";
foreach ($cereri as $cerere) {
$output .= "<br /><br />Nume: " . $cerere['nume'] . ", Localitate: " . $cerere['localitate'] . ", Data: " . $cerere['data'];
$output .= "<br />Continut: " . $cerere['continut'];
}
$pdf->PrintChapter($output, true);
$pdf->Output('cereri-rugaciune.pdf', 'I');
}
示例4: ticketPdf
public function ticketPdf()
{
$ticket = $this->input->get("ticket");
$pdf = new Pdf('L', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setPageOrientation('p');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT);
//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('times', '', 12, '', true);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$html = null;
$buscarTicket = $this->ticket_model->buscarTicket($ticket);
$buscarTicketSector = $this->ticket_model->buscarTicketSector($ticket);
if ($buscarTicket) {
foreach ($buscarTicket as $fila1) {
$html = '';
$html .= "<style type=text/css>";
$html .= "td{ color: #222}";
$html .= "</style>";
$html .= '<table border="0">
<tr colspan="6">
<td colspan="2" align="left"><img alt="Imagen" src="imagen/logo/logoborde.png" width="220" heigth="90"/></td>
<td colspan="2" ><br></td>
<td colspan="2"><p align="right"><b>República Bolivariana de Venezuela<br>Gobernación del Estado Lara</b></p></td>
</tr><br>
<tr colspan="6">
<td colspan="6" align="right"><b>Ticket: ' . $fila1->codigo . '</b></td><br>
</tr>
<tr colspan="6">
<td colspan="6" align="right"><b>Barquisimeto, ' . $fila1->fecha . '</b></td>
</tr><br>
<tr colspan="6">
<td colspan="6" align="center"><b>REQUERIMIENTO</b></td>
</tr>
</table><br>
<table border="1">
<tr colspan="6">
<td colspan="2" bgColor="#DCDCDC"><p align="center"><b>Solicitante:</b></p></td>
<td colspan="4"><p align="center">' . $fila1->solicitante . '</p></td><br>
</tr>
<tr colspan="6">
<td colspan="2" bgColor="#DCDCDC"><p align="center"><b>Tipo de requerimiento:</b></p></td>
<td colspan="4"><p align="center">' . $fila1->nombretipo . '</p></td><br>
</tr>
</table><br>';
if ($fila1->tipoticket == 3) {
$html .= '
<table border="1">
<tr colspan="8">
<td colspan="8" bgColor="#DCDCDC"><p align="center"><b>DESCRIPCIÓN REQUERIMIENTO.-</b></p></td>
</tr>
<tr colspan="8">
<td colspan="3" bgColor="#DCDCDC"><p align="center"><b>Tipo de ayuda</b></p></td>
<td colspan="3" bgColor="#DCDCDC"><p align="center"><b>Descripción</b></p></td>
<td colspan="2" bgColor="#DCDCDC"><p align="center"><b>Cantidad</b></p></td>
</tr>';
foreach ($buscarTicketSector as $fila2) {
$variable = $fila2->nombresector;
$html .= '<tr colspan="8">
<td colspan="3"><p align="center">' . $fila2->ayudaticket . '</p></td>
<td colspan="3"><p align="center">' . $fila2->descripcion . '</p></td>
<td colspan="2"><p align="center">' . $fila2->cantidad . '</p></td>
</tr>';
}
$html .= '<tr colspan="8">
<td colspan="8" bgColor="#DCDCDC"><p align="center">SECTOR RELACIONADO AL REQUERIMIENTO: ' . $variable . '</p></td><br>
</tr>
</table>';
} else {
$html .= '<table border="1">
<tr colspan="6">
<td colspan="6" bgColor="#DCDCDC"><p align="center">SECTOR RELACIONADO AL REQUERIMIENTO: ' . $fila1->nombresector . '</p></td><br>
</tr>
<tr colspan="6">
<td colspan="6" bgColor="#DCDCDC"><p align="center">DESCRIPCIÓN REQUERIMIENTO.-</p></td><br>
</tr>
<tr colspan="6">
<td colspan="6"><p align="justify">' . $fila1->descripcion . '</p></td><br>
</tr>
</table>';
}
}
} else {
$pdf->SetFont('Times', 'B', 18);
$pdf->Text(5, 25, 'No se encuentra Documento con las características indicadas.');
}
$nombre_archivo = utf8_decode("ticket.pdf");
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'C', $autopadding = true);
$pdf->Output($nombre_archivo, 'I');
}
示例5: reporteEstatusPdf
public function reporteEstatusPdf()
{
$pdf = new Pdf('L', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setPageOrientation('p');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT);
//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('times', '', 12, '', true);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$html = null;
$reporteEstatus = $this->reporteticket_model->reporteEstatusPDF();
if ($reporteEstatus) {
$pdf->Image("imagen/logo/logoborde.png", $x = 5, $y = 5, $w = 70, $h = 40, $type = '', $link = '', $align = 'right', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array());
$pdf->Text(120, 15, "República Bolivariana de Venezuela", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->Text(120, 20, "Gobernación del Estado Lara", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->Text(120, 25, "Oficina de Atención al Ciudadano.", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->SetFont('Times', 'B', 12);
$pdf->Text(60, 50, 'Reporte estadistico del estatus de los Ticket registrados.');
foreach ($reporteEstatus->result_array() as $fila) {
$arregloDatos[] = array('estatus' => $fila['estatus'], 'contador' => $fila['contador']);
}
$pdf->Ln(10);
$pdf->SetFillColor('150', '210', '255');
$pdf->Cell(0, 0, 'Cuadro Resumen', 1, 1, 'C', 1);
$pdf->Cell(75, 0, 'Tipo ticket', 1, 0, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$pdf->Cell(75, 0, 'Sector relacionado', 1, 0, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$pdf->Cell(30, 0, 'Cantidad', 1, 1, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$reporteCuadro = $this->reporteticket_model->reporteEstatusCuadroPDF();
foreach ($reporteCuadro as $fila2) {
$pdf->Cell(75, 0, $fila2->tipo, 1, 0, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$pdf->Cell(75, 0, $fila2->sector, 1, 0, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$pdf->Cell(30, 0, $fila2->cantidad, 1, 1, 'C', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$total = $fila2->total;
}
$pdf->Cell(150, 0, 'Total de ticket', 1, 0, 'R', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M');
$pdf->Cell(30, 0, $total, 1, 1, 'C', 1);
$pdf->Ln(10);
$pdf->graficoPDF($arregloDatos, 'Grafico', array(60, '', 90, 100), '');
} else {
$pdf->SetFont('Times', 'B', 18);
$pdf->Text(14, 40, 'No se encuentra información con las características indicadas.');
}
$nombre_archivo = utf8_decode("listado.pdf");
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'C', $autopadding = true);
$pdf->Output($nombre_archivo, 'I');
}
示例6: generarReporteEventoGeneralSeleccionFecha
public function generarReporteEventoGeneralSeleccionFecha()
{
$fecha = date("Y-m-d", strtotime($this->input->get('fecha')));
$pdf = new Pdf('L', 'mm', 'Legal', true, 'UTF-8', false);
$pdf->setPageOrientation('l');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT);
//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING, array(0, 64, 255), array(0, 64, 128));
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('times', '', 12, '', true);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$html = null;
$pdf->SetFont('Times', 'B', 14);
$pdf->Image("imagen/logo/bannerprevengo2.png", $x = 5, $y = 5, $w = 290, $h = 40, $type = 'PNG', $link = '', $align = 'right', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array());
$pdf->SetTextColor('0', '25', '215');
$pdf->Text(130, 12, "República Bolivariana de Venezuela", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->Text(130, 17, "Gobernación del Estado Lara", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->Text(130, 23, "Oficina de Personal--División de Planificación y Presupuesto.", $fstroke = false, $fclip = false, $ffill = true, $border = 0, $ln = 0, $align = 'left', $fill = false, $link = '', $stretch = 0, $ignore_min_height = false, $calign = 'T', $valign = 'M', $rtloff = false);
$pdf->SetFont('Times', 'B', 12);
$pdf->SetTextColor('8', '8', '8');
// $pdf->Text(50, 35, 'Reporte General de Eventos.');
// $pdf->Ln(20);
//$pdf->Text(30, 40, 'Fecha:' . date('d-m-Y'), $align = 'rigth');
$pdf->Ln(15);
$pdf->SetFont('times', '', 11, '', true);
$ano = date('Y');
$mesesN = array(1 => "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$mes = $mesesN[date('n')];
$dia = date('d');
$html .= '
<table>
<tr colspan="8">
<td colspan="2"><p align="center"><b></b></p></td>
<td colspan="2" ><p align="center"><b></b></p></td>
<td colspan="2"><p align="center"><b>Barquisimeto, ' . $dia . ' de ' . $mes . ' del ' . $ano . '</b></p></td>
</tr>
</table>';
$html .= "<h1>Reporte General de Eventos con las siguientes caracteristicas: </h1>";
$html .= '
<table border="1">
<tr colspan="1" width="5" heigth="5">
<td colspan="1" bgColor="#429DED"><p align="center"><b> Fecha </b></p></td>
</tr>
<tr colspan="1" width="5" heigth="5">
<td colspan="1" bgColor=""><p align="center"><b> ' . date("Y-m-d", strtotime($this->input->get('fecha'))) . '</b></p></td>
</tr>
</table>';
$condicion = 'evento.fechatope="' . $fecha . '"';
$reporte = $this->evento_model->cargarListaEventoSeleccionPDF($condicion);
$html .= "<H1></h1>";
if ($reporte->num_rows() > 0) {
$html .= '
<table border="1">
<tr colspan="8">
<td colspan="3" bgColor="#429DED"><p align="center"><b>Titulo</b></p></td>
<td colspan="10" bgColor="#429DED"><p align="center"><b>Descripción</b></p></td>
<td colspan="2" bgColor="#429DED"><p align="center"><b>Tipo de Evento</b></p></td>
<td colspan="2" bgColor="#429DED"><p align="center"><b>Sector</b></p></td>
<td colspan="2" bgColor="#429DED"><p align="center"><b>Alcance</b></p></td>
<td colspan="2" bgColor="#429DED"><p align="center"><b>Agente</b></p></td>
<td colspan="2.5" bgColor="#429DED"><p align="center"><b>Estatus</b></p></td>
</tr>';
foreach ($reporte->result_array() as $fila2) {
$html .= '<tr colspan="8">
<td colspan="3"><p align="center">' . $fila2['titulo'] . '</p></td>
<td colspan="10"><p align="center">' . $fila2['descripcion'] . '</p></td>
<td colspan="2"><p align="center">' . $fila2['tipoEv'] . '</p></td>
<td colspan="2"><p align="center">' . $fila2['sector'] . '</p></td>
<td colspan="2"><p align="center">' . $fila2['alcance'] . '</p></td>
<td colspan="2"><p align="center">' . $fila2['agente'] . '</p></td>
<td colspan="2.5"><p align="center">' . $fila2['estatus'] . '</p></td>
</tr>';
}
$html .= '<tr>
<td colspan="21"><p align="right"> Cantidad de Eventos: </p></td>
<td colspan="2"><p align="center">' . $reporte->num_rows() . '</p></td>
</tr>
</table>';
} else {
$html .= '<h1>No se encuentra eventos registrados para la fecha seleccionada.</h1>';
}
$nombre_archivo = utf8_decode("reporteEventos.pdf");
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'C', $autopadding = true);
$pdf->Output($nombre_archivo, 'I');
}
示例7: pdf
function pdf()
{
$data['matricula'] = $this->input->post('matricula');
$data['nombre'] = $this->input->post('nombre');
$data['paterno'] = $this->input->post('paterno');
$data['materno'] = $this->input->post('materno');
$data['fecha_carga'] = $this->input->post('fecha_carga');
$data['id_archivo'] = $this->input->post('id_archivo');
$data['curp'] = $this->input->post('curp');
$data['correo'] = $this->input->post('correo');
$data['tel'] = $this->input->post('tel');
$data['institucion'] = $this->input->post('institucion');
$data['plantel'] = $this->input->post('plantel');
$data['grado'] = $this->input->post('grado');
$data['turno'] = $this->input->post('turno');
$data['promedio'] = $this->input->post('promedio');
$data['modalidad'] = $this->input->post('sistema');
$data['padre'] = $this->input->post('padre');
$data['madre'] = $this->input->post('madre');
$data['ecivil'] = $this->input->post('e_civil');
$data['sexo'] = $this->input->post('sexo');
$data['fecha_nac'] = $this->input->post('fecha_nac');
//$data['']= $this->input->post('');
$data['cel'] = $this->input->post('cel');
if ($data['cel'] == '') {
$data['cel'] = '----';
}
$data['calle'] = $this->input->post('calle');
if ($data['calle'] == '') {
$data['calle'] = '----';
}
$data['noext'] = $this->input->post('noext');
if ($data['noext'] == '') {
$data['noext'] = '----';
}
$data['noint'] = $this->input->post('noint');
if ($data['noint'] == '') {
$data['noint'] = '----';
}
$data['manzana'] = $this->input->post('manzana');
if ($data['manzana'] == '') {
$data['manzana'] = '----';
}
$data['lote'] = $this->input->post('lote');
if ($data['lote'] == '') {
$data['lote'] = '----';
}
$data['noedif'] = $this->input->post('noedif');
if ($data['noedif'] == '') {
$data['noedif'] = '----';
}
$data['nodpto'] = $this->input->post('nodpto');
if ($data['nodpto'] == '') {
$data['nodpto'] = '----';
}
$data['andador'] = $this->input->post('andador');
if ($data['andador'] == '') {
$data['andador'] = '----';
}
$data['rampa'] = $this->input->post('rampa');
if ($data['rampa'] == '') {
$data['rampa'] = '----';
}
$data['pasillo'] = $this->input->post('pasillo');
if ($data['pasillo'] == '') {
$data['pasillo'] = '----';
}
$data['villa'] = $this->input->post('villa');
if ($data['villa'] == '') {
$data['villa'] = '----';
}
$data['entrada'] = $this->input->post('entrada');
if ($data['entrada'] == '') {
$data['entrada'] = '----';
}
$data['colonia'] = $this->input->post('colonia');
if ($data['colonia'] == '') {
$data['colonia'] = '----';
}
$data['delegacion'] = $this->input->post('delegacion');
if ($data['delegacion'] == '') {
$data['delegacion'] = '----';
}
$data['cp'] = $this->input->post('cp');
if ($data['cp'] == '') {
$data['cp'] = '----';
}
$this->load->library('Pdf');
$pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Cony Jaramillo');
$pdf->SetTitle('Documentos Prepa Si');
$pdf->SetSubject('Reimpresión de Documentos');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
ob_start();
//remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
// set default header data
// set margins
//.........这里部分代码省略.........
示例8: index
function index()
{
date_default_timezone_set('Australia/NSW');
$ImageW = 105;
//WaterMark Size
$ImageH = 30;
$id_user = $this->uri->segment(2);
$created_at = urldecode($this->uri->segment(3));
$display_name = $this->session->userdata('display_name');
$getOrganization = $this->survey_model->get_organization($id_user);
$getsurveydetails = $this->survey_model->getsurveydetails($id_user, $created_at);
$getsurveydetail = unserialize($getsurveydetails);
$this->load->library('Pdf');
$pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('AMIT');
$pdf->SetTitle('SMG Health Survey Report');
$pdf->SetSubject('Survey Report');
$pdf->SetKeywords('SMG Health Survey Report ');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP - 15, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
require_once dirname(__FILE__) . '/lang/eng.php';
$pdf->setLanguageArray($l);
}
$pdf->SetFont('freeserif', '', 48);
// remove default header
$pdf->setPrintHeader(false);
// add a page
$pdf->AddPage();
// get the current page break margin
$bMargin = $pdf->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $pdf->getAutoPageBreak();
// disable auto-page-break
$pdf->SetAutoPageBreak(false, 0);
// set bacground image
$img_file = Base_url() . 'assets/site/images/coverImage.jpg';
$pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 400, '', false, false, 0);
// restore auto-page-break status
$pdf->SetAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
$pdf->setPageMark();
// Print a text
$html = '<div style="position: relative; right:0; left:0; text-align:center; padding: 50px 15px;">
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">SMG Health Bounce Back Survey</h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 100px 0 0px; color: #000; font-weight: 500;font-size: 24px; text-transform: capitalize;">' . $getOrganization . '</h1>
<h1 style="margin: 0 0 20px; color: #000; font-weight: 500;font-size: 18px;">' . $created_at . '</h1>
</div>';
$pdf->writeHTML($html, true, false, true, false, '');
// ---------------------------------------------------------
$img_file = Base_url() . 'assets/site/images/innerbanner.jpg';
$pdf->AddPage();
$myPageWidth = $pdf->getPageWidth();
$myPageHeight = $pdf->getPageHeight();
$myX = $myPageWidth / 2 - 50;
$myY = $myPageHeight / 2 - 40;
$pdf->SetAlpha(0.09);
$pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
$pdf->SetAlpha(1);
$pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
$pdf->SetDrawColor(255, 0, 0);
$content = '<table cellspacing="0" cellpadding="0">
<tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
<tr><td>' . $display_name . '</td></tr>
<tr><td>' . $created_at . '</td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
</table>';
$content .= '<div style="padding: 30px;">
<p style="margin: 0 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Introduction</p>
<p>Thank you for completing your Bounce Back Survey. This report provides you with a summary of your results, makes some personalised recommendations and provides you with the tools to create an action plan.</p>
<p>Each dimension is presented individually with a description of your results and strategies for strengthening.</p>
<p style="margin: 5px 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Understanding Your Report</p>
<p>Your report contains a description of the 10 dimensions of resilience for which you were assessed. Your individual assessment results for each dimension is presented as a flag. Refer to the table below when reading your report.</p>
<p>Red flag: <img src="' . Base_url() . 'assets/site/images/close_icon.jpg" height="25" alt="">
Green Flag:<img src="' . Base_url() . 'assets/site/images/tick_icon.jpg" height="25" alt=""></p>
<p style="margin: 5px 0 10px; color: #424242; font-weight: 500; font-size: 20px;">Summary of Results</p>
<table style="text-align: left;">
<thead>
//.........这里部分代码省略.........
示例9: index
public function index()
{
if ($this->input->post('action') != NULL && $this->input->post('action') == 'user_survey') {
if ($cats = $this->questionnaire_model->get_question_cats()) {
foreach ($cats as $cat) {
$data[$cat->id_questionnaire] = array();
if ($questions = $this->questionnaire_model->get_questionnaire($cat->id_questionnaire)) {
foreach ($questions as $q) {
$data[$cat->id_questionnaire][] = $this->input->post('answer_' . $q->question_no);
}
}
}
}
$survey_data = serialize($data);
$created_at = date(DATETIME_DATABASE_FORMAT);
$table_data = array('id_user' => $this->session->userdata('id_user'), 'survey_data' => $survey_data, 'created_at' => $created_at);
if ($this->site_model->insert('smg_survey', $table_data)) {
date_default_timezone_set('Australia/NSW');
$ImageW = 105;
//WaterMark Size
$ImageH = 30;
$id_user = $this->session->userdata('id_user');
$display_name = $this->session->userdata('display_name');
$getOrganization = $this->survey_model->get_organization($id_user);
$getsurveydetails = $this->survey_model->getsurveydetails($id_user, $created_at);
$getsurveydetail = unserialize($getsurveydetails);
$this->load->library('Pdf');
$pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('AMIT');
$pdf->SetTitle('SMG Health Survey Report');
$pdf->SetSubject('Survey Report');
$pdf->SetKeywords('SMG Health Survey Report ');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP - 15, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
require_once dirname(__FILE__) . '/lang/eng.php';
$pdf->setLanguageArray($l);
}
$pdf->SetFont('freeserif', '', 48);
// remove default header
$pdf->setPrintHeader(false);
// add a page
$pdf->AddPage();
// get the current page break margin
$bMargin = $pdf->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $pdf->getAutoPageBreak();
// disable auto-page-break
$pdf->SetAutoPageBreak(false, 0);
// set bacground image
$img_file = Base_url() . 'assets/site/images/coverImage.jpg';
$pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 400, '', false, false, 0);
// restore auto-page-break status
$pdf->SetAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
$pdf->setPageMark();
// Print a text
$html = '<div style="position: relative; right:0; left:0; text-align:center; padding: 50px 15px;">
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">SMG Health Bounce Back Survey</h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;"> </h1>
<h1 style="margin: 100px 0 0px; color: #000; font-weight: 500;font-size: 24px; text-transform: capitalize;">' . $getOrganization . '</h1>
<h1 style="margin: 0 0 20px; color: #000; font-weight: 500;font-size: 18px;">' . $created_at . '</h1>
</div>';
$pdf->writeHTML($html, true, false, true, false, '');
// ---------------------------------------------------------
$img_file = Base_url() . 'assets/site/images/innerbanner.jpg';
$pdf->AddPage();
$myPageWidth = $pdf->getPageWidth();
$myPageHeight = $pdf->getPageHeight();
$myX = $myPageWidth / 2 - 50;
$myY = $myPageHeight / 2 - 40;
$pdf->SetAlpha(0.09);
$pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
$pdf->SetAlpha(1);
$pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
$pdf->SetDrawColor(255, 0, 0);
$content = '<table cellspacing="0" cellpadding="0">
<tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
<tr><td>' . $display_name . '</td></tr>
<tr><td>' . $created_at . '</td></tr>
//.........这里部分代码省略.........
示例10: generarReporteActividadEvento
public function generarReporteActividadEvento()
{
$idEvento = $this->input->get('idEv');
$html = null;
$pdf = new Pdf('L', 'mm', 'Legal', true, 'UTF-8', false);
$pdf->setPageOrientation('l');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT);
$pdf->setHeaderMargin(2);
$pdf->SetHeaderData('bannerprevengo4.png', 270, 'Gobernacion de Lara', 'Oficina de Personal--División de Planificación y Presupuesto', array(0, 64, 255), array(0, 64, 128));
$pdf->setFooterMargin(12);
$pdf->setFooterData();
$pdf->SetAlpha(1, 'Normal');
$pdf->Image('imagen/logo/degradado.PNG', 30, 54, 100, 104, '', '', 'N', '', '', 'C');
// recuperamos la opacidad por defecto
$pdf->SetAlpha(1, 'Normal');
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('times', '', 12, '', true);
$pdf->SetFont('Times', 'B', 12);
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
$pdf->AddPage();
$pdf->SetTextColor('8', '8', '8');
$pdf->Ln(10);
$pdf->SetFont('times', '', 11, '', true);
$ano = date('Y');
$mesesN = array(1 => "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$mes = $mesesN[date('n')];
$dia = date('d');
$html .= '
<table>
<tr colspan="8">
<td colspan="8"><p align="rigth"><b>Barquisimeto, ' . $dia . ' de ' . $mes . ' del ' . $ano . '</b></p></td>
</tr>
</table>';
$html .= "<h1>Reporte General de Metas alcanzada para las actividades</h1>";
$condicion = 'evento.id=' . $idEvento;
$reporte = $this->evento_model->cargarListaEventoSeleccionPDF($condicion);
if ($reporte->num_rows > 0) {
foreach ($reporte->result_array() as $fila2) {
$html .= '
<table border="1">
<tr colspan="4">
<td colspan="4" bgColor="#429DED"><p align="center"><b>Evento</b></p></td>
</tr>
<tr colspan="4">
<td colspan="1" bgColor="#429DED"><p align="center"><b>Titulo</b></p></td>
<td colspan="2" bgColor="#429DED"><p align="center"><b>Descripción</b></p></td>
<td colspan="1" bgColor="#429DED"><p align="center"><b>Estatus</b></p></td>
</tr>
<tr colspan="4">
<td colspan="1"><p align="center">' . $fila2['titulo'] . '</p></td>
<td colspan="2"><p align="center">' . $fila2['descripcion'] . '</p></td>
<td colspan="1"><p align="center">' . $fila2['estatus'] . '</p></td>
</tr>';
$reporte2 = $this->actividad_model->cargarMetaPlandeAccionDeEventoPDF($fila2['idEv']);
$html .= '<tr colspan="4">
<td colspan="4" bgColor="#429DED"><p align="center"><b>Plan de Accion</b></p></td>
</tr>';
if ($reporte2->num_rows > 0) {
foreach ($reporte2->result_array() as $fila2) {
$html .= '
<tr colspan="5">
<td colspan="1" bgColor="#00BFFF"><p align="center"><b>Actividad:</b></p></td>
<td colspan="1" bgColor="#00BFFF"><p align="center"><b>Meta Propuesta</b></p></td>
<td colspan="1" bgColor="#00BFFF"><p align="center"><b>Meta Alcanzada</b></p></td>
<td colspan="1" bgColor="#00BFFF"><p align="center"><b>Estatus</b></p></td>
</tr>
<tr colspan="4">
<td colspan="1" ><p align="center">' . $fila2['descripcion'] . '</p></td>
<td colspan="1" ><p align="center">' . $fila2['metap'] . '</p></td>
<td colspan="1" ><p align="center">' . $fila2['metaa'] . '</p></td>
<td colspan="1" ><p align="center">' . $fila2['estatus'] . '</p></td>
</tr>';
}
} else {
$html .= '<tr colspan="4">
<td colspan="4"><p align="center"><b> El evento no tiene plan de accion registrado.</b></p></td>
</tr>';
}
$html .= '</table>';
$html .= '<h1></H1>';
}
} else {
//.........这里部分代码省略.........
示例11: index
public function index()
{
$this->load->library('pdf');
$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 127);
$pdf->SetFont('helvetica', 'B', 12);
//($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)
$pdf->MultiCell(10, 8, "NO", 'LBT', 'C', true, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(30, 8, 'NO RM', 'LBT', 'C', true, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(59, 8, "NAMA PASIEN", 'LBT', 'C', true, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(10, 8, "SEX", 'LBT', 'C', true, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(13, 8, "UMR", 'LBT', 'C', true, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(70, 8, 'ALAMAT', 'LBTR', 'C', true, 1, '', '', true, 0, false, true, 0, 'M', true);
$pdf->SetFont('helvetica', '', 11);
$pdf->MultiCell(10, '', "1", 'LB', 'C', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(30, '', '000001223455', 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(59, '', "Sulaiman", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(10, '', "L", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(13, '', "20", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(70, '', 'Jln Kembang No 10 Surabaya', 'LBR', 'L', false, 1, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(10, '', "2", 'LB', 'C', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(30, '', '000001223454', 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(59, '', "H Naib bin arif bin soleh bin herman bin junidi bin kurniawan bin heri bin bintang bin karo karo bin saturasi bin sholeh", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', false);
$pdf->MultiCell(10, '', "L", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(13, '', "34", 'LB', 'L', false, 0, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(70, '', 'Jln Kembang No 10 Surabaya', 'LBR', 'L', false, 1, '', '', true, 0, false, true, 0, 'M', true);
$pdf->MultiCell(59, 11, "badger badger badger badger badger badger badger badger - mushroom! mushroom!", 'LB', 'L', false, 0, 50, 60, true, 0, false, false, 0, 'T', true);
//Close and output PDF document
$pdf->Output('example_005.pdf', 'I');
}