本文整理匯總了PHP中FPDF::AliasNbPages方法的典型用法代碼示例。如果您正苦於以下問題:PHP FPDF::AliasNbPages方法的具體用法?PHP FPDF::AliasNbPages怎麽用?PHP FPDF::AliasNbPages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FPDF
的用法示例。
在下文中一共展示了FPDF::AliasNbPages方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* 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();
}
示例2: __construct
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;
}
示例3: FPDF
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();
}
示例4: construct
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;
}
示例5: __construct
/**
* 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);
}
示例6: crear
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>';
}
}
示例7: FPDF
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');
}
}
示例8: realpath
/**
* 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;
}
示例9: date
$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
示例10: pdf
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();
}
示例11: createPDF
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;
}
示例12: print_detail
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();
}
示例13: createpdf
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;
}
示例14: createPDF
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;
}
示例15: pdf
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();
}