function testpdf() { $this->load->library('fpdf'); $this->fpdf->FPDF('P', 'cm', 'A4'); $this->fpdf->AddPage(); //$this->fpdf->SetFont('Arial','',10); $this->fpdf->setFont('Arial', 'B', 9); $teks = "Ini hasil Laporan PDF menggunakan Library FPDF di CodeIgniter"; $this->fpdf->Cell(3, 0.5, $teks, 1, '0', 'L', true); // $this->fpdf->setFont('Arial','B',7); $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); $this->fpdf->Line(15.6, 2.1, 5, 2.1); $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); //$this->fpdf->Ln(); $this->fpdf->Output(); $this->load->library('pdf'); $pdf = new PDF(); $pdf->SetMargins(1, 1); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 0.5, 'Hellol Ci', 0, 1, 'C'); $pdf->Output(); /* $this->load->library('fpdf'); $this->fpdf->FPDF('P','cm','A4'); $this->fpdf->Ln(); $this->fpdf->setFont('Arial','B',9); $this->fpdf->Text(7.5,1,"DAFTAR PENJUALAN BULAN "); $this->fpdf->setFont('Arial','B',9); $this->fpdf->Text(8.3,1.5,'KOMUNITAS MUSISI INDONESIA'); $this->fpdf->setFont('Arial','B',7); $this->fpdf->Text(8,1.9,'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); $this->fpdf->Line(15.6,2.1,5,2.1); $this->fpdf->ln(1.6); $this->fpdf->ln(0.3); $this->fpdf->Output(); */ }
public function formarPdf($nombreArchivo, $seleccionar) { require 'PDF.php'; $archivo = $nombreArchivo; $pdf = new PDF(); // $pdf->SetTitle($title); $pdf->AddPage(); foreach ($seleccionar as $valor) { $fueNombre = utf8_decode($valor['fueNombre']); $notTitulo = utf8_decode($valor['notTitulo']); $notContenido = utf8_decode($valor['notContenido']); $notAutor = utf8_decode($valor['notAutor']); $notEnlace = utf8_decode($valor['notEnlace']); $fuenteIgual = strcmp($fueNombre, $fueNombreAnterior); if ($fuenteIgual == 0) { $mostrarFuente = ""; } else { $mostrarFuente = $fueNombre; } $fueNombreAnterior = $fueNombre; $Fecha = '2016-06-01'; /* $body=$body.'<br>'; $body=$body.'<div>'; $body=$body.'<h2 style="text-align: center; color:#1565c0;"> <u>'.$mostrarFuente.'</u></h2>'; $body=$body.'<h4 style="text-align: left; color:#1565c0;">'.$notTitulo.'</h4>'; $body=$body.'<p style="text-align: justify;" >'.$notContenido.'</p>'; $body=$body.'<br><p style="text-align: justify;" ><small>'.$notAutor.'</small></p>'; $body=$body.'<p style="text-align: justify;" ><small> <a href="'.$notEnlace.'">'.$notEnlace.'</a></small></p>'; $body=$body.'</div>';*/ $pdf->PrintChapter($mostrarFuente, $Fecha, $notTitulo, $notContenido); } /*$fuente=utf8_decode('Fuente de información'); $Fecha='2016-06-01'; $titulo=utf8_decode('Titulo de notica'); $contenido=utf8_decode('Contenido de noticia');*/ //$pdf->SetAuthor('Julio Verne'); /* $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido); $pdf->PrintChapter($fuente, $Fecha,$titulo,'ultimo');*/ $pdf->Output(); // $pdf->Output($archivo,"f"); }
function relatorioCursoPorPolo() { $pdf = new PDF("P", "pt", "A4"); $relatorio = $this->read(); $cabeçalhoTabela = array('Curso', 'Tipo'); $polo = ""; $array = array(); foreach ($relatorio as $value) { if ($polo == "") { $polo = $value->getPolo()->getId(); $pdf->setVendedor($value->getPolo()->getNome()); $pdf->AddPage(); } if ($polo != $value->getPolo()->getId()) { $pdf->BasicTable($cabeçalhoTabela, $array); $array = array(); $polo = $value->getPolo()->getId(); $pdf->setVendedor($value->getPolo()->getNome()); $pdf->AddPage(); array_push($array, array($value->getNome(), $value->getTipo()['descricao'])); } else { array_push($array, array($value->getNome(), $value->getTipo()['descricao'])); } } $pdf->BasicTable($cabeçalhoTabela, $array); $pdf->Output(); }
function run() { $this->pdf->Body(); header('Expires:'); header('Pragma:'); header('Cache-control:'); $this->pdf->Output('webtrees-' . uniqid() . '.pdf', 'I'); }
public function index() { $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times', '', 12); for ($i = 1; $i <= 40; $i++) { $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1); } $pdf->Output(); }
function index() { // Instanciation of inherited class $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times', '', 12); for ($i = 1; $i <= 40; $i++) { $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1); } $pdf->Output(); }
function __construct($datos) { $pdf = new PDF(); // [ Establesco Todos los datos que conendra la Factura ] $pdf->set_data($datos); $pdf->FPDF('P', 'mm', 'Letter'); // Esta funcion la uso cuando voy a imprimir al final el numero de la paguina $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 12); //$pdf->SetTextColor(20,20,250); COLOR AZUL $pdf->SetTextColor(0, 0, 0); $pdf->menbrete(); $pdf->detalle($datos['productos']); $pdf->Output(); }
public function listadoAction($aditionalFilter = '') { $pdf = new PDF("P", 'mm', "A4"); $pdf->SetTopMargin(15); $pdf->SetLeftMargin(10); $pdf->AliasNbPages(); $pdf->SetFillColor(210); $per = new Permisos(); $em = new EntityManager($per->getConectionName()); $query = "select t1.IdPerfil,t1.Permisos,t4.Perfil,t2.Titulo as Opcion,t3.Titulo as SubOpcion\n from AgtPermisos as t1,menu as t2, submenu as t3, perfiles as t4\n where t1.IDOpcion=t2.IDOpcion\n and t1.IDOpcion=t3.IDOpcion\n and t3.Id=t1.IDSubOpcion\n and t1.IdPerfil=t4.Id\n order by t1.IdPerfil,t1.IDOpcion,t1.IDSubOpcion;"; $em->query($query); $rows = $em->fetchResult(); $em->desConecta(); unset($per); $perant = ""; $opcant = ""; foreach ($rows as $row) { if ($perant != $row['IDPerfil']) { $pdf->AddPage(); $pdf->Cell(40, 5, $row['Perfil'], 0, 0, "L", 1); } else { $pdf->Cell(40, 5, "", 0, 0, "L", 0); } $pdf->SetFillColor(240); if ($opcant != $row['Opcion']) { $pdf->Cell(30, 5, $row['Opcion'], 0, 0, "L", 1); } else { $pdf->Cell(30, 5, "", 0, 0, "L", 0); } $perant = $row['IDPerfil']; $opcant = $row['Opcion']; $pdf->Cell(40, 5, $row['SubOpcion'], 0, 0, "L", 0); $permisos = array('C' => substr($row['Permisos'], 0, 1), 'I' => substr($row['Permisos'], 1, 1), 'B' => substr($row['Permisos'], 2, 1), 'A' => substr($row['Permisos'], 3, 1), 'L' => substr($row['Permisos'], 4, 1), 'E' => substr($row['Permisos'], 5, 1)); $pdf->Cell(13, 5, $permisos['C'], 0, 0, "C", 0); $pdf->Cell(13, 5, $permisos['I'], 0, 0, "C", 1); $pdf->Cell(13, 5, $permisos['B'], 0, 0, "C", 0); $pdf->Cell(13, 5, $permisos['A'], 0, 0, "C", 1); $pdf->Cell(13, 5, $permisos['L'], 0, 0, "C", 0); $pdf->Cell(13, 5, $permisos['E'], 0, 1, "C", 1); $pdf->SetFillColor(210); } $archivo = "docs/docs" . $_SESSION['emp'] . "/pdfs/" . md5(date('d-m-Y H:i:s')) . ".pdf"; $pdf->Output($archivo, 'F'); $this->values['archivo'] = $archivo; return array('template' => '_global/listadoPdf.html.twig', 'values' => $this->values); }
function run() { // change some win codes, and xhtml into html $str = array('<br />' => '<br>', '<hr />' => '<hr>', '[r]' => '<red>', '[/r]' => '</red>', '[l]' => '<blue>', '[/l]' => '</blue>', '“' => '"', '”' => '"', '„' => '"', '…' => '...', '’' => '\''); foreach ($str as $_from => $_to) { $this->html = str_replace($_from, $_to, $this->html); } $pdf = new PDF('P', 'mm', 'A4'); $pdf->SetDisplayMode('real'); $pdf->AddPage(); // html $pdf->WriteHTML($this->_convert(stripslashes($this->html)), $this->bi); // output $pdf->Output(); // stop processing exit; }
public function generateCodes(array $data) { $count = (int) $data['count']; $teacherId = $data['teacher_id']; $message = $data['message']; if (is_null($count) || is_null($teacherId)) { return false; } else { try { \DB::beginTransaction(); $teacher = Authenticator::user($teacherId); \PDF::setPrintHeader(false); \PDF::setPrintFooter(false); \PDF::AddPage(); for ($i = 0; $i < $count; $i++) { $code = $this->codeRepo->generateCode(); $data = array(); $data = array_add($data, 'student_code', $code); $data = array_add($data, 'teacher_id', $teacherId); $code = $this->codeRepo->create($data); $code->message = $message; $this->codeRepo->clearModel(); $html = View::make('pages.code')->with('code', $code)->render(); if ($i % 5 === 0 && $i !== 0) { \PDF::AddPage(); \PDF::writeHTML($html, false, false, false, false, 'L'); } else { \PDF::writeHTML($html, false, false, false, false, 'L'); } } \PDF::SetCreator(''); \PDF::SetAuthor(''); $format = '%s/%s.pdf'; $subpath = sprintf($format, 'pdfs', $teacherId); $format = '/%s/%s'; $fullpath = sprintf($format, public_path(), $subpath); \PDF::Output($fullpath, 'F'); \DB::commit(); return $subpath; } catch (\Exception $ex) { \Log::error($ex); \DB::rollback(); return false; } } }
public function mostrar() { if (!isset($_GET['lote'])) { echo "Error"; } else { $lote = $_GET['lote']; $sql = "Select l.tipoLote, l.fechaEntrada, b.idBulto, b.idLote, p.descripcion, p.dimAncho, p.dimAlto, p.dimLargo\n\t\t\t\t\tfrom `tbl_sga_lote`as l, `tbl_sga_bulto`as b, `tbl_sga_producto` as p\n\t\t\t\t\twhere b.idLote = '{$lote}'\n\t\t\t\t\tand b.idProducto = p.idProducto\n\t\t\t\t\tand l.idLote=b.idLote"; $query = $this->db->query($sql); $pdf = new PDF(); foreach ($query->result() as $row) { $fecha = date_create($row->fechaEntrada); $fecha = date_format($fecha, 'd-m-Y'); $pdf->AddPage(); $pdf->Fecha("{$fecha}", "{$row->idBulto}", "{$row->idLote}", "{$row->tipoLote}", "{$row->descripcion}", "{$row->dimAncho} x {$row->dimAlto} x {$row->dimLargo}"); } // $pdf = new PDF(); // $pdf->AddPage(); // $pdf->Fecha('11/10/2007','002110','PRODUCTO TERMINADO','Madera molica','200x330x3004'); // $pdf->AddPage(); // $pdf->Fecha('11/10/2007','002110','PRODUCTO TERMINADO','Madera molica','200x330x3004'); $pdf->Output(); } }
public function CorreosOrdinario() { include 'config/etiqueta.php'; $pdf = new PDF('L', 'mm', array(140, 100)); for ($x = 0; $x < count($this->pedidoExportar); $x++) { $sql = "SELECT cus.firstname, cus.lastname, dir.address1, dir.postcode, dir.city, prov.name as provincia, paisLen.name as pais\n FROM ps_orders AS ord\n INNER JOIN ps_customer AS cus ON cus.id_customer = ord.id_customer\n INNER JOIN ps_address as dir ON dir.id_address = ord.id_address_delivery\n INNER JOIN ps_state as prov on prov.id_state = dir.id_state\n INNER JOIN ps_country as pais on pais.id_country = dir.id_country\n INNER JOIN ps_country_lang as paisLen on pais.id_country = paisLen.id_country\n WHERE ord.id_order = " . $this->pedidoExportar[$x] . " and paisLen.id_lang = 1"; $datosDireccion = DB::getInstance()->ExecuteS($sql); $nomb = ""; $dir = ""; $cod = ""; $prov = ""; $pais = ""; foreach ($datosDireccion as $datPed) { $nomb = $datPed['firstname'] . " " . $datPed['lastname']; $dir = $datPed['address1']; $cod = $datPed['postcode'] . " " . utf8_decode($datPed['city']); $prov = utf8_decode($datPed['provincia']); $pais = utf8_decode($datPed['pais']); } $pdf->AddPage(); $pdf->Body($nomb, $dir, $cod, $prov, $pais); } $pdf->Output("test.pdf"); }
function relatorioDisciplinasPorCurso($id) { $pdf = new PDF("P", "pt", "A4"); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $polo = new Polo(); $polo->setId($id); $polo = $polo->getById(); $pdf->Cell(40, 10, $polo->getNome()); $cabeçalhoTabela = array('Disciplina', 'Nome Tutor', 'Sobrenome Tutor'); $curso = new Curso(); $cursos = $curso->read(); foreach ($cursos as $curso) { if ($curso->getPolo()->getId() != $id) { continue; } $pdf->setVendedor($curso->getNome() . " - " . $curso->getTipo()['descricao']); $pdf->AddPage(); $disciplinaDao = new DisciplinaDao(); $array = $disciplinaDao->listDisciplinasTutoresByCurso($curso); $pdf->BasicTable($cabeçalhoTabela, $array); } $pdf->Output(); }
// Movernos a la derecha $pdf->SetY(140); $pdf->Cell(80); // Título $pdf->Cell(60, 5, 'Angytours', 0, 2, 'C'); $pdf->Cell(60, 5, 'Calle 59J # 565 X 110 y 112 Col Bojorquez', 0, 2, 'C'); $pdf->Cell(60, 5, 'Tel: (999)9-12-28-95 | Cel: (044)99-92-44-54-14', 0, 2, 'C'); $pdf->Cell(60, 5, 'Correo: angeviajes@hotmail.com', 0, 2, 'C'); $pdf->Cell(60, 5, 'RFC: PELA620129L36', 0, 2, 'C'); $pdf->SetFont('Arial', '', 10); $pdf->SetY(165); $pdf->SetX(140); $pdf->Cell(40, 8, utf8_decode("Fecha: ") . utf8_decode($dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')), 0, 1); $pdf->SetY(175); $pdf->SetX(20); $pdf->Cell(130, 8, utf8_decode("Cliente : ") . utf8_decode($nombre), 1, 0); $pdf->Cell(30, 8, utf8_decode("Folio : ") . $FolioGrupo, 1, 1); $pdf->SetX(20); $pdf->Cell(60, 8, utf8_decode("Cantidad : ") . $CostoTotal, 1, 0, 'L'); $pdf->MultiCell(100, 8, utf8_decode("Importe Letras : ") . $CantLetras, 1, 'L'); $pdf->SetX(20); $pdf->MultiCell(160, 5, utf8_decode("Descripción : ") . utf8_decode($Descripcion), 1, 'L'); $pdf->SetX(20); $pdf->Cell(100, 14, utf8_decode("Le atendio : ") . utf8_decode($nombreU), 1, 0); $pdf->Cell(60, 14, utf8_decode("Firma : "), 1, 1); $pdf->Output('Recibo' . $nombre . 'Folio' . $FolioGrupo . '.pdf', 'D'); cerrar($conexion); ?>
function savePdf() { $meeting =& $this->meeting; $submission =& $this->submission; $summary = $submission->getSummaryFile() != null ? $submission->getSummaryFile() : $this->getData('summary'); $specificDiscussionText = $this->getData('discussionText'); $discussionType = $this->getData('discussionType'); $typeOther = $this->getData('typeOther'); $isUnanimous = $this->getData('unanimous') == "Yes" ? true : false; $decision = $this->getData("decision"); $votes = $this->getData("votes"); $minorityReason = $this->getData("minorityReason"); $chairReview = $this->getData('chairReview'); $abstract = $submission->getLocalizedAbstract(); $pdf = new PDF(); $pdf->AddPage(); $pdf->ChapterTitle('CONTINUING REVIEW of ' . $submission->getProposalId()); $pdf->ChapterItemKeyVal('Protocol Title', $abstract->getScientificTitle(), "BU"); $pdf->ChapterItemKeyVal('Principal Investigator (PI)', $submission->getAuthorString(), "BU"); $pdf->ChapterItemKeyVal('Unique project identification # assigned', $submission->getProposalId(), "BU"); $pdf->ChapterItemKeyVal('Responsible Staff Member', $submission->getUser()->getFullName(), "BU"); if ($isUnanimous) { switch ($decision) { case SUBMISSION_SECTION_DECISION_APPROVED: $decisionStr = "The proposal was accepted in principal unanimously by all the members of the ERC present in the meeting, and was approved with clarifications mentioned above."; break; case SUBMISSION_SECTION_DECISION_RESUBMIT: $decisionStr = "The proposal was assigned for revision and resubmission in principal unanimously by all the members of the ERC present in the meeting provided with the considerations and conditions mentioned above."; break; case SUBMISSION_SECTION_DECISION_DECLINED: $decisionStr = "The proposal was not accepted in principal unanimously by all the members of the ERC present in the meeting due to concerns stated above."; break; } } else { switch ($decision) { case SUBMISSION_SECTION_DECISION_APPROVED: $decisionStr = "The proposal was accepted in principal by the majority of the ERC members present in the meeting and was approved with clarifications mentioned above."; break; case SUBMISSION_SECTION_DECISION_RESUBMIT: $decisionStr = "The proposal was assigned for revision and resubmission in principal by the majority of the ERC members present in the meeting provided with the considerations and conditions mentioned above."; break; case SUBMISSION_SECTION_DECISION_DECLINED: $decisionStr = "The proposal was not accepted in principal unanimously by the majority of the ERC members present in the meeting due to concerns stated above."; break; } $votesStr = "The distribution of votes are as follows. " . $this->getData('votesApprove') . " member(s) voted for, " . $this->getData('votesNotApprove') . " member(s) voted against, " . $this->getData('votesAbstain') . " member(s) abstained."; $reasonsStr = "Reasons for minority opinions are as follows: {$minorityReason}"; } $pdf->ChapterItemKey('IRB Decision and Votes', "BU"); $pdf->ChapterItemVal($decisionStr); if (!$isUnanimous) { $pdf->ChapterItemVal($votesStr); $pdf->ChapterItemVal($reasonsStr); if ($chairReview != null) { $pdf->ChapterItemVal($chairReview); } } $journal =& Request::getJournal(); $journalId = $journal->getId(); $filename = $abstract->getScientificTitle() . ".pdf"; $meetingFilesDir = Config::getVar('files', 'files_dir') . '/journals/' . $journalId . '/meetings/' . $meeting->getId() . "/continuingReviews/" . $filename; import('classes.file.MinutesFileManager'); $minutesFileManager = new MinutesFileManager($meeting->getId(), "continuingReviews", $submission->getId()); if ($minutesFileManager->createDirectory()) { $pdf->Output($meetingFilesDir, "F"); } }
$tFelicitaciones += $CantFelicitacion['Cantidad']; $tTotal += $Total; if ($i % 2 == 0) { $relleno = 1; } else { $relleno = 0; } $pdf->CuadroCuerpo(10, $i, $relleno, "R"); $pdf->CuadroNombreSeparado(30, $al['Paterno'], 30, $al['Materno'], 45, $al['Nombres'], 1, $relleno); $pdf->CuadroCuerpo(15, $CantObser['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantFaltas['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantAtrasos['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantLicencias['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantNotificacion['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantNoContestan['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpo(15, $CantFelicitacion['Cantidad'], $relleno, "R", 1); $pdf->CuadroCuerpoResaltar(15, $Total, 1, "R", 1, 1); $pdf->Ln(); } $pdf->Linea(); $pdf->CuadroCuerpo(115, $idioma["Total"] . " " . $idioma["Curso"], 0, "R", 0); $pdf->CuadroCuerpo(15, $tObservaciones, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tfaltas, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tAtrasos, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tLicencias, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tNotificacionPadres, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tNoRespondeTelf, $relleno, "R", 1); $pdf->CuadroCuerpo(15, $tFelicitaciones, $relleno, "R", 1); $pdf->CuadroCuerpoResaltar(15, $tTotal, 1, "R", 1, 1); $pdf->Output($titulo . " " . $cur['Nombre'] . ".pdf", "I"); }
$pdf->SetFont('Arial', '', 8); $pdf->Cell(20, 4, number_format((double) $taxes, 2), 1, 1, 'R'); $total += $taxes; } $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(160, 4, 'AMOUNT DUE', 1, 0, 'R', 1, 0); $pdf->SetFont('Arial', '', 8); $pdf->Cell(20, 4, number_format((double) $total, 2), 1, 1, 'R'); $pdf->Ln(); // gst number //$pdf->Cell (0, 5, , 0, 1, 'R'); $pdf->MultiCell(0, 5, appconf('extra_info'), 0, 1, 'R'); $taxes = $total - $subtotal; db_execute('insert into siteinvoice_invoice (id, client_id, name, sent_on, status, notice, subtotal, taxes, total, currency) values (null, ?, ?, now(), "unpaid", 0, ?, ?, ?, ?)', $cgi->client, $cgi->name, $subtotal, $taxes, $total, $cgi->currency); $invoice_id = db_lastid(); $pdf->Output('inc/app/siteinvoice/data/' . $invoice_id . '.pdf'); umask(00); chmod('inc/app/siteinvoice/data/' . $invoice_id . '.pdf', 0777); if ($cgi->send_invoice == 'yes') { // get client info $client = db_single('select * from siteinvoice_client where id = ?', $cgi->client); $client->invoice_no = $invoice_id; $client->total = $total; $client->currency = $cgi->currency; // send email to client loader_import('ext.phpmailer'); $mailer = new PHPMailer(); $mailer->isMail(); $mailer->From = appconf('company_email'); $mailer->FromName = appconf('company_email_name'); $mailer->Subject = 'Invoice #' . $invoice_id;
$pdf->SetFont('Times', '', $font); $pdf->Cell(15, $zelle, ' ', 0, 0, 'L'); $pdf->MultiCell(150, $zelle, utf8_decode($liga[0]->bemerkungen), 0, 'L', 0); $pdf->Ln(); } if (isset($liga[0]->sl)) { $yy1 = 320; $yy0 = $yy1 - 54; if ($pdf->GetY() > $yy0) { $pdf->AddPage(); $pdf->SetFont('Times', '', 7); $pdf->Cell(10, 3, ' ', 0, 0); $pdf->Cell(175, 3, utf8_decode(JText::_('WRITTEN')) . ' ' . utf8_decode(JText::_('ON_DAY')) . ' ' . utf8_decode(JHTML::_('date', $now, JText::_('%d. %B %Y , %H %M'))), 0, 1, 'R'); $pdf->SetFont('Times', '', 14); $pdf->Cell(10, 15, ' ', 0, 0); $pdf->Cell(80, 15, utf8_decode($liga[0]->name) . " " . utf8_decode($saison[0]->name), 0, 1, 'L'); $pdf->Ln(); } $pdf->SetFont('Times', '', $font + 1); $pdf->Cell(10, $zelle, ' ', 0, 0, 'L'); $pdf->Cell(150, $zelle, JText::_('CHIEF') . ' :', 0, 1, 'L'); $pdf->SetFont('Times', '', $font); $pdf->Cell(15, $zelle, ' ', 0, 0, 'L'); $pdf->Cell(150, $zelle, utf8_decode($liga[0]->sl), 0, 1, 'L'); $pdf->Cell(15, $zelle, ' ', 0, 0, 'L'); $pdf->Cell(150, $zelle, utf8_decode($liga[0]->email), 0, 1, 'L'); $pdf->Ln(); } // Ausgabe $pdf->Output(JText::_('MELDELISTE') . ' ' . utf8_decode($liga[0]->name) . '.pdf', 'D');
if ($t1 == 1 or $datum_arr[$t][0] > $datum_arr[$t - 1][0]) { $tt++; $pdf->SetTextColor(255); $pdf->SetFillColor(90); $pdf->Cell($br00, $zelle, " ", 0, 0, 'C'); $pdf->Cell($br99, $zelle, $datum_arr[$t][0], 1, 1, 'C', 1); } $tt++; $pdf->SetTextColor(0); $pdf->SetFillColor(240); $pdf->Cell($br00, $zelle, " ", 0, 0, 'C'); $pdf->Cell($br99, $zelle, utf8_decode($arrMonth[date('F', $monatsausgabe)]), 1, 1, 'L', 1); } $tt++; $pdf->SetTextColor(0); $pdf->SetFillColor(255); $pdf->Cell($br00, $zelle, " ", 0, 0, 'C'); //$pdf->Cell($br01,$zelle,utf8_decode($arrWochentag[date("l",$datum[$t])]). ", " . $datum_arr[$t][2].".".$datum_arr[$t][1].".".$datum_arr[$t][0],1,0,'L',1); $ttext = utf8_decode($arrWochentag[date("l", $datum[$t])]) . ", " . $datum_arr[$t][2] . "." . $datum_arr[$t][1] . "." . $datum_arr[$t][0]; if ($termine[$t]->starttime != '00:00:00') { $ttext .= ' ' . substr($termine[$t]->starttime, 0, 5); } $pdf->Cell($br01, $zelle, $ttext, 1, 0, 'L', 1); $pdf->Cell($br02, $zelle, $content_termin, 1, 0, 'L', 1); $pdf->Multicell($br03, $zelle, $content_detail, 1, 1, 'L', 1); } } // ENDE : Terminschleife // Ausgabe $pdf->Output(utf8_decode(JText::_('TERMINE_HEAD')) . '.pdf', 'D');
break; } } //~ totali: $pdf->SetFont('Arial', 'B', 9); switch ($_GET['tipo']) { case "movimenti": //~ Totale ricerca $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(175, 4, 'Totale Dare/Avere Ricerca:', 0, '', 'R'); $pdf->Cell(45, 4, sprintf("%.2f", $TotDare), 0, '', 'C'); $pdf->Cell(45, 4, sprintf("%.2f", $TotAvere), 0, '', 'C'); $pdf->Cell(25, 4, '', 0, '', 'R'); break; case "mastrini": $Saldo = sprintf("%.2f", $TotDare - $TotAvere); $pdf->Cell(140, 4, "Totali:", 0, 0, 'R'); $pdf->Cell(20, 4, $TotDare, 0, 0, 'R'); $pdf->Cell(20, 4, $TotAvere, 0, 0, 'R'); $pdf->Cell(20, 4, $Saldo, 0, 0, 'R'); $pdf->Ln(); break; } $browser = GetBrowserFamily($_SERVER['HTTP_USER_AGENT']); //~ echo "Debug => ".$browser[0]." <br />"; if ($browser[0] != "msie") { $pdf->Output('StampaContabile.pdf', 'I'); } else { //~ $pdf->Output('StampaContabile.pdf', 'D'); $pdf->Output('StampaContabile.pdf', 'D'); }
public function basket() { $this->start = $this->input->get('start'); $this->end = $this->input->get('end'); $this->view = ""; if (isset($_GET['view']) && $_GET['view'] != "") { $this->view = pnp::clean($_GET['view']); } $this->data->getTimeRange($this->start, $this->end, $this->view); $basket = $this->session->get("basket"); if (is_array($basket) && sizeof($basket) > 0) { foreach ($basket as $item) { # explode host::service::source $slices = explode("::", $item); if (sizeof($slices) == 2) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view); } if (sizeof($slices) == 3) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view, $slices[2]); } } } //echo Kohana::debug($this->data->STRUCT); /* * PDF Output */ $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetAutoPageBreak('off'); $pdf->SetMargins(17.5, 30, 10); $pdf->AddPage(); if ($this->use_bg) { $pdf->setSourceFile($this->config->conf['background_pdf']); $tplIdx = $pdf->importPage(1, '/MediaBox'); $pdf->useTemplate($tplIdx); } $pdf->SetCreator('Created with PNP'); $pdf->SetFont('Arial', '', 10); // Title foreach ($this->data->STRUCT as $data) { if ($pdf->GetY() > 200) { $pdf->AddPage(); if ($this->use_bg) { $pdf->useTemplate($tplIdx); } } if ($data['LEVEL'] == 0) { $pdf->SetFont('Arial', '', 12); $pdf->CELL(120, 10, $data['MACRO']['DISP_HOSTNAME'] . " -- " . $data['MACRO']['DISP_SERVICEDESC'], 0, 1); $pdf->SetFont('Arial', '', 10); $pdf->CELL(120, 5, $data['TIMERANGE']['title'] . " (" . $data['TIMERANGE']['f_start'] . " - " . $data['TIMERANGE']['f_end'] . ")", 0, 1); $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } else { $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } $image = $this->rrdtool->doImage($data['RRD_CALL'], $out = 'PDF'); $img = $this->rrdtool->saveImage($image); $Y = $pdf->GetY(); $cell_height = $img['height'] * 0.23; $cell_width = $img['width'] * 0.23; $pdf->Image($img['file'], 17.5, $Y, $cell_width, $cell_height, 'PNG'); $pdf->CELL(120, $cell_height, '', 0, 1); unlink($img['file']); } $pdf->Output("pnp4nagios.pdf", "I"); }
$periode = sprintf("Période %s à %s", $q, getPeriodeName($cn, $to_periode)); } else { $periode = sprintf("Période %s", $q); } } else { $periode = sprintf("Date %s jusque %s", $_GET['from_date'], $_GET['to_date']); } $pdf->Cell(0, 7, $periode, 'B'); $pdf->Ln(); for ($i = 0; $i < count($array); $i++) { $pdf->Cell(160, 6, $array[$i]['desc']); $pdf->Cell(30, 6, sprintf('% 12.2f', $array[$i]['montant']), 0, 0, 'R'); $pdf->Ln(); } } else { // With Step $a = 0; foreach ($array as $e) { $pdf->Cell(0, 7, $periode_name[$a], 'B'); $pdf->Ln(); $a++; for ($i = 0; $i < count($e); $i++) { $pdf->Cell(160, 6, $e[$i]['desc']); $pdf->Cell(30, 6, sprintf('% 12.2f', $e[$i]['montant']), 0, 0, 'R'); $pdf->Ln(); } } } $fDate = date('dmy-Hi'); $pdf->Output('rapport-' . $fDate . '.pdf', 'D');
$pdf->AddCol('party_name', "20%", 'Party', 'L'); $pdf->AddCol('vendor', "20%", 'Vendor', 'L'); $pdf->AddCol('cat_name', "20%", 'Category', 'L'); $pdf->AddCol('description', "20%", 'Item', 'L'); $pdf->AddCol("cs", "10%", 'CS', 'R'); $pdf->AddCol("pc", "10%", 'PC', 'R'); $pdf->Table($data, $prop); $_cMargin = $pdf->cMargin; $pdf->cMargin = $prop['padding']; $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(221.59806666667, 6, "Total", 1, 0, 'C'); $pdf->Cell(27.69975833333, 6, $totals['cs'], 1, 0, 'R'); $pdf->Cell(27.69975833333, 6, $totals['pc'], 1, 0, 'R'); $pdf->cMargin = $_cMargin; $pdf->Ln(); $pdf->Output("daily_sales_{$_GET['date_start']}.pdf", "D"); } else { if ($_GET['report'] == 'xls') { require_once '../../Classes/PHPExcel.php'; $padding = 0.71; $objPHPExcel = new PHPExcel(); $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("Daily Sales")->setSubject("Daily Sales")->setDescription("Daily Sales")->setKeywords("Daily Sales")->setCategory("Reports"); $strDate = $_GET['date_start']; if (strlen($_GET['date_end']) > 0) { $strDate .= " ~ " . $_GET['date_end']; } $_title = $title . " - " . $strDate; $activeSheet = $objPHPExcel->getActiveSheet(); $activeSheet->getHeaderFooter()->setOddHeader('&C&18&B' . $_title . '&R&U&D'); $activeSheet->getHeaderFooter()->setOddFooter('&LPlease consider the environment before printing this report&C&IPage &P/&N&RReport generated by nexexcel.com'); $activeSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
$where2 .= " ORDER BY nombrecobrador ASC"; //Ttulos de las columnas $header = array('Cod. Cobrador', 'Nombre Cobrador'); //Colores, ancho de lnea y fuente en negrita $pdf->SetFillColor(200, 200, 200); $pdf->SetTextColor(0); $pdf->SetDrawColor(0, 0, 0); $pdf->SetLineWidth(0.2); $pdf->SetFont('Arial', 'B', 8); //Cabecera $pdf->SetX(60); $w = array(20, 60); for ($i = 0; $i < count($header); $i++) { $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1); } $pdf->Ln(); $pdf->SetFont('Arial', '', 8); $sel_resultado = "SELECT * FROM cobradores WHERE borrado=0 AND " . $where . $where2; $res_resultado = mysql_query($sel_resultado); $contador = 0; while ($contador < mysql_num_rows($res_resultado)) { $pdf->SetX(60); $pdf->Cell($w[0], 5, mysql_result($res_resultado, $contador, "codcobrador"), 'LRTB', 0, 'C'); $pdf->Cell($w[1], 5, mysql_result($res_resultado, $contador, "nombrecobrador"), 'LRTB', 0, 'C'); $pdf->Ln(); $contador++; } $pdf->Output($name = "Listado de Cobradores.pdf", 'D'); ?>
$pdf->Ln(); } //----------------------------------------------------- // Follow_Up $pdf->SetFont('DejaVu', 'B', 9); $pdf->Cell(0, 7, 'Accès action', 1, 0, 'C'); $pdf->Ln(); $pdf->SetFont('DejaVu', '', 6); $Res = $cn->exec_sql("select ac_id, ac_description from action order by ac_description "); $Max = Database::num_row($Res); for ($i = 0; $i < $Max; $i++) { $l_line = Database::fetch_array($Res, $i); $pdf->Cell(90, 6, $l_line['ac_description']); $right = $SecUser->check_action($l_line['ac_id']); switch ($right) { case 0: $pdf->SetTextColor(255, 0, 34); $pdf->Cell(30, 6, "Pas d'accès"); break; case 1: case 2: $pdf->SetTextColor(54, 233, 0); $pdf->Cell(30, 6, "Accès"); break; } $pdf->SetTextColor(0); $pdf->Ln(); } $fDate = date('dmy-HI'); $pdf->Output('security-' . $fDate . 'pdf', 'D');
$nit = $rs['nit']; $matricula = $rs['matricula']; $telefono = $rs['celular']; $correo = $rs['mail']; $montog = number_format($rs['montog'], 2); $montoesp = number_format($rs['montoesp'], 2); $tiempo = $rs['tiempomeses'] . "(meses)"; $tiempoesp = $rs['tiempomesesp'] . "(meses)"; $data[] = array($entidad, $nit, $matricula, $telefono, $correo, $montog, $montoesp, $tiempo, $tiempoesp); $cont++; } $pdf->SetFont('Arial', '', 5); $pdf->BasicTable($header, $data); $pdf->SetFont('helvetica', 'B', 8); $pdf->Cell(180, 12, utf8_decode('ESTA INFORMACION ESTA SIENDO ASOCIADA A SU USUARIO.'), 0, FALSE, 'C'); $pdf->Ln(20); //codigo de barras____________________ $pdf->SetX(35); $pdf->Sety(135); $pdf->Cell(140, 25, '', 0, FALSE, 'R'); $pdf->Code39(140, 250, $codigo, 1, 8); $pdf->Output('BUSQUEDA_' . $user . '.pdf', 'D'); } function fecha($fecha = '') { if (strlen($fecha) > 0) { return date('d/m/Y', strtotime($fecha)); } else { return '-'; } }
$pdf->FancyTable($header,$result_array); if($pdf->GetY() >= 242.00125){ $pdf->AddPage(); $pdf->FancyTable1($head_valur,$caption,$increasewidth,"bottom"); }else { $pdf->FancyTable1($head_valur,$caption,$increasewidth,"bottom"); $pdf->SetTextColor(0,0,0); } $save = "Bill ID 1.pdf"; if(isset($_POST["sendas"]) && $_POST["sendas"]=="mail") { $email = $_POST['biller_mailer_id']; $cusname = $_POST['cusname']; $attachment= $pdf->Output($save, 'S'); $sendStatus = sendBillViaeMail($_GET['new_flag_already'],$attachment,$save,$_SESSION['startdate'],$_SESSION['todate'],$email,$cusname); echo $sendStatus; } else $pdf->Output($save,'I'); ?>
$pdf->Cell(100, 8, utf8_decode("Telefono Hotel. : ") . $telefono, 0, 0); $pdf->Cell(60, 8, utf8_decode("Opradora : ") . $opm, 1, 1); $pdf->SetX(20); $pdf->Cell(160, 8, utf8_decode("Coordinador(a) : ") . $ResConP, 1, 1); $pdf->SetX(20); $pdf->Cell(160, 10, utf8_decode("Pasajero Titular : ") . $Nombre, 'LR', 1); $pdf->SetX(20); $pdf->Cell(160, 10, utf8_decode("Segundo Pasajero : ") . $acompanante, 'LR', 1); $pdf->SetX(20); $pdf->Cell(160, 10, utf8_decode("Adultos : ") . $adultos, 'LR', 1); $pdf->SetX(20); $pdf->Cell(160, 10, utf8_decode("Menores : ") . $menores, 'LR', 1); $pdf->SetX(20); $pdf->Cell(80, 8, utf8_decode("Fecha In : ") . $fechaLLegada, 'LRT', 0); $pdf->Cell(80, 8, utf8_decode("Check In : 12:00 PM"), 'LRT', 1); $pdf->SetX(20); $pdf->Cell(80, 8, utf8_decode("Fecha Out : ") . $fechaSalida, 'LRB', 0); $pdf->Cell(80, 8, utf8_decode("Check Out : 12:00 PM"), 'LRB', 1); $pdf->SetX(20); $pdf->Cell(80, 10, utf8_decode("Clave Confirmacion : ") . $clave, 1, 0, 'L'); $pdf->MultiCell(80, 10, utf8_decode("Comfirmado por : ") . $Plan, 1, 'L'); $pdf->SetX(20); $pdf->MultiCell(160, 10, utf8_decode("Observaciones : ") . utf8_decode($otras), 1, 'L'); $pdf->SetX(20); $pdf->Cell(160, 14, utf8_decode("Le atendio : ") . $atencion, 1, 'C'); $pdf->SetY(225); $pdf->SetX(20); $pdf->SetFont('Arial', 'B', 4); $pdf->MultiCell(160, 3, utf8_decode($clasula), 0, 'J'); $pdf->Output('Venta:' . $foliovta . ' Hotel:' . $nombreHotel . ' Cliente:' . $Nombre . '.pdf', 'D'); cerrar($conexion);
$pdf->Cell(40, 5, '', 'LR', 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 1, 'C', 1); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(65, 5, '', 0, 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 1, 'C', 1); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(65, 5, '', 0, 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 0, 'C', 1); $pdf->Cell(40, 5, '', 'LR', 1, 'C', 1); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(65, 5, '', 0, 0, 'C', 1); $pdf->Cell(40, 5, strtoupper($nm_kary), 1, 0, 'C', 1); $pdf->Cell(40, 5, isset($optNmkry[$rPo['persetujuan1']]) ? strtoupper($optNmkry[$rPo['persetujuan1']]) : '', 1, 0, 'C', 1); $pdf->Cell(40, 5, isset($optNmkry[$rPo['persetujuan2']]) ? strtoupper($optNmkry[$rPo['persetujuan2']]) : '', 1, 1, 'C', 1); // $sPo="select persetujuan1,persetujuan2 from ".$dbname.".log_poht where nopo='".$nopo."'"; // $qPo=mysql_query($sPo) or die(mysql_error($conn)); // $rPo=mysql_fetch_assoc($qPo); // $pdf->SetFont('Arial','',8); // $pdf->Cell(10,4,strtoupper($_SESSION['lang']['purchaser']).": ".strtoupper($nm_kary),0,0,'L',0); // $pdf->SetFont('Arial','',8); // $pdf->Cell(130,4,isset($optNmkry[$rPo['persetujuan1']])? strtoupper($optNmkry[$rPo['persetujuan1']]): '',0,0,'R',0); // $pdf->Cell(45,4,isset($optNmkry[$rPo['persetujuan2']])? strtoupper($optNmkry[$rPo['persetujuan2']]): '',0,0,'R',0); $akrhr = $tmbhBrs5 + 10; $pdf->SetY($akhirY + $akrhr); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(10, 4, strtoupper($_SESSION['lang']['fyiGudang2']), 0, 0, 'L', 0); $pdf->Output();
$_cMargin = $pdf->cMargin; $pdf->cMargin = $prop['padding']; $pdf->SetFont($prop['thfont'][0], $prop['thfont'][1], $prop['thfont'][2]); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $cellSize = 0.01 * $width; $pdf->Cell($cellSize * 45, 6, 'Total', 0, 0, 'C', false); $pdf->Cell($cellSize * 20, 6, number_format($total['qty']), 0, 0, 'R', false); $pdf->Cell($cellSize * 15, 6, '', 0, 0, 'L', false); $pdf->Cell($cellSize * 20, 6, number_format($total['amt']), 0, 0, 'R', false); $pdf->Ln(); $pdf->Cell($cellSize * 100, 5, convertCurrency($total['amt'], getCurrencySymbol($_SESSION['company_id'])) . " only", 0, 0, 'L'); $pdf->Ln(); $pdf->cMargin = $_cMargin; } $mysqli->close(); $pdf->Output("purchase_return.pdf", "D"); } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="shortcut icon" href="../images/logo_icon.gif"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../stylesheets/style.css" rel="stylesheet" type="text/css" /> <title><?php echo $_SESSION['companyname']; ?> - Reports</title> <?php include '../includes/js.php'; ?>