function createPDF($text) { if (!isset($GLOBALS["pdf_font"])) { $GLOBALS["pdf_font"] = 'Arial'; $GLOBALS["pdf_fontsize"] = 12; } $pdf = new FPDF(); $pdf->SetCreator("PHPlist version " . VERSION); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont($GLOBALS["pdf_font"], $GLOBALS["pdf_fontstyle"], $GLOBALS["pdf_fontsize"]); $pdf->Write((int) $GLOBALS["pdf_fontsize"] / 2, $text); $fname = tempnam($GLOBALS["tmpdir"], "pdf"); $pdf->Output($fname, false); return $fname; }
public function __construct() { //require_once APPPATH.'third_party/fpdf/fpdf-1.7.php'; $pdf = new FPDF(); $pdf->AddPage('L', 'A4'); $pdf->AliasNbPages(); $CI =& get_instance(); $CI->fpdf = $pdf; }
/** * Construtor da Classe * @param type $titulo * @param type $columnsHeader * @param type $columnsWidth */ public function __construct($orientation, $titulo, $columnsHeader, $columnsWidth, $lineHeight) { parent::__construct($orientation); $this->titulo = $titulo; $this->columnsHeader = $columnsHeader; $this->columnsWidth = $columnsWidth; $this->lineHeight = $lineHeight; parent::AliasNbPages(); }
function generate_news_pdf($news) { $imagePath = $_SERVER['DOCUMENT_ROOT'] . 'news_app/uploads/news_images/'; require $_SERVER['DOCUMENT_ROOT'] . 'news_app/app/libraries/FPDF/fpdf.php'; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); // Title //$pdf->Ln(4); $pdf->Write(1, $news->title); //$pdf->Ln(10); $pdf->Image($imagePath . $news->news_image, 50, 30, 'C'); //$pdf->Ln(16); $pdf->SetFont('Arial', '', 12); $pdf->Write(5, $news->news_text); $pdf->Output(); }
function construct($svg, $data = array()) { $t = new XML_SvgToPDF(); $x = new XML_Tree_Morph($svg, array('debug' => 0, 'filter' => array('svg' => array(&$t, 'buildObject'), 'text' => array(&$t, 'buildObject'), 'tspan' => array(&$t, 'buildObject'), 'rect' => array(&$t, 'buildObject'), 'g' => array(&$t, 'buildObject'), 'path' => array(&$t, 'buildObject'), 'sodipodi:namedview' => array(&$t, 'buildNull'), 'defs' => array(&$t, 'buildNull')))); $tree = $x->getTreeFromFile(); $tree = $t->buildobject($tree); $orientation = $tree->width > $tree->height ? 'L' : 'P'; $pdf = new FPDF($orientation, 'mm', 'A4'); $pdf->open(); $pdf->setAutoPageBreak(false); $pdf->AliasNbPages(); // convert data to array. if (is_object($data)) { $data = (array) $data; } // no data page.. if (empty($data)) { $pdf->addPage(); $tree->writePDF($pdf, $data); $t->debug($tree); return $pdf; } // work out how many pages... list($var, $perpage) = $tree->calcPerPage(); if ($var == '') { die('No dynamic group found'); } if (!isset($data[$var])) { die('Incorrect dynamic group name'); } $alldata = $data[$var]; $page = 0; while (count($alldata)) { $page++; $t->debug("<B>PAGE {$page}<B>"); $page_data = array_splice($alldata, 0, $perpage); $data[$var] = $page_data; $pdf->addPage(); $tree->writePDF($pdf, $data); } $t->debug($tree); return $pdf; }
/** * Constructor method * @param $orientation Page orientation * @param $format Page format * @author Pablo Dall'Oglio */ public function __construct($orientation = 'P', $format = 'a4') { parent::__construct($orientation, 'pt', $format); $this->setLocale(); parent::SetAutoPageBreak(true); parent::SetMargins(0, 0, 0); parent::SetCreator('Adianti Studio PDF Designer'); // parent::SetTitle('Letter'); // parent::SetKeywords('www.xyz.com.br'); parent::SetFillColor(255, 255, 255); parent::Open(); parent::AliasNbPages(); parent::SetX(20); $this->replaces = array(); $this->href = ''; $this->anchors = array(); $this->orientation = $orientation; $this->format = $format; parent::SetFont('Arial', '', 10 * 1.3); }
/** * crea el pdf a partir del array de gif * @return type:nombre que tendrá el pdf */ function crear_PDF() { $this->borrar_dir(); $pdf_name = $this->rand . ".pdf"; $pdf = realpath(dirname(__FILE__)) . '\\pdf\\' . $pdf_name; $gif = realpath(dirname(__FILE__)) . '\\informes\\PDF.GIF'; $dimensions = getimagesize($gif); $opdf = new FPDF('L', 'pt', array($dimensions[1], $dimensions[0])); $opdf->SetMargins(0, 0, 0); $opdf->AliasNbPages(); $opdf->SetDrawColor(255, 255, 255); $opdf->SetFillColor(255, 255, 255); foreach ($this->array_gif as $result_ok) { $opdf->Image($result_ok); unlink($result_ok); } $opdf->Output($pdf); return $this->rand; }
function crear() { echo 'llega a modelo'; require '../fpdf/fpdf.php'; include_once '../fpdf/fpdf.php'; // Creación del objeto de la clase heredada $pdf = new FPDF(); // Cabecera de página // Logo $pdf->Image('../Vista/img/certificado/certificadoMedico.png', 5, 10, 200); // Arial bold 15 $pdf->SetFont('Arial', 'B', 15); // Movernos a la derecha $pdf->Cell(80); // Título $pdf->Cell(30, 40, 'Examenes de conduccion S.A', 0, 1, 'C'); $pdf->Cell(75); //CERTIFICA $pdf->Cell(100, 20, 'Certifica que: ', 0, 1); // Salto de línea $pdf->Ln(20); //////////////////////////////// //footer // Posición: a 1,5 cm del final $pdf->SetY(-15); // Arial italic 8 $pdf->SetFont('Arial', 'I', 8); // $pdf->Cell(0, 10, 'Aprobacion Diciembre del 2015', 0, 0, 'C'); // Número de página $pdf->Cell(0, 10, '/{nb}', 0, 0, 'C'); //Cuerpo session_start(); $nombre = $_SESSION['Nombre']; $cedula = $_SESSION['Cedula']; $apellido1; $apellido2; include_once '../DTO/ClsPaciente.php'; $examen; $nombreCompleto; $sql1; try { $sql1 = "CALL consultar_auditivo('" . $cedula . "')"; $result = parent::ejecutarSentenciaSQL($sql1); include_once '../DTO/ClsAudiometria.php'; $num_result1 = $result->num_rows; $examen = new ClsAudiometria(); if ($num_result1 == 1) { $row = $result->fetch_assoc(); $examen->setDeclaracionSalud($row['declaracion_juramentada']); $examen->setAntecedentes($row['antecedentes']); $examen->setComunicacionOral($row['comunicacion_oral']); $examen->setLecturaEscrita($row['lectura_escritura']); $examen->setOtoscopia($row['otoscopia']); $examen->setAudiometria($row['audiometria']); } $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times', '', 12); $pdf->Cell(0, 10, "La persona " . $nombre . " con cedula de ciudadania " . $cedula . " segun los siguientes criterios :", 0, 1, 'L'); //$pdf->Cell(50); $pdf->Cell(0, 10, "DECLARACION JURAMENTADA: " . $examen->getDeclaracionSalud(), 0, 1, 'C'); //$pdf->Cell(50); $pdf->Cell(0, 10, "ANTECEDENTES: " . $examen->getAntecedentes(), 0, 1, 'C'); //$pdf->Cell(50); $pdf->Cell(0, 10, "COMUNICACION ORAL: " . $examen->getComunicacionOral(), 0, 1, 'C'); //$pdf->Cell(50); $pdf->Cell(0, 10, "LECTURA ESCRITA: " . $examen->getLecturaEscrita(), 0, 1, 'C'); //$pdf->Cell(50); $pdf->Cell(0, 10, "OTOSCOPIA: " . $examen->getOtoscopia(), 0, 1, 'C'); //$pdf->Cell(50); $pdf->Cell(0, 10, "AUDIOMETRIA: " . $examen->getAudiometria(), 0, 1, 'C'); $pdf->Ln(30); $pdf->Cell(0, 10, "Aprueba el examen de AUDIOMETRIA ", 0, 1, 'C'); $pdf->Output('../Vista/Certificado/certificadoAudiometria.pdf'); //$pdf->Output(); } catch (mysqli_sql_exception $ex) { $response = '<div class="alert pdf alert-danger" role="alert">A ocurrido un error, intentelo de nuevo...' . $ex->getMessage() . '</div>'; } }
public function pdf() { require_once "./assets/lib/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('L', 'A4'); $pdf->Image('./assets/img/logo.jpg', 10, 10, 15, 0); $pdf->SetFont('Arial', 'B', 10); $pdf->setX(30); $pdf->Cell(0, 5, 'PEMERINTAH DAERAH KABUPATEN CIANJUR', 0, 0, 'L'); $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'DINAS KEBERSIHAN DAN PERTAMANAN', 0, 0, 'L'); $pdf->SetFont('Arial', '', 8); if ($this->input->get('date_from') != '' && $this->input->get('date_to') != '') { $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'Periode : ' . $this->input->get('date_from') . ' s/d ' . $this->input->get('date_to'), 0, 0, 'L'); } if ($this->input->get('kendaraan') != '') { $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'Nomor Polisi : ' . $this->general_mdl->get_from_field('kendaraan', 'id', $this->input->get('kendaraan'))->row()->nopol, 0, 0, 'L'); } $pdf->Ln(15); $pdf->Cell(0, 1, '', 'T', 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 5, 'REKAPITULASI SERVIS', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(10, 5, 'NO', 1, 0, 'C'); $pdf->Cell(20, 5, 'TANGGAL', 1, 0, 'C'); $pdf->Cell(20, 5, 'KENDARAAN', 1, 0, 'C'); $pdf->Cell(40, 5, 'TIPE', 1, 0, 'C'); $pdf->Cell(30, 5, 'KILOMETER', 1, 0, 'C'); $pdf->Cell(60, 5, 'KOMPONEN', 1, 0, 'C'); $pdf->Cell(20, 5, 'PERLAKUAN', 1, 0, 'C'); $pdf->Cell(20, 5, 'SATUAN', 1, 0, 'C'); $pdf->Cell(30, 5, 'HARGA SATUAN', 1, 0, 'C'); $pdf->Cell(0, 5, 'TOTAL HARGA', 1, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', '', 8); $result = $this->servis_rekap_mdl->pdf()->result(); $i = 1; $total = 0; foreach ($result as $r) { $pdf->Cell(10, 5, $i++, 1, 0, 'C'); $pdf->Cell(20, 5, format_dmy($r->tanggal), 1, 0, 'C'); $pdf->Cell(20, 5, $r->nopol, 1, 0, 'C'); $pdf->Cell(40, 5, $r->tipe, 1, 0, 'L'); $pdf->Cell(30, 5, $r->kilometer, 1, 0, 'C'); $pdf->Cell(60, 5, $r->komponen_lain != '' ? $r->komponen_lain : $r->komponen_nama, 1, 0, 'L'); $pdf->Cell(20, 5, $r->servis_aksi_nama, 1, 0, 'C'); $pdf->Cell(20, 5, number_format($r->satuan) . ' ' . $r->komponen_satuan_nama, 1, 0, 'R'); $pdf->Cell(30, 5, number_format($r->harga), 1, 0, 'R'); $pdf->Cell(0, 5, number_format($r->total), 1, 0, 'R'); $pdf->Ln(5); $total += $r->satuan * $r->harga; } $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(250, 5, 'Total', 1, 0, 'L'); $pdf->Cell(0, 5, number_format($total), 1, 0, 'R'); $pdf->Ln(10); $pdf->Cell(140, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mengetahui,', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(140, 5, 'Penanggung Jawab Bengkel', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mandor Armada', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(140, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(140, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'BU', 8); $pdf->Cell(140, 5, 'Rusdi Hermawan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Deden Suparman, SIP', 0, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(140, 5, 'NIP. 19610912 200701 1 002', 0, 0, 'C'); $pdf->Cell(0, 5, 'NIP. 19710316 200901 1 003', 0, 0, 'C'); $pdf->Output(); }
function fee_senior() { $date_from = $this->input->get("date_from"); $date_to = $this->input->get("date_to"); if ($date_from != '' && $date_to != '') { require_once "../assets/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('L', 'A4'); //title $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(0, 10, 'Report Absensi Moderasi HM Sampoerna', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5, 'Periode Tanggal : ' . $this->input->get('date_from') . ' s/d ' . $this->input->get('date_to'), 0, 0, 'C'); $pdf->Ln(10); //header $pdf->SetFont('Arial', 'B', 10); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(10, 14, 'No', 1, 0, 'C'); $pdf->Cell(40, 14, 'Moderator', 1, 0, 'C'); $from = date_create(format_tanggal_barat($date_from)); $to = date_create(format_tanggal_barat($date_to)); $j = 0; while ($from <= $to) { $pdf->SetXY(60 + $j, 30); $pdf->Cell(6, 7, date_format($from, "d"), 1, 0, 'C'); $pdf->SetXY(60 + $j, 37); $pdf->Cell(6, 7, date_format($from, "m"), 1, 0, 'C'); date_add($from, date_interval_create_from_date_string('1 days')); $j += 6; } $pdf->SetXY($j + 60, 30); $pdf->Cell(0, 14, 'Jumlah', 1, 0, 'C'); $pdf->Ln(14); //rows $pdf->SetFont('Arial', '', 10); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $result = moderator(); $total = 0; $i = 1; foreach ($result as $r) { if ($r[2] == 2) { $pdf->Cell(10, 7, $i++, 1, 0, 'C'); $pdf->Cell(40, 7, $r[1], 1, 0, 'L'); $from = date_create(format_tanggal_barat($date_from)); $to = date_create(format_tanggal_barat($date_to)); $j = 0; $jum = 0; while ($from <= $to) { $jumlah = $this->mdl_mod_absent->fee_senior(date_format($from, 'Y-m-d'), $r[0]); $pdf->Cell(6, 7, number_format($jumlah), 1, 0, 'C'); $jum += $jumlah; date_add($from, date_interval_create_from_date_string('1 days')); $j++; } $pdf->Cell(0, 7, number_format($jum), 1, 0, 'C'); $total += $jum; $pdf->Ln(7); } } $pdf->SetFillColor(240, 240, 240); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(50 + 6 * $j, 7, 'Total : ', 1, 0, 'R', true); $pdf->Cell(0, 7, number_format($total), 1, 0, 'C', true); $pdf->SetFont('Arial', '', 10); $this->_footer($pdf); $pdf->Output("Fee Moderasi HM Sampoerna", "I"); } else { $this->session->set_flashdata('alert', '<div class="alert alert-danger">Date Empty!!!</div>'); redirect('absent'); } }
public function print_detail($id = '') { $servis = $this->general_mdl->get_from_field('servis', 'id', $id)->row(); $servis_tipe = $this->general_mdl->get_from_field('servis_tipe', 'kode', $servis->tipe)->row(); $kendaraan = $this->general_mdl->get_from_field('kendaraan', 'kode', $servis->kendaraan)->row(); $kendaraan_tipe = $this->general_mdl->get_from_field('kendaraan_tipe', 'kode', $kendaraan->tipe)->row(); require_once "./assets/lib/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('P', 'A4'); $pdf->Image('./assets/img/logo.jpg', 12, 10, 25, 0); $pdf->SetFont('Arial', 'B', 10); $pdf->setX(35); $pdf->Cell(0, 5, 'PEMERINTAH DAERAH KABUPATEN CIANJUR', 0, 0, 'C'); $pdf->Ln(5); $pdf->setX(35); $pdf->Cell(0, 5, 'DINAS KEBERSIHAN DAN PERTAMANAN', 0, 0, 'C'); $pdf->Ln(7); $pdf->setX(40); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(20, 5, 'NOMOR', 1, 0, 'C'); $pdf->Cell(75, 5, $servis->nomor, 1, 0, 'C'); $pdf->Ln(7); $pdf->setX(40); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(95, 10, 'KARTU SEHAT KENDARAAN', 1, 0, 'C'); $pdf->Ln(12); $pdf->SetFont('Arial', '', 8); $pdf->Cell(30, 5, 'NO. MESIN', 0, 0, 'L'); $pdf->Cell(95, 5, ': ' . $kendaraan->nomes, 0, 0, 'L'); $pdf->Ln(5); $pdf->Cell(30, 5, 'TYPE SERVIS', 0, 0, 'L'); $pdf->Cell(95, 5, ': ' . $servis_tipe->nama, 0, 0, 'L'); $pdf->Ln(5); $pdf->Cell(30, 5, 'TAHUN ANGGARAN', 0, 0, 'L'); $pdf->Cell(95, 5, ': ' . date_format(date_create($servis->tanggal), 'Y'), 0, 0, 'L'); $pdf->setXY(140, 22); $pdf->Cell(30, 5, 'NO KENDARAAN', 1, 0, 'L'); $pdf->Cell(0, 5, $kendaraan->nopol, 1, 0, 'C'); $pdf->setXY(140, 27); $pdf->Cell(30, 5, 'TIPE KENDARAAN', 1, 0, 'L'); $pdf->Cell(0, 5, $kendaraan_tipe->nama, 1, 0, 'C'); $pdf->setXY(140, 41); $pdf->Cell(30, 5, 'TANGGAL', 0, 0, 'L'); $pdf->Cell(0, 5, ': ' . date_format(date_create($servis->tanggal), 'd'), 0, 0, 'L'); $pdf->setXY(140, 46); $pdf->Cell(30, 5, 'BULAN', 0, 0, 'L'); $pdf->Cell(0, 5, ': ' . date_format(date_create($servis->tanggal), 'M'), 0, 0, 'L'); $pdf->setXY(140, 51); $pdf->Cell(30, 5, 'KILOMETER', 0, 0, 'L'); $pdf->Cell(0, 5, ': ' . $servis->kilometer, 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(70, 5, 'KOMPONEN DASAR MESIN', 1, 0, 'C'); $pdf->Cell(30, 5, 'JENIS PERLAKUAN', 1, 0, 'C'); $pdf->Cell(30, 5, 'SATUAN', 1, 0, 'C'); $pdf->Cell(30, 5, 'HARGA SATUAN', 1, 0, 'C'); $pdf->Cell(0, 5, 'TOTAL HARGA', 1, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', '', 8); $result = $this->general_mdl->get_from_field('servis_detail', 'servis', $servis->nomor)->result(); $total = 0; foreach ($result as $r) { $komponen = $this->general_mdl->get_from_field('komponen', 'kode', $r->komponen)->row(); $komponen_satuan = $this->general_mdl->get_from_field('komponen_satuan', 'kode', $komponen->satuan)->row(); $aksi = $this->general_mdl->get_from_field('servis_aksi', 'kode', $r->aksi)->row(); $pdf->Cell(70, 5, $komponen->nama . ' ' . ($r->komponen_lain != '' ? ':' . $r->komponen_lain : ''), 1, 0, 'L'); $pdf->Cell(30, 5, $aksi->nama, 1, 0, 'C'); $pdf->Cell(30, 5, number_format($r->satuan) . ' ' . $komponen_satuan->nama, 1, 0, 'R'); $pdf->Cell(30, 5, number_format($r->harga), 1, 0, 'R'); $pdf->Cell(0, 5, number_format($r->satuan * $r->harga), 1, 0, 'R'); $pdf->Ln(5); $total += $r->satuan * $r->harga; } $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(160, 5, 'Total', 1, 0, 'L'); $pdf->Cell(0, 5, number_format($total), 1, 0, 'R'); $pdf->Ln(10); $pdf->Cell(80, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mengetahui,', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(80, 5, 'Penanggung Jawab Bengkel', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mandor Armada', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(80, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(80, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'BU', 8); $pdf->Cell(80, 5, 'Rusdi Hermawan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Deden Suparman, SIP', 0, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(80, 5, 'NIP. 19610912 200701 1 002', 0, 0, 'C'); $pdf->Cell(0, 5, 'NIP. 19710316 200901 1 003', 0, 0, 'C'); $pdf->Output(); }
$ref_pdf->Text(40, 284, date('d.m.Y H:i:s')); $ref_pdf->Text(90, 284, utf8_decode('Konto: Volksbank Butzbach, BLZ 51861403, Kto.-Nr: 37052')); $ref_pdf->Text(187, 284, sprintf('%d / {nb}', $ref_pdf->PageNo())); // Schriftfarbe setzen $ref_pdf->SetTextColor(0, 0, 0); } } // Laufzeit des Skriptes setzen set_time_limit(1000); // PDF-Bibliothek einbinden require_once './pdf/fpdf.php'; // alle Mitgliedernummern für die spätere Auslese ermitteln $mitgl_nr = getMitgliedsnummern(); $pdf_all = new FPDF('P', 'mm', 'A4'); // ... entspricht dem Aufruf von $pdf_all->AliasNbPages('{nb}'); // Automatischen Seitenumbruch deaktivieren $pdf_all->SetAutoPageBreak(false); // Seitenabstand definieren $pdf_all->SetMargins(25, 15, 15); foreach ($mitgl_nr as $mitglied) { // die Fluggeldkonto des Mitglieds ermitteln $data = getFluggeldkonto($mitglied['acb_nr'], $_POST['zeitraum_monat'], $_POST['zeitraum_jahr']); // es wird geprüft, ob überhaupt Daten zur Mitgliedsnummer // und dem aktuell ausgewählten Zeitraum vorliegen if (!empty($data)) { // neues PDF-Dokument erzeugen $pdf = new FPDF('P', 'mm', 'A4'); // ... entspricht dem Aufruf von $pdf->AliasNbPages('{nb}'); // Automatischen Seitenumbruch deaktivieren
public function generar_pdf($id_cor, $id_direccion_gen) { $correspondencia = $this->ivss_model->core_parcial($id_cor)->result(); $direccion_general = $this->ivss_model->ver_direccion_general_especifica($id_direccion_gen); foreach ($correspondencia as $cor_item) { $id_cor_oficio = $cor_item->id_cor; $num_control_oficio = $cor_item->num_control; $dir_origen_oficio = $cor_item->dir_origen; $remitente_oficio = $cor_item->remitente; $dir_destino_oficio = $cor_item->dir_destino; $asunto_oficio = $cor_item->asunto; $descripcion_oficio = $cor_item->descripcion; $fecha_crea_oficio = $cor_item->fecha_creacion; } $datos_director = $this->ivss_model->ver_dir_gen_especifica2($dir_destino_oficio)->result(); foreach ($datos_director as $dir) { $nombre_director = $dir->nombre_director; $resolucion_director = $dir->resolucion_director; } $this->load->library('fpdf/fpdf'); $pdf = new FPDF('P'); $pdf->AddPage(); $pdf->SetTitle("correspondencia", true); $pdf->SetFont('Arial', 'B', 16); $pdf->Image($this->config->base_url() . 'fronted/img/banner_institucional.png', 20, 8, 170); $pdf->AliasNbPages(); $pdf->SetSubject("Sistema de correspondencia"); $pdf->Image($this->config->base_url() . 'fronted/img/logogrande.png', 20, 25, 17); $pdf->SetFont('Arial', '', 9); $pdf->Text(68, 30, "REPUBLICA BOLIVARIANA DE VENEZUELA"); $pdf->Text(42, 40, "MINISTERIO DEL PODER POPULAR PARA EL PROCESO SOCIAL DEL TRABAJO"); $pdf->Text(62, 50, "INSTITUTO VENEZOLANO DE LOS SEGUROS SOCIALES"); $pdf->SetLeftMargin(20.0); $pdf->SetRightMargin(20.0); $pdf->SetFont('Arial', 'B', 12); $pdf->Text(20, 70, "OFICIO:"); $pdf->SetFont('Arial', '', 12); $pdf->Text(44, 70, $num_control_oficio); $pdf->SetFont('Arial', 'B', 12); $pdf->Text(20, 80, "PARA:"); $pdf->SetFont('Arial', 'b', 12); #$pdf->Text(44,80,strtoupper(utf8_decode($nombre_director))); $pdf->Text(44, 80, strtoupper(utf8_decode("JACINTO PEREZ BONALDE SANCHEZ"))); $pdf->SetFont('Arial', '', 12); $pdf->Text(44, 90, utf8_decode($dir_destino_oficio)); $pdf->SetFont('Arial', 'B', 12); $pdf->Text(20, 100, "DE:"); $pdf->SetFont('Arial', 'b', 12); $pdf->Text(44, 100, utf8_decode($remitente_oficio)); $pdf->SetFont('Arial', '', 12); $pdf->Text(44, 110, utf8_decode(end(explode("-", $dir_origen_oficio)))); $pdf->SetFont('Arial', 'B', 12); $pdf->Text(20, 120, "FECHA:"); $pdf->SetFont('Arial', '', 12); $pdf->Text(44, 120, $fecha_crea_oficio); $pdf->SetFont('Arial', 'B', 12); $pdf->Text(20, 130, "ASUNTO:"); $pdf->SetFont('Arial', '', 12); $pdf->Text(44, 130, utf8_decode($asunto_oficio)); $pdf->SetXY(10, 140); $pdf->SetFont('Arial', '', 10); $pdf->SetTopMargin(2.0); $pdf->SetLeftMargin(20.0); $pdf->SetRightMargin(20.0); $pdf->MultiCell(0, 7, utf8_decode($descripcion_oficio)); $pdf->SetFont('Arial', 'b', 10); $pdf->Text(93, 245, "Atentamente"); $pdf->Line(50, 264, 160, 264); #$pdf->Image($this->config->base_url().'fronted/img/FIRMADIGITAL.png',52,230,115); $pdf->SetFont('Arial', '', 10); $pdf->Text(75, 268, utf8_decode($remitente_oficio)); $pdf->SetFont('Arial', '', 10); $pdf->Text(88, 272, utf8_decode("Director general")); $pdf->SetFont('Arial', '', 10); $pdf->Text(76, 276, utf8_decode("Según resolución:" . $resolucion_director)); $pdf->Output('oficio_' . $num_control_oficio, 'I'); #tabla /* $cabecera=array('Usuario', 'Total asignados', 'Ejecutados'); $pdf->SetXY(10,30); //Seleccionamos posición $pdf->SetFont('Arial','B',10); //Fuente, Negrita, tamaño foreach($cabecera as $columna){ //Parámetro con valor 2, cabecera vertical $pdf->Cell(50,7, utf8_decode($columna),1, 0,'L'); } $pdf->SetXY(10,31); $pdf->Ln();//Salto de línea para generar otra fila $pdf->Ln();//Salto de línea para generar otra fila foreach($cabecera as $fila){ //Atención!! el parámetro valor 0, hace que sea horizontal $pdf->Cell(50,7, utf8_decode($fila),1, 0 , '' ); } */ #llave clase. }
private static function createPDF($text) { if (Config::get('pdf_font', false) !== false) { Config::setRunningConfig('pdf_font', 'Arial'); Config::setRunningConfig('pdf_fontsize', 12); } $pdf = new FPDF(); $pdf->SetCreator('PHPlist version ' . PHPLIST_VERSION); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont(Config::get('pdf_font'), Config::get('pdf_fontstyle'), Config::get('pdf_fontsize')); $pdf->Write((int) Config::get('pdf_fontsize') / 2, $text); $fname = tempnam(Config::get('tmpdir'), 'pdf'); $pdf->Output($fname, false); return $fname; }
function createpdf($id_gr) { require '../fpdf/fpdf.php'; //permite criar uma font a partir das font do windows //require('../fpdf/makefont/makefont.php'); //MakeFont('../fpdf/arial.ttf','iso-8859-1', true); if (strpos($id_gr, '-') !== false) { $grepdb = grepGetByGrNumber($id_gr); } else { $grepdb = grepGetById($id_gr); } //$grepdb = grepGetById($id_gr); $pdf = new FPDF('P', 'mm', 'A4'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, $pdf->Image('../images/eleclerc.jpg', 6, 10, 50), 0, 0, 'L'); //$pdf->Cell(0,10,utf8_decode('Guia de Reparação nº19') ,0 ,0 ,'R'); if ($grepdb['gr_number'] == "") { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['id']), 0, 0, 'R'); } else { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['gr_number']), 0, 0, 'R'); } $pdf->Ln(15); $pdf->Cell(155, 10, utf8_decode($_SESSION['morada_leclerc_pdf']), 0, 0, 'L'); $pdf->Cell(2, 10, utf8_decode('Data: ' . invertedatasemhora($grepdb['date_in'])), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['cod_postal_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('Tel: ' . $_SESSION['telefone_leclerc_pdf'] . ' Fax: ' . $_SESSION['fax_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['mail_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('NIF: ' . $_SESSION['nif_leclerc_pdf']), 0, 0, 'L'); //cliente $pdf->Ln(15); $pdf->SetFont('arial', '', 20); $pdf->Cell(0, 10, utf8_decode('Cliente'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, utf8_decode('Nome: ' . $grepdb['cl_name']), 0, 0, 'L'); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Morada: ' . $grepdb['cl_morada']), 0, 0, 'L'); $pdf->Ln(10); //o multicell permite ser só uma linha ou caso acaba a linha cria logo uma por baixo $pdf->Cell(80, 10, utf8_decode('Localidade: ' . $grepdb['cl_localidade'])); $pdf->Cell(2, 10, utf8_decode('Cod. Postal: ' . codpostalToForm($grepdb['cl_codpostal']))); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Contacto: ' . $grepdb['cl_telefone']), 0, 0, 'L'); $pdf->Ln(15); $pdf->SetFont('arial', '', 20); //artigo $pdf->Cell(0, 10, utf8_decode('Artigo'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(80, 10, utf8_decode('Marca: ' . $grepdb['art_marca'])); $pdf->Cell(2, 10, utf8_decode('Tipo: ' . $grepdb['art_type'])); $pdf->ln(10); $pdf->Cell(80, 10, utf8_decode('Modelo: ' . $grepdb['art_modelo'])); $pdf->Cell(2, 10, utf8_decode('EAN: ' . $grepdb['art_ean'])); $pdf->ln(10); $pdf->MultiCell(0, 10, utf8_decode('Nº Série: ' . $grepdb['art_numserie'])); $pdf->MultiCell(0, 10, utf8_decode('Anomalia: ' . $grepdb['art_anomalia'])); $pdf->MultiCell(0, 10, utf8_decode('Acessórios: ' . $grepdb['art_acessor'])); $pdf->MultiCell(0, 10, utf8_decode('Estética: ' . $grepdb['art_estetic'])); //$image_photo = $pdf->Image('../images/euro.jpg',$pdf->GetX(), $pdf->GetY(), 'R'); $pdf->Cell(80, 10, utf8_decode('Talão: ' . $grepdb['art_numtalao'])); $pdf->Cell(2, 10, utf8_decode('Valor: ' . $grepdb['art_valor'])); $pdf->Ln(10); if ($grepdb['art_garantie'] == 1) { $pdf->Cell(80, 10, utf8_decode('Garantia: Sim')); $pdf->Cell(2, 10, utf8_decode('Data: ' . $grepdb['art_dategar'])); } else { $pdf->Cell(0, 10, utf8_decode('Garantia: Não'), 0, 0, 'L'); } $pdf->Ln(10); if ($grepdb['art_orcamento'] == 1) { $pdf->Cell(0, 10, utf8_decode('Orçamento: Sim'), 0, 0, 'L'); } else { $pdf->Cell(0, 10, utf8_decode('Orçamento: Não'), 0, 0, 'L'); } $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('Assinatura Cliente:')); $pdf->Cell(2, 10, utf8_decode('Assinatura Funcionário:')); $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('________________')); $pdf->Cell(2, 10, utf8_decode('____________________')); return $pdf; }
function createPDF($text) { if (!isset($GLOBALS['pdf_font'])) { $GLOBALS['pdf_font'] = 'Arial'; $GLOBALS['pdf_fontsize'] = 12; } $pdf = new FPDF(); $pdf->SetCreator('PHPlist version ' . VERSION); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont($GLOBALS['pdf_font'], $GLOBALS['pdf_fontstyle'], $GLOBALS['pdf_fontsize']); $pdf->Write((int) $GLOBALS['pdf_fontsize'] / 2, $text); $fname = tempnam($GLOBALS['tmpdir'], 'pdf'); $pdf->Output($fname, false); return $fname; }
public function pdf() { require_once "./assets/lib/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('P', 'A4'); $pdf->Image('./assets/img/logo.jpg', 10, 10, 15, 0); $pdf->SetFont('Arial', 'B', 10); $pdf->setX(30); $pdf->Cell(0, 5, 'PEMERINTAH DAERAH KABUPATEN CIANJUR', 0, 0, 'L'); $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'DINAS KEBERSIHAN DAN PERTAMANAN', 0, 0, 'L'); $pdf->SetFont('Arial', '', 8); if ($this->input->get('date_from') != '' && $this->input->get('date_to') != '') { $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'Periode : ' . $this->input->get('date_from') . ' s/d ' . $this->input->get('date_to'), 0, 0, 'L'); } if ($this->input->get('kendaraan') != '') { $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'Nomor Polisi : ' . $this->general_mdl->get_from_field('kendaraan', 'kode', $this->input->get('kendaraan'))->row()->nopol, 0, 0, 'L'); } $pdf->Ln(15); $pdf->Cell(0, 1, '', 'T', 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 5, 'REKAPITULASI SERVIS KOMPONEN', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(10, 5, 'NO', 1, 0, 'C'); $pdf->Cell(110, 5, 'KOMPONEN', 1, 0, 'C'); $pdf->Cell(30, 5, 'SATUAN', 1, 0, 'C'); $pdf->Cell(0, 5, 'TOTAL HARGA', 1, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', '', 8); $result = $this->servis_komponen_rekap_mdl->pdf()->result(); $i = 1; $total = 0; foreach ($result as $r) { $pdf->Cell(10, 5, $i++, 1, 0, 'C'); $pdf->Cell(110, 5, $r->komponen_lain != '' ? $r->komponen_lain : $r->komponen_nama, 1, 0, 'L'); $pdf->Cell(30, 5, number_format($r->satuan) . ' ' . $r->komponen_satuan_nama, 1, 0, 'R'); $pdf->Cell(0, 5, number_format($r->total), 1, 0, 'R'); $pdf->Ln(5); $total += $r->total; } $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(150, 5, 'Total', 1, 0, 'L'); $pdf->Cell(0, 5, number_format($total), 1, 0, 'R'); $pdf->Ln(10); $pdf->Cell(100, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mengetahui,', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Pengelola Teknis Pemeliharaan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Pengendali Teknis Pemeliharaan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Kasi Pengangkutan Sampah', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kepala Bidang', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kebersihan Jalan dan Lingkungan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'BU', 8); $pdf->Cell(100, 5, 'Azani Anthonida, SP', 0, 0, 'C'); $pdf->Cell(0, 5, 'Pratama Nugraha E, SH, MSi', 0, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(100, 5, 'NIP. 19700606 200312 1 007', 0, 0, 'C'); $pdf->Cell(0, 5, 'NIP. 19690304 199503 1 007', 0, 0, 'C'); $pdf->Output(); }
public function pdf() { require_once "./assets/lib/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('P', 'A4'); $pdf->Image('./assets/img/logo.jpg', 10, 10, 15, 0); $pdf->SetFont('Arial', 'B', 10); $pdf->setX(30); $pdf->Cell(0, 5, 'PEMERINTAH DAERAH KABUPATEN CIANJUR', 0, 0, 'L'); $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'DINAS KEBERSIHAN DAN PERTAMANAN', 0, 0, 'L'); $pdf->SetFont('Arial', '', 8); if ($this->input->get('date_from') != '' && $this->input->get('date_to') != '') { $pdf->Ln(5); $pdf->setX(30); $pdf->Cell(0, 5, 'Periode : ' . $this->input->get('date_from') . ' s/d ' . $this->input->get('date_to'), 0, 0, 'L'); } $pdf->Ln(15); $pdf->Cell(0, 1, '', 'T', 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 5, 'REKAPITULASI ANGGARAN', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(10, 5, 'NO', 1, 0, 'C'); $pdf->Cell(30, 5, 'BULAN', 1, 0, 'C'); $pdf->Cell(50, 5, 'SALDO AWAL', 1, 0, 'C'); $pdf->Cell(50, 5, 'TOTAL PENGELUARAN', 1, 0, 'C'); $pdf->Cell(0, 5, 'SISA SALDO', 1, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', '', 8); $result = $this->anggaran_rekap_mdl->pdf()->result(); $i = 1; $total = 0; foreach ($result as $r) { $saldo_awal = $this->anggaran_rekap_mdl->get_anggaran_awal($r->tanggal) - $this->anggaran_rekap_mdl->get_pengeluaran_awal($r->tanggal); $pdf->Cell(10, 5, $i++, 1, 0, 'C'); $pdf->Cell(30, 5, $r->bulan, 1, 0, 'L'); $pdf->Cell(50, 5, number_format($saldo_awal), 1, 0, 'R'); $pdf->Cell(50, 5, number_format($r->total), 1, 0, 'R'); $pdf->Cell(0, 5, number_format($saldo_awal - $r->total), 1, 0, 'R'); $pdf->Ln(5); $total = $saldo_awal - $r->total; } $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(140, 5, 'Saldo Akhir : ', 1, 0, 'R'); $pdf->Cell(0, 5, number_format($total), 1, 0, 'R'); $pdf->Ln(10); $pdf->Cell(100, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Mengetahui,', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Pengelola Teknis Pemeliharaan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Pengendali Teknis Pemeliharaan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Kasi Pengangkutan Sampah', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kepala Bidang', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, '', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kebersihan Jalan dan Lingkungan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Cell(0, 5, 'Dinas Kebersihan dan Pertamanan', 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(100, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Cell(0, 5, 'Kabupaten Cianjur', 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'BU', 8); $pdf->Cell(100, 5, 'Azani Anthonida, SP', 0, 0, 'C'); $pdf->Cell(0, 5, 'Pratama Nugraha E, SH, MSi', 0, 0, 'C'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(100, 5, 'NIP. 19700606 200312 1 007', 0, 0, 'C'); $pdf->Cell(0, 5, 'NIP. 19690304 199503 1 007', 0, 0, 'C'); $pdf->Output(); }
public function pdf() { $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 8); $pdf->Image('public/images/logo_bomber2.jpg', 170, 15, 20); $pdf->Image('public/images/Logo-Gober.jpg', 20, 20, 30); /*==============================CABECERA DEL REPORTE =============================== */ $pdf->Cell(70, 20); $pdf->Cell(0, 2, 'REPUBLICA BOLIVARIANA DE VENEZUELA ', 0, 1); $pdf->Ln(2); $pdf->Cell(63, 2); $pdf->Cell(0, 2, 'GOBIERNO DEL ESTADO BOLIVARIANO DE MIRANDA ', 0, 1); $pdf->Cell(89, 2); $pdf->Cell(0, 5, 'COMANDANCIA ', 0, 1); $pdf->Cell(81, 0); $pdf->Cell(0, 2, 'DIVISION DE PREVENCION E ', 0, 1); $pdf->Cell(78, 0); $pdf->Cell(0, 4, 'INVESTIGACION DE SINIESTROS ', 0, 1); $pdf->Cell(87, 0); $pdf->Cell(0, 4, 'RIF. G-20002177-2 ', 0, 1); $pdf->Cell(67, 0); $pdf->Cell(0, 4, 'SOLICITUD DE CERTIFICACION DE PREVENCION ', 0, 1); $pdf->Cell(81, 0); $pdf->Cell(0, 6, 'Y CONTROL DE INCENDIO ', 0, 1); $pdf->Cell(60, 2); /*==============================CABECERA DEL REPORTE =============================== */ /*=================================DATOS DEL REPORTE ================================ */ $pdf->Cell(80, 8, 'FORMATO PARA TRAMITACION SOLO EN GENERAL ', 1, 1, 'C'); $pdf->Ln(8); $pdf->Cell(30, 8, 'EXP N: ' . $this->exp, 1); $pdf->Cell(30, 8, 'FECHA: ' . $this->fecha, 1); $pdf->Cell(50, 8, 'REG. OPERATIVO N: ' . $this->ope, 1); $pdf->Cell(40, 8, 'SOLICITUD N: ' . $this->soli, 1); $pdf->Cell(40, 8, 'DEPOSITO N: ' . $this->depo, 1); $pdf->Ln(8); $pdf->Cell(60, 8, 'FECHA DEPOSITO: ' . $this->fDepo, 1); $pdf->Cell(130, 8, 'NOMBRE DEL INMUEBLE O RAZON SOCIAL: ' . $this->inmueble, 1); $pdf->Ln(8); $pdf->Cell(190, 8, 'DIRECCION: ' . $this->dire, 1); $pdf->Ln(8); $pdf->Cell(95, 8, 'MUNICIPIO: ' . $this->muni, 1); $pdf->Cell(95, 8, 'PARROQUIA: ' . $this->parro, 1); $pdf->Ln(8); $pdf->Cell(90, 8, 'PERSONA SOLICITANTE: ' . $this->idUser, 1); $pdf->Cell(40, 8, 'C.I: ', 1); $pdf->Cell(60, 8, 'CARGO: ' . $this->cargo, 1); $pdf->Ln(8); $pdf->Cell(60, 8, 'TELEFONO: ', 1); $pdf->Cell(130, 8, 'RAMO U OBJETO DE LA RAZON SOCIAL: ' . $this->objeto, 1); $pdf->Ln(6); $pdf->Cell(190, 8, '________________________________________________________________________________________________________________________ ', 0); $pdf->Ln(7); $pdf->Cell(190, 8, 'RECAUDOS CONSIGNADOS:', 0, 'C'); $pdf->Ln(7); $pdf->Cell(24, 8, 'T. PROPIEDAD:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(33, 8, 'C. ARRENDAMIENTO:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(23, 8, 'C. IDENTIDAD:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(30, 8, 'CONST. DEPOSITO:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(23, 8, 'N CATASTRO:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Ln(9); $pdf->Cell(14, 8, 'PLANO:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(30, 8, 'N CERT ANTERIOR:', 0, 'C'); $pdf->Cell(40, 7, ' ', 1); $pdf->Cell(43, 8, 'AUTORIZACION COLEGIADA:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Cell(14, 8, 'OTROS:', 0, 'C'); $pdf->Cell(8, 7, ' ', 1); $pdf->Ln(8); $pdf->Cell(26, 8, 'OBSERVACIONES:', 0, 'C'); $pdf->Cell(14, 8, '________________________________________________________________________________________________________', 0, 'C'); $pdf->Ln(8); $pdf->Cell(24, 8, 'RECIBIDO POR:', 0, 'C'); $pdf->Cell(38, 8, '_______________________', 0, 'C'); $pdf->Cell(18, 8, 'INSIGNIA N:', 0, 'C'); $pdf->Cell(38, 8, '_______________________', 0, 'C'); $pdf->Cell(37, 8, 'FIRMA DEL SOLICITANTE:', 0, 'C'); $pdf->Cell(38, 8, '______________________', 0, 'C'); /*=================================DATOS DEL REPORTE ================================ */ $pdf->Output(); }
public function fee_month() { $date_from = $this->input->get("date_from"); $date_to = $this->input->get("date_to"); $event = $this->input->get("event"); require_once "../assets/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('L', 'A4'); //title $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(0, 10, 'Report Absensi Moderasi HM Sampoerna', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5, 'Periode Tanggal : ' . $date_from . ' s/d ' . $date_to, 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(0, 5, 'Event : ' . $this->event_model->get_event_name($this->input->get("event")), 0, 0, 'L'); $pdf->Ln(10); //header $pdf->SetFont('Arial', 'B', 8); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(10, 14, 'No', 1, 0, 'C'); $pdf->Cell(40, 14, 'Moderator', 1, 0, 'C'); $from = date_create(format_ymd($date_from)); $to = date_create(format_ymd($date_to)); $j = 0; while ($from <= $to) { $pdf->SetXY(60 + $j, 35); $pdf->Cell(6, 7, date_format($from, "d"), 1, 0, 'C'); $pdf->SetXY(60 + $j, 42); $pdf->Cell(6, 7, date_format($from, "m"), 1, 0, 'C'); date_add($from, date_interval_create_from_date_string('1 days')); $j += 6; } $pdf->SetXY($j + 60, 35); $pdf->Cell(0, 14, 'Jumlah', 1, 0, 'C'); $pdf->Ln(14); //rows $pdf->SetFont('Arial', '', 8); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $result = $this->user_event_model->get_user_month()->result(); $total = 0; $i = 1; $j = 0; foreach ($result as $r) { $pdf->Cell(10, 7, $i++, 1, 0, 'C'); $pdf->Cell(40, 7, $r->user, 1, 0, 'L'); $from = date_create(format_ymd($date_from)); $to = date_create(format_ymd($date_to)); $j = 0; $jum = 0; while ($from <= $to) { $jumlah = $this->absent_model->check_exist_month($r->user_kode, $event, date_format($from, 'Y-m-d')); $pdf->Cell(6, 7, number_format($jumlah), 1, 0, 'C'); $jum += $jumlah; date_add($from, date_interval_create_from_date_string('1 days')); $j++; } $pdf->Cell(0, 7, number_format($jum), 1, 0, 'C'); $total += $jum; $pdf->Ln(7); } $pdf->SetFillColor(240, 240, 240); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(50 + 6 * $j, 7, 'Total : ', 1, 0, 'R', true); $pdf->Cell(0, 7, number_format($total), 1, 0, 'C', true); $pdf->SetFont('Arial', '', 10); $this->_footer($pdf); $pdf->Output("Fee Moderasi HM Sampoerna", "I"); }
public function prueba() { // Instanciation of inherited class $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 8); $pdf->Image('public/images/logo_bomber2.jpg', 175, 5, 20); $pdf->Image('public/images/Logo-Gober.jpg', 20, 10, 30); /*==============================CABECERA DEL REPORTE =============================== */ $pdf->Cell(70, 20); $pdf->Cell(0, 2, 'REPUBLICA BOLIVARIANA DE VENEZUELA ', 0, 1); $pdf->Ln(2); $pdf->Cell(63, 2); $pdf->Cell(0, 2, 'GOBIERNO DEL ESTADO BOLIVARIANO DE MIRANDA ', 0, 1); $pdf->Cell(89, 2); $pdf->Cell(0, 5, 'COMANDANCIA ', 0, 1); $pdf->Cell(81, 0); $pdf->Cell(0, 2, 'DIVISION DE PREVENCION E ', 0, 1); $pdf->Cell(78, 0); $pdf->Cell(0, 4, 'INVESTIGACION DE SINIESTROS ', 0, 1); $pdf->Ln(4); /*==============================CABECERA DEL REPORTE =============================== */ /*=================================DATOS DEL REPORTE ================================ */ $pdf->Cell(50, 16, 'Oficina: ____________________ ', 0); $pdf->Cell(105, 10, utf8_decode('CONSTANCIA DE CUMPLIMIENTO DE INSPECCIÓN PERMISO PROVISIONAL '), 1); $pdf->Ln(4); $pdf->Cell(160, 8, ' ', 0); $pdf->Cell(50, 8, utf8_decode('Nº: ________________ '), 0); $pdf->Ln(10); $pdf->Cell(1, 9, utf8_decode('Se hace constar que inspectores de esta institución efectuaron una evaluacion de las condiciones de prevención y extinción de incendio en la'), 0, 1); $pdf->Cell(50, 1, utf8_decode('Razón Social: ' . $this->razonSocial), 0, 1); $pdf->Cell(19, 1, utf8_decode(''), 0); $pdf->Cell(50, 1, utf8_decode('_____________________________________________________________________________________________________________ '), 0); $pdf->Ln(5); $pdf->Cell(50, 1, utf8_decode('Ubicada en: ' . $this->ubicacion), 0, 1); $pdf->Cell(17, 1, utf8_decode(''), 0); $pdf->Cell(50, 1, utf8_decode('_____________________________________________________________________________________________ Representada por el '), 0); $pdf->Ln(5); $pdf->Cell(50, 1, utf8_decode('Ciudadano (a): ' . $this->representante), 0, 1); $pdf->Cell(20, 1, utf8_decode(' ' . $this->titular . ' ' . $this->fechaSolicitud), 0); $pdf->Cell(50, 1, utf8_decode('________________________________ titular de la cedula de identidad, ____________________ de Fecha de solicitud __________ '), 0); $pdf->Ln(6); $pdf->Cell(50, 1, utf8_decode('Fecha de Inspección: ' . $this->fechaInspeccion), 0, 1); $pdf->Cell(29, 1, utf8_decode(''), 0); $pdf->Cell(50, 1, utf8_decode('_______________, consignó ante la División de Prevención e Investigación de Siniestros del Instituto Autónomo de '), 0); $pdf->Ln(6); $pdf->Cell(50, 1, utf8_decode('de Bomberos del Estado Miranda, la documentación requerida para el otorgamiento del CERTIFICADO DE PREVENCIÓN Y CONTROL INCENDIO. '), 0); $pdf->Ln(6); $pdf->Cell(50, 1, utf8_decode('Deposito Nº: ' . $this->depositoo), 0, 1); $pdf->Cell(20, 1, utf8_decode(' ' . $this->fechaDepo . ' ' . $this->unidad), 0); $pdf->Cell(50, 1, utf8_decode('________________________________ Fecha Depósito, _______________________________ Unidades Tributarias ______________ '), 0); $pdf->Ln(6); $pdf->Cell(95, 1, utf8_decode('Expediente Nº: ' . $this->expe), 0); $pdf->Cell(95, 1, utf8_decode('Solicitud Nº: ' . $this->nSolici), 0, 1); $pdf->Cell(21, 1, utf8_decode(''), 0); $pdf->Cell(50, 1, utf8_decode('_____________________________________________ ___________________________________________________ '), 0); $pdf->Ln(6); $pdf->Cell(95, 1, utf8_decode('Inspección realizada por: ' . $this->inspector), 0); $pdf->Cell(95, 1, utf8_decode('Insignia Nº: ' . $this->nInsignia), 0, 1); $pdf->Cell(35, 1, utf8_decode(''), 0); $pdf->Cell(50, 1, utf8_decode('____________________________________ ___________________________________________________ '), 0); $pdf->Ln(20); $pdf->Cell(73, 1, utf8_decode(''), 0); $pdf->Cell(95, 6, utf8_decode('______________________________________ '), 0, 1); $pdf->Cell(90, 1, utf8_decode(''), 0); $pdf->Cell(95, 1, utf8_decode('JEFE DE OFICINA '), 0); $pdf->Ln(16); $pdf->Cell(63, 16, 'SELLO RELIEVE ', 0); $pdf->Cell(80, 10, utf8_decode('FORMATO PARA TRAMITACION SOLO EN ORIGINAL '), 1, 0, 'C'); $pdf->Ln(4); $pdf->Cell(165, 8, ' ', 0); $pdf->Cell(50, 8, utf8_decode('SELLO HUMEDO '), 0); $pdf->Ln(14); $pdf->Cell(84, 8, ' ', 0); $pdf->Cell(50, 8, utf8_decode('LEY CONTRA LA CORRUPCIÓN '), 0); $pdf->Ln(14); $pdf->SetFont('Arial', 'B', 7); $pdf->Cell(50, 4, utf8_decode('ARTICULO 60: El funcionario público que abusando de sus funciones, constriña o induzca a alguien a que dé o prometa, para sí o para otro, una suma de dinero '), 0, 1); $pdf->Cell(50, 4, utf8_decode('o cualquier otra ganancia o dádiva indebida, será penado con prision de dos(2) a seis (6) años y multa dehasta el ciencuetna por ciento (50%) del valor de la cosa '), 0, 1); $pdf->Cell(50, 4, utf8_decode('dada o prometida. '), 0, 1); $pdf->Ln(6); $pdf->Cell(50, 4, utf8_decode('ARTICULO 61: El funcionario público que por algún acto de sus funciones reciba para sí mismo o para otro, retribuciones u otra utilidad que no se le deban o cuya'), 0, 1); $pdf->Cell(50, 4, utf8_decode('promesa acepte, será penado con prisión de uno (1) a cuatro (4) años y multa de hasta el cincuenta por ciento (50%) de lo recibido o prometido. Con la misma pena '), 0, 1); $pdf->Cell(50, 4, utf8_decode('será castigado quien diere o prometiere el dinero, retribuciones u otra utilidad indicados en este artículo. '), 0, 1); $pdf->Ln(6); $pdf->Cell(50, 4, utf8_decode('CUERPO DE BOMBEROS DEL ESTADO MIRANDA: Final Avenidad Víctor Baptista, frente al Núcleo de la Universidad Simón Rodríguez, Telf. Nº 3225265, 3229814'), 0, 1); $pdf->Cell(50, 4, utf8_decode('CHARALLAVE - 0239-2491020 - GUARENAS - 0212-3699092, SAN ANTONIO - 0212-3721959-3722589 HIGUEROTE - 0234-3204220, RIO CHICO 0234-721866.'), 0, 1); $pdf->Cell(50, 4, utf8_decode('será castigado quien diere o prometiere el dinero, retribuciones u otra utilidad indicados en este artículo. '), 0, 1); $pdf->Ln(6); /*=================================DATOS DEL REPORTE ================================ */ $pdf->Output(); }
// Schriftgrad einstellen $ref_pdf->SetFont('Arial', '', 8); $ref_pdf->Text(20, 284, utf8_decode('Druckdatum:')); $ref_pdf->Text(40, 284, date('d.m.Y H:i:s')); $ref_pdf->Text(75, 284, utf8_decode('Volksbank Butzbach - IBAN: DE29 5186 1403 0000 0370 52 - BIC: GENODE51BUT')); $ref_pdf->Text(187, 284, sprintf('%d / {nb}', $ref_pdf->PageNo())); // Schriftfarbe setzen $ref_pdf->SetTextColor(0, 0, 0); } } // PDF-Bibliothek einbinden require_once './pdf/fpdf.php'; // neues PDF-Dokument erzeugen $pdf = new FPDF('P', 'mm', 'A4'); // ... entspricht dem Aufruf von $pdf->AliasNbPages('{nb}'); // Automatischen Seitenumbruch deaktivieren $pdf->SetAutoPageBreak(false); // Seitenabstand definieren $pdf->SetMargins(25, 15, 15); // die Fluggeldkonten aller Mitglieder ermitteln $data = getTabelleFluggeldkonten(); // ******************************************************** SEITE ******************************************************** // // Seite hinzufügen $pdf->AddPage(); // Kopfzeile auf der aktuellen Seite hinzufügen pdf_header($pdf); $y = 35; foreach ($data as $saldo) { $pdf->SetXY(20, $y); // Schriftgrad einstellen
public function pdfcreateAction() { require "lib/fpdf/fpdf.php"; //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial', 'I', 8); //Page number $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } $pdf = new FPDF(); $pdf->AliasNbPages(); $todate = date("D M j Y"); $time = date(" G:i:s T"); $storePhone = Mage::getStoreConfig('general/store_information/phone'); $store_email = Mage::getStoreConfig('trans_email/ident_support/email'); $freeSubTotal = Mage::getStoreConfig('carriers/freeshipping/free_shipping_subtotal'); $session = Mage::getSingleton('checkout/session')->getQuote()->getAllItems(); //print_r($session);die; $img_path = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/logo_print.gif'; $telephone = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/telephone.png'; $mail = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/mail.png'; $indianrupee = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/rupee.png'; $indian_rupee_symbol = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/total.png'; $indian_rupee = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/savings.png'; $sub_total = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/sub-total1.png'; $shipping = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/shipping.png'; $discount_image = Mage::getBaseUrl() . 'skin/frontend/default/zoffio/images/discount.png'; $store_address = Mage::getStoreConfig('general/store_information/address'); $split_store_address = explode(',', $store_address); $pdf->AddPage(); $linestyle = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 10, 'color' => array(255, 0, 0)); $pdf->Image($img_path, 10, 20, 31, 20, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); $pdf->SetX(100); $pdf->SetY(25); $pdf->SetFont('arial', 'B', 13); $pdf->Cell(180, 0, 'Quotation', 2, 2, 'C'); $pdf->Line(90, 27, 110, 27, $linestyle); $pdf->SetX(100); $pdf->SetY(25); $pdf->SetFont('arial', 'B', 11); $pdf->Cell(0, 0, $split_store_address[0], 0, 0, 'R'); $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 10, $split_store_address[1] . ',' . $split_store_address[2] . ',' . $split_store_address[3], 0, 0, 'R'); $pdf->Cell(0, 20, $split_store_address[4] . ',' . $split_store_address[5], 0, 0, 'R'); $pdf->Cell(0, 30, $split_store_address[6], 0, 0, 'R'); $pdf->Line(10, 49, 200, 49, $linestyle); $pdf->SetX(20); $pdf->SetY(38); $pdf->SetFont('arial', 'B', 9); $pdf->Cell(0, 30, 'VAT/TIN : ', 0, 0, 'L'); $pdf->SetX(25); $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 30, ' 29471119182', 0, 0, 'L'); $pdf->SetX(85); $pdf->SetFont('arial', 'B', 9); $pdf->Cell(0, 30, 'CST No: ', 0, 0, 'L'); $pdf->SetX(98); $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 30, ' 29471119182', 0, 0, 'L'); $pdf->SetX(150); $pdf->SetFont('arial', 'B', 9); $pdf->Cell(0, 30, 'PAN No : ', 0, 0, 'L'); $pdf->SetX(164); $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 30, ' AALCA1282E', 0, 0, 'L'); $pdf->Line(10, 57, 200, 57, $linestyle); $pdf->Line(10, 72, 200, 72, $linestyle); $pdf->SetFont('arial', '', 9); $pdf->SetX(20); $pdf->SetY(45); $pdf->Cell(0, 35, 'QUOTATION DATE : ', 0, 0, 'L'); $pdf->SetX(125); $pdf->Cell(0, 35, 'FOR ANY QUERIES : ', 0, 0, 'L'); $pdf->SetFont('arial', 'B', 9); $pdf->SetX(20); $pdf->SetY(50); $pdf->Cell(0, 35, $todate . ', ' . $time, 0, 0, 'L'); $pdf->SetX(127); $pdf->Image($telephone, 125, 66, 3, 3, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); $pdf->Cell(0, 35, '+91-' . $storePhone, 0, 0, 'L'); $pdf->Image($mail, 155, 66, 3, 3, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); $pdf->SetX(157); $pdf->Cell(0, 35, ' : ' . $store_email, 0, 0, 'L'); $pdf->SetX(21); $pdf->SetY(60); $pdf->SetFont('arial', '', 9); if (Mage::getSingleton('customer/session')->isLoggedIn()) { $customer = Mage::getSingleton('customer/session')->getCustomer(); $firstname = $customer->getFirstname(); } else { $firstname = 'Customer'; } $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 30, 'Dear ' . $firstname . ',', 0, 0, 'L'); //$pdf->SetX(20); $pdf->SetY(80); $pdf->Cell(0, 1, 'Thank you for your interest in buying from us. Please find the below details of your selected products', 0, 0, 'L'); $pdf->SetFont('arial', 'B', 8); //$pdf->SetX(10); $pdf->SetY(90); //$pdf->SetX(10); $pdf->Cell(7, 10, 'S.No', 1, 0, 'C'); $pdf->Cell(100, 10, 'Products', 1, 0, 'L'); $pdf->Cell(20, 10, 'SKU', 1, 0, 'C'); $pdf->Cell(20, 10, 'Price', 1, 0, 'C'); $pdf->Image($indianrupee, 152, 94, 3, 2, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); $pdf->Image($indianrupee, 197, 94, 3, 2, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); $pdf->Cell(10, 10, 'Qty', 1, 0, 'C'); $pdf->Cell(15, 10, 'Tax (%)', 1, 0, 'C'); $pdf->Cell(20, 10, 'Sub Total', 1, 1, 'L'); $j = 1; foreach ($session as $item) { if (!$item->getParentItem()) { $i = 10; $pdf->SetFont('arial', '', 9); $product_name = wordwrap($item->getName(), 15, TRUE); $font_size = 14; $decrement_step = 0.1; $line_width = 100; while ($pdf->GetStringWidth($item->getName()) > 98) { $pdf->SetFontSize($font_size -= $decrement_step); } $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $item->getSku()); $item_total = ceil($item->getPriceInclTax()) * $item->getQty(); $product_total = ceil($product->getPrice()) * $item->getQty(); $pdf->SetX(10); $pdf->Cell(7, $i, $j, 1, 0, 'C'); $pdf->Cell($line_width, 10, $item->getName(), 1, 0, 'L'); //$pdf->Cell(50,$i,$product_name, 1,0,'C'); $pdf->Cell(20, $i, $item->getSku(), 1, 0, 'C'); $pdf->Cell(20, $i, number_format($item->getPriceInclTax(), 2), 1, 0, 'C'); $pdf->Cell(10, $i, $item->getQty(), 1, 0, 'C'); if ($product->getTypeId() == 'bundle') { $pdf->Cell(15, $i, '-', 1, 0, 'C'); } else { $pdf->Cell(15, $i, number_format($item['tax_percent'], 1), 1, 0, 'C'); } $pdf->Cell(20, $i, number_format($item->getPriceInclTax() * $item->getQty(), 2), 1, 1, 'C'); $total = $total + $item->getPriceInclTax() * $item->getQty(); $saving = $saving + $product_total; $j++; } } $totals1 = Mage::getSingleton('checkout/session')->getQuote()->getTotals(); $subtotal = $totals1["subtotal"]->getValue(); $grandtotal = $totals1["grand_total"]->getValue(); if (isset($totals1['discount']) && $totals1['discount']->getValue()) { $discount = number_format($totals1['discount']->getValue(), 2); //Discount value if applied } // exit; if ($total > $freeSubTotal) { $shipping_rate = '0.00'; } else { if ($total < $freeSubTotal) { $shipping_rate = Mage::getStoreConfig('carriers/flatrate/price'); $shipping_rate = number_format($shipping_rate, 2); $totals = $grandtotal + $shipping_rate; } } $pdf->SetFont('arial', '', 10); $saving_amount = ' ' . $saving - $total; $customer_care = Mage::getStoreConfig('general/store_information/phone'); $pdf->Cell(192, 10, $pdf->Image($sub_total, 150, $pdf->GetY() + 4, 27, 3, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . number_format($total, 2), 1, 2, 'R'); //$pdf->Cell(192,10,'Sub Total:'.number_format($total,2), 1,2,'R'); $pdf->Cell(192, 10, $pdf->Image($shipping, 142, $pdf->GetY() + 4, 27, 3, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . $shipping_rate, 1, 2, 'R'); //$pdf->Cell(192,10,'Shipping & Handling: '.$shipping_rate, 1,2,'R'); if ($discount != NULL) { $pdf->Cell(192, 10, $pdf->Image($discount_image, 142, $pdf->GetY() + 4, 26, 2.5, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . $discount, 1, 2, 'R'); //$pdf->Cell(192,10,'Discount Amount: '.$discount, 1,2,'R'); } $pdf->SetFont('arial', 'B', 12); $pdf->Cell(96, 10, $pdf->Image($indian_rupee, 20, $pdf->GetY() + 3, 27, 4, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . number_format($saving_amount, 2), 1, 0, 'C'); if ($totals != NULL) { $pdf->Cell(96, 10, $pdf->Image($indian_rupee_symbol, 115, $pdf->GetY() + 3, 27, 4, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . number_format($totals, 2), 1, 0, 'C'); } else { $pdf->Cell(96, 10, $pdf->Image($indian_rupee_symbol, 115, $pdf->GetY() + 3, 27, 4, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false) . ' ' . number_format($grandtotal, 2), 1, 0, 'C'); } $pdf->SetX(5); $statement1 = 'We would be happy to fulfill your order at the earliest.'; $statement1_1 = ' Zoffio helps you save upto 60% on all your office needs and guarantees '; $statement1_2 = 'you the best quality original products'; $statement2 = 'Complete your order today so as not to lose out of the savings!'; $statement3 = 'You can also contact our customer care support team for more information.'; $pdf->SetFont('arial', '', 9); $pdf->Cell(0, 45, $statement1, 0, 0, 'L'); $pdf->SetFont('arial', '', 9); $pdf->SetX(80); $pdf->Cell(0, 45, $statement1_1, 0, 0, 'L'); $pdf->SetFont('arial', '', 9); $pdf->SetX(5); $pdf->Cell(0, 55, $statement1_2, 0, 0, 'L'); $pdf->SetFont('arial', '', 9); $pdf->SetX(5); $pdf->Cell(0, 70, $statement2, 0, 0, 'L'); $pdf->SetX(5); $pdf->Cell(0, 80, $statement3 . '- +91- ' . $customer_care, 0, 0, 'L'); $pdf->SetX(5); $pdf->Cell(0, 95, 'Best Wishes', 0, 0, 'L'); $pdf->SetX(5); $pdf->Cell(0, 105, 'Zoffio Team', 0, 0, 'L'); $pdf->SetTextColor(0, 8, 8); $pdf->SetFont('arial', '', 7); $pdf->SetY(-15); $pdf->Cell(0, -10, '(This quotation is generated from the website Zoffio.com in real time. As prices are dynamic, so please recheck the price before confirmation)', 0, 0, 'C'); $pdf->Output('Zoffio-quotation.pdf', 'D'); }
$pdf->SetY(65); $pdf->Cell(50, 10, ' Cantidad de tickets anulados: ' . $cantidad_anulados); } else { $pdf->SetFont('Arial', 'B', 14); $pdf->SetTextColor(0); $pdf->SetY(80); $pdf->Cell(10, 10, 'No hay informacion'); } } $pdf->Output(); break; case 'ver_detalle': // Creamos el PDF //Creación del objeto de la clase heredada $pdf = new FPDF(); $pdf->AliasNbPages(); //Primera página $pdf->AddPage(); $id_ticket = $_GET['id_ticket']; // Imagen de encabezado $pdf->Image("./images/banner4.jpg", 10, 0, 180, 40, "JPG", ""); // Titulo del Reporte $pdf->SetFont('Arial', 'B', 20); $pdf->SetY(45); $pdf->Cell(50, 10, 'Detalle del Ticket No. ' . $id_ticket); // Configuracion de colores $pdf->SetY(60); $pdf->SetFillColor(224, 235, 255); $pdf->SetTextColor(0); $pdf->SetDrawColor(128, 0, 0); $pdf->SetLineWidth(0.3);
public function curriculumVitae() { require_once './libs/FPDF/fpdf.php'; $candidate = $this->model->getDataCandidate(1)[0]; $name = $candidate["ASP_APE1"] . " " . $candidate["ASP_APE2"] . " " . $candidate["ASP_NOM1"] . " " . $candidate["ASP_NOM2"]; $mipdf = new FPDF(); //$mipdf->SetAutoPageBreak(true,10); $mipdf->SetFont('Times', '', 8); $mipdf->AddPage(); $mipdf->Cell(35, 45, "", 1, 0, 'C'); $mipdf->SetFont('Times', 'B', 14); $mipdf->Cell(0, 5, $name, 0, 1, 'C'); $mipdf->SetFont('Times', 'B', 10); $mipdf->Cell(40, 10); $mipdf->Cell(50, 10, "Datos personales", 0, 1, 'L'); $mipdf->SetFont('Times', '', 10); $mipdf->Cell(40, 5); $mipdf->Cell(50, 5, utf8_decode("CÉDULA: "), 0, 0, 'L'); $mipdf->Cell(0, 5, $candidate["ASP_CEDU"], 1, 1, 'L'); $mipdf->Cell(40, 5); $mipdf->Cell(50, 5, utf8_decode("ESTADO CIVIL: "), 0, 0, 'L'); $mipdf->Cell(0, 5, $candidate["ASP_ESCI"], 1, 1, 'L'); $mipdf->Cell(40, 5); $mipdf->Cell(50, 5, utf8_decode("GÉNERO: "), 0, 0, 'L'); $mipdf->Cell(0, 5, $candidate["ASP_GENE"], 1, 1, 'L'); $mipdf->Cell(40, 5); $mipdf->Cell(50, 5, utf8_decode("EMAIL: "), 0, 0, 'L'); $mipdf->Cell(0, 5, $candidate["ASP_EMAP"], 1, 1, 'L'); $mipdf->Cell(40, 5); $mipdf->Cell(50, 5, utf8_decode("TELÉFONO (S): "), 0, 0, 'L'); $mipdf->Cell(0, 5, $candidate["ASP_TEL1"] . " " . $candidate["ASP_TEL2"], 1, 1, 'L'); $mipdf->SetFont('Times', '', 8); $mipdf->AliasNbPages(); $mipdf->Ln(5); //$mipdf->sectionF(); $mipdf->Output(); }