示例#1
12
function generarPdf($num)
{
    $pdf = new FPDF('P');
    $pdf->AddPage();
    $pdf->Image('../../../public_html/imagenes/logoclaro.png', 40, 50, 120);
    $pdf->SetTitle("Notificación al denunciante", true);
    $pdf->Image('../../../public_html/imagenes/logoivss.png', 20, 7, 13);
    $pdf->SetFont('Arial', '', 6);
    //$pdf->Text(40,10,utf8_decode('hola'));
    //$nombre = "Prob".date('m-d-Y').".pdf";
    $pdf->Output("Prob{$num}.pdf", 'F');
}
示例#2
2
文件: fpdfout.php 项目: JLockerbie/BS
$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
require 'fpdf17/fpdf.php';
//create a FPDF object
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
$pdf->Image('logo.png', 10, 20, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 20);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 75, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(10, 90);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
//Output the document
$pdf->Output();
?>
 
示例#3
0
function generate_pdf($prenote)
{
    require_once 'fpdf17/fpdf.php';
    $pdf = new FPDF();
    $length = count($prenote->product);
    $pdf->Open();
    $pdf->AddPage('P', array(50, 49 + $length * 8));
    $pdf->SetFont('Arial', '', 9);
    $pdf->Image($prenote->folio . '.png', 3, 2, 35, 15, 'PNG');
    $pdf->Text(7, 20, $prenote->folio);
    $pdf->Text(5, 24, $prenote->clientName);
    $pdf->Text(5, 26, '------------------------------');
    $product = $prenote->product;
    $c = 0;
    for ($i = 0; $i < $length; $i++) {
        $pdf->Text(5, 29 + $c, utf8_decode($product[$i]->Description));
        $pdf->Text(5, 33 + $c, $product[$i]->scanCode);
        $pdf->Text(20, 33 + $c, $product[$i]->Quantity);
        $precio_cantidad = $product[$i]->Quantity * $product[$i]->Price;
        $pdf->Text(28, 33 + $c, '$' . $precio_cantidad);
        $c += 8;
    }
    $c -= 8;
    $pdf->Text(5, 35 + $c, '------------------------------');
    $pdf->Text(25, 38 + $c, $prenote->narticles);
    $pdf->Text(5, 38 + $c, '$' . $prenote->total);
    $pdf->Text(5, 42 + $c, $prenote->id_employee);
    $pdf->Text(10, 42 + $c, $prenote->employeeName);
    $pdf->Text(5, 46 + $c, $prenote->store_id);
    $pdf->Text(10, 46 + $c, $prenote->store_name);
    $pdf->Text(5, 50 + $c, $prenote->cotizationNumber);
    $pdf->Text(5, 54 + $c, $prenote->date);
    $pdf->Output($prenote->folio . '.pdf', 'F');
}
 private function CreatePDFRendering($name, $company, $file)
 {
     $pdf = new FPDF('L', 'pt', array(162, 288));
     //2.25"x4"
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 22);
     //name font style
     $pdf->Cell(0, 22, $name, 0, 1, 'C');
     //name
     $pdf->Cell(0, 10, '', 0, 1, 'C');
     //blank line
     $pdf->SetFont('Arial', 'I', 16);
     //company font style
     $pdf->Cell(0, 16, $company, 0, 1, 'C');
     //company name
     $pdf->Cell(0, 28, '', 0, 1, 'C');
     //blank line
     $pdf->Image('images/logo.png', $pdf->GetX() + 165, $pdf->GetY(), 65);
     if ($file == true) {
         //set file name to hash of object
         $fullpath = $this->savedirectory . md5(spl_object_hash($pdf)) . '.pdf';
         $pdf->Output($fullpath, 'F');
         $pdf->Close();
         $cmd = 'lpr ' . $fullpath;
         $cmdout = shell_exec($cmd);
         return $fullpath;
     } else {
         return $pdf->Output();
     }
 }
示例#5
0
 function geraEtiquetasPDF($qrcode, $qnt, $nome)
 {
     $pdf = new FPDF("P", "pt", "A4");
     $pdf->AddPage();
     $posY = 3;
     $posX = 5;
     $controle = 0;
     $qntElementos = 1;
     for ($k = 1; $k <= 80; $k += 4) {
         // linha
         for ($j = 1; $j <= 5; $j++) {
             // coluna
             $pdf->Image("../etiquetas/{$qrcode[$controle]}.png", $posX, $posY, 114, 38);
             $controle++;
             $posX += 119;
             if ($qntElementos == $qnt) {
                 $k = 80;
                 $j = 5;
             }
             $qntElementos++;
         }
         if ($posY < 748) {
             $posY += 45;
         }
         $posX = 3;
     }
     $pdf->Output("../relatorios/etiquetas/{$nome}.pdf", "F");
 }
 public function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '')
 {
     if (!isset($this->images[$file])) {
         //Retrieve only meta-information
         $a = getimagesize($file);
         if ($a === false) {
             $this->Error('Missing or incorrect image file: ' . $file);
         }
         $this->images[$file] = array('w' => $a[0], 'h' => $a[1], 'type' => $a[2], 'i' => count($this->images) + 1);
     }
     parent::Image($file, $x, $y, $w, $h, $type, $link);
 }
示例#7
0
 function getPdf($image)
 {
     require JPATH_SITE . "/components/com_flexpaper/fpdf/fpdf.php";
     $filePath = JPATH_SITE . "/components/com_flexpaper/output/certificate.pdf";
     $pdf = new FPDF('L', 'mm');
     $pdf->SetLeftMargin(0);
     $pdf->SetRightMargin(0);
     $pdf->SetTopMargin(0);
     $pdf->SetAutoPageBreak(false);
     $pdf->AddPage();
     $pdf->Image($image);
     $pdf_file = $pdf->Output($filePath, 'F');
     return $pdf_file;
 }
 function Header()
 {
     parent::SetFont($this->getFont(), '', 18);
     $this->SetTextColor(255, 255, 255);
     $this->SetFillColor($this->colorBackg[0], $this->colorBackg[1], $this->colorBackg[2]);
     //Título
     $tam = $this->w - 3;
     $pX = ($this->w - $tam) / 2;
     $this->SetX($pX);
     parent::Cell($tam, 15, $this->getTitle(), 0, 0, 'R', true);
     if ($this->getLogoHeader() != "") {
         parent::Image($this->getLogoHeader(), $pX, 11, 40);
     }
     //Salto de línea
     parent::Ln(20);
     parent::SetFont($this->getFont(), '', 10);
 }
示例#9
0
 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();
 }
示例#10
0
function create_pdf()
{
    define('FPDF_FONTPATH', 'font/');
    require 'fpdf.php';
    $unique_id = $_GET['unq'];
    $invoid = $_POST['invoid'];
    // post the form in page 2
    $invonm = $_POST['invonm'];
    // name
    $invopc = $_POST['invopc'];
    // postcode
    $invoad = $_POST['invoad'];
    // address
    $invoem = $_POST['invoem'];
    // email
    $invoph = $_POST['invoph'];
    // telephone
    $invoss = $_POST['invoss'];
    // services
    $invotl = $_POST['invotl'];
    // total
    $invode = $_POST['invode'];
    // date
    $invost = $_POST['invost'];
    // unique stamp
    // $invid = $_SESSION['invoice_id'];
    // $invnm = $_SESSION['invoice_name'];
    // $invad = $_SESSION['invoice_address'];
    // $invem = $_SESSION['invoice_email'];
    // $invpc = $_SESSION['invoice_postcode'];
    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->Image('img/logo.jpg');
    $pdf->SetFont('Arial', '', '12');
    $pdf->Cell(0, -6, 'Invoice date: ' . $invode, 0, 1, "R");
    $pdf->Cell(0, -6, 'UIS: ' . $invost, 0, 1, "R");
    $pdf->Cell(0, 24, '', 0, 1, "L");
    $pdf->Cell(0, 6, 'Customer Name: ' . $invonm, 0, 1, "L");
    $pdf->Cell(0, 6, 'Address: ' . $invoad, 0, 1, "L");
    $pdf->Cell(0, 6, 'Postcode: ' . $invopc, 0, 1, "L");
    $pdf->Cell(0, 6, 'Telephone: ' . $invoph, 0, 1, "L");
    $pdf->Output();
}
示例#11
0
 public function download($page = 'noticeview')
 {
     define('FPDF_FONTPATH', APPPATH . 'plugins/fpdf/font/');
     require APPPATH . 'plugins/fpdf/fpdf.php';
     $this->load->helper('url');
     if (!file_exists(APPPATH . '/views/noticeboard/' . $page . '.php')) {
         show_404();
     }
     $data['title'] = ucfirst($page);
     // Capitalize the first letter
     $data['name'] = "Nayeem";
     $id = $_GET['id'];
     $file = base_url() . 'uploads/' . $id . '.jpg';
     $type = ".jpg";
     if (@getimagesize($file)) {
         $size = getimagesize($file);
     } else {
         $type = ".png";
         $file = base_url() . 'uploads/' . $id . '.png';
         $size = getimagesize(base_url() . 'uploads/' . $id . '.png');
     }
     //$pdf = new FPDF('p','mm',array(210,300));
     if ($size[0] > $size[1]) {
         $style = 'l';
     } else {
         $style = 'p';
     }
     $pdf = new FPDF($style, 'pt', array($size[0] * 3 / 4, $size[1] * 3 / 4));
     $pdf->AddPage();
     $pdf->setDisplayMode('fullpage');
     //$pdf -> Image(base_url().'uploads/'.$id.'.png',20,20,170,260);
     $pdf->Image(base_url() . 'uploads/' . $id . "" . $type, 0, 0, 0, 0);
     // $pdf -> setFont ('times','B',20);
     // $pdf -> cell(200,30,"Title",0,1);
     $pdf->setFont('times', 'B', '20');
     $pdf->write(10, "{$size['0']}, {$size['1']}");
     $pdf->output($id . '.pdf', 'D');
     //header('Location: ' .base_url(). 'index.php/noticeview/show?id='.$id);
 }
示例#12
0
$pdf->Ln(5);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(189, 10, $row['endereco'], L, 0, 'L');
$pdf->Cell(1, 10, '', R, 0, 'L');
$pdf->Ln(9);
$pdf->Cell(190, 1, '', B, 0, 'L');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Ln(1);
$pdf->Cell(20, 10, 'Parcela', 1, 0, 'C');
$pdf->Cell(25, 10, 'Data Venc.', 1, 0, 'C');
$pdf->Cell(25, 10, 'Valor Da Parc.', 1, 0, 'C');
$pdf->Cell(25, 10, 'Multa', 1, 0, 'C');
$pdf->Cell(25, 10, 'Juros', 1, 0, 'C');
$pdf->Cell(30, 10, 'Desconto', 1, 0, 'C');
$pdf->Cell(40, 10, 'Total', 1, 0, 'C');
$pdf->SetFont('Arial', '', 9);
$pdf->Ln(10);
$pdf->Cell(20, 10, '0', 0, 0, 'C');
$pdf->Cell(25, 10, '06/04/2015', 0, 0, 'C');
$pdf->Cell(25, 10, 'R$ 512,00', 0, 0, 'C');
$pdf->Cell(25, 10, 'R$ 0,00', 0, 0, 'C');
$pdf->Cell(25, 10, 'R$ 0,00', 0, 0, 'C');
$pdf->Cell(30, 10, 'R$ 12,00', 0, 0, 'C');
$pdf->Cell(40, 10, 'R$ 500,00', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Ln(85);
$pdf->Image('../fpdf/img/barras.png', 10, 180, 110);
$pdf->Cell(190, 1, '', B, 0, 'L');
$pdf->Image('../fpdf/img/corpo.png', 10, 200, 190, 70);
$pdf->Image('../fpdf/img/barras.png', 10, 270, 110);
$pdf->Output();
<?php

require '../pdf/fpdf.php';
require '../conexion.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(4, 10, '', 0);
$pdf->Image('../logo/logo.png', 10, 9.5, 12, 12, 'png');
$pdf->Cell(10, 8, '', 0);
$pdf->Cell(150, 10, 'Merino Entreprise S.L.', 0);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(50, 10, 'Fecha: ' . date('d-m-Y') . '', 0);
$pdf->Ln(18);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(70, 8, '', 0);
$pdf->Cell(100, 8, 'USUARIOS DE BAR MERI', 0);
$pdf->Ln(13);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(30, 8, 'USUARIO', 1, 0, "C");
$pdf->Cell(30, 8, 'NOMBRE', 1, 0, "C");
$pdf->Cell(30, 8, 'APELLIDOS', 1, 0, "C");
$pdf->Cell(45, 8, 'EMAIL', 1, 0, "C");
$pdf->Cell(25, 8, 'TIPO', 1, 0, "C");
$pdf->Cell(30, 8, 'FECHA NACIMIENTO', 1, 0, "C");
$pdf->Ln(8);
$pdf->SetFont('Arial', '', 8);
//CONSULTA
$result = $connection->query("SELECT * FROM usuarios;");
$totalli = 0;
$total = 0;
示例#14
0
// setting jenis font Times New Roman, standard, size 12
    $pdf->SetFont('Times','',12);

// cell berukuran 20tinggi_awal10 mm, tanpa border, teks berikutnya akan
// diletakkan di bawah teks ini, posisi teks center dalam cell
/*
    $pdf->Cell(100,100,"Text inside first column",1,0,'L');
    $pdf->SetX($pdf->GetX() - 100);
    $pdf->Cell(35,35,'Text inside second column ',1,0,'C');*/

    $tinggi_awal = 20;
    $tinggi_tengah = 60;
    $lebar_awal = 60;
    $lebar_total = 180;

    $pdf->Cell($lebar_awal,$tinggi_awal,$pdf->Image('assets/img/logoairnav.jpg',13,12,14),1,0,'L');
    $pdf->SetX($pdf->GetX() - 40);
    $pdf->Cell(40,$tinggi_awal,"Airnav Indonesia",0,0,'L');

    $pdf->Cell(120,$tinggi_awal,'Teks 1',1,1,'R');
    $pdf->Cell($lebar_total,$tinggi_awal,'Teks 1',1,1,'C');
    $pdf->Cell($lebar_awal,$tinggi_tengah,'Teks 1',1,0,'L');
    $pdf->Cell(90,$tinggi_tengah,'Teks 1',1,0,'L');
    $pdf->Cell(30,$tinggi_tengah,'Teks 1',1,1,'L');
    $pdf->Cell($lebar_total,$tinggi_awal,'Teks 1',1,1,'L');
    $pdf->Cell($lebar_awal,$tinggi_tengah,'Teks 1',1,0,'L');
    $pdf->Cell(($lebar_total-$lebar_awal),$tinggi_tengah,'Teks 1',1,1,'L');
/* cell berukuran 40tinggi_awal10 mm, dengan border, teks berikutnya akan
// diletakkan pada posisi awal baris berikutnya, teks berada di kanan
// dalam cell
    $pdf->Cell(40,10,'Teks 2',1,1,'R');
示例#15
0
文件: label.php 项目: HQPDevCrew/BPU
<?php

/**
 * Created by PhpStorm.
 * User: Kent
 * Date: 02/08/2016
 * Time: 12:12 PM
 */
define('FPDF_FONTPATH', dirname(__FILE__) . '/font');
require_once 'config.php';
function __autoload($class_name)
{
    include APP_CLASSES . "{$class_name}.class.php";
}
$html = new HTML();
if (isset($_GET['ref'])) {
    $ref = $_GET['ref'];
} else {
    $html->redirection("shipitem.php");
}
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Image("api/labels/{$ref}.png", 5, 5, -300);
$pdf->Output();
示例#16
0
文件: index.php 项目: apelburg/test
$pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер

$pdf->Cell(10,20,'',0,1,'l');
$pdf->ln(0);
$pdf->Cell(10,5,'',0,0,'l');

$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,5,'Дата составления заявки',1,0,'l');
$pdf->SetTextColor(22,50,255); // синий
$pdf->Cell(90,5,date("d-m-Y",time()),1,0,'l');
$pdf->ln(5);
$pdf->Cell(10,30,'',0,0,'l');

$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,25,'Название фирмы',1,0,'l');
$pdf->Image('logo.jpg',80,37,'70','');
$pdf->Cell(90,25,'',1,0,'l');

$pdf->ln(20);
$pdf->Cell(10,5,'',0,0,'l');
$pdf->Cell(50,5,'Контактное лицо',1,0,'l');
$pdf->SetFont('ArialMT','',8); // задаем шрифт и его размер
$pdf->SetTextColor(0,0,0); // чёрный
$pdf->Cell(90,5,$user_name.' '.$user_last_name,1,0,'l');
$pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер
$pdf->ln(5);
$pdf->Cell(10,5,'',0,0,'l');
$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,5,'Телефон',1,0,'l');
$pdf->SetTextColor(22,50,255); // синий
$pdf->Cell(90,5,''.$phone.'(812) 438-00-55',1,0,'l');
示例#17
0
     $column_tanggalpinjam = $column_tanggalpinjam . $tanggal_pinjam . "\n";
     //3
     $column_tanggalharuskembali = $column_tanggalharuskembali . $tanggal_harus_kembali . "\n";
     //4
     $column_tanggalkembali = $column_tanggalkembali . $tanggal_kembali . "\n";
     //5
     $column_denda = $column_denda . $denda . "\n";
     //6
     $column_keterlambatan = $column_keterlambatan . $keterlambatan . "\n";
     //7
     //Create a new PDF file
     $pdf = new FPDF('P', 'mm', array(210, 297));
     //L For Landscape / P For Portrait
     $pdf->AddPage();
     //Menambahkan Gambar
     $pdf->Image('logo.png', 5, 11, -275);
     $pdf->SetFont('Arial', 'B', 13);
     $pdf->Cell(80);
     $pdf->Cell(30, 10, '', 0, 0, 'C');
     $pdf->Ln();
     $pdf->Cell(80);
     $pdf->Cell(30, 10, 'LAPORAN DENDA', 0, 0, 'C');
     $pdf->Ln();
 }
 //Fields Name position
 $Y_Fields_Name_position = 30;
 //First create each Field Name
 //Gray color filling each Field Name box
 $pdf->SetFillColor(204, 153, 0);
 //Bold Font for Field Name
 $pdf->SetFont('Arial', 'B', 8);
示例#18
0
 public function get_receipt($transaction_id)
 {
     $this->load->library('fpdf');
     $transaction_details = $this->get_transaction($transaction_id);
     $this->load->model('User_model');
     $this->User_model->initialize($transaction_details['user_id']);
     $user_details = $this->User_model->get('*');
     //lookup profile
     $profile_details = $this->get_profile($transaction_details['profile_id'], 'billingperiod, amount, taxamt');
     //lookup subscription
     $subscription_details = $this->get_subscription_by_transaction($transaction_id);
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->AddPage();
     $pdf->SetAuthor('ESCTT Inc.');
     $pdf->SetTitle('Invoice');
     $pdf->Image('http://v1.riskmp.com/assets/images/logo.png', 10, 10, 35, 19, '', 'http://v1.riskmp.com/');
     $pdf->SetXY(50, 10);
     $pdf->SetFont('Arial', 'B', 40);
     $pdf->Cell(100, 20, 'Receipt');
     $address_x = $pdf->GetX();
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'ESCTT Inc.');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, '131 Bloor Street West');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Suite 200/318');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Toronto, ON M5S 1R8');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Business # ' . BUSINESS_NUMBER);
     $pdf->SetXY(10, 40);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(10, 'Client: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(10, $user_details['first_name'] . " " . $user_details['last_name']);
     $pdf->set_field_title_font($pdf);
     $pdf->SetX(140);
     $pdf->Write(10, 'Generated on: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(10, date("Y-m-d"));
     $pdf->Ln(16);
     $pdf->SetFont('Arial', 'B', 18);
     $pdf->Write(6, 'Transaction Details');
     $pdf->Ln(6);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Transaction ID: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $transaction_id);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Order Time: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $transaction_details['order_time']);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Payment Method: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, 'Credit Card');
     $pdf->Ln(16);
     $pdf->SetFont('Arial', 'B', 18);
     $pdf->Write(6, 'Purchase Details');
     $pdf->Ln(4);
     //set table header and body fonts
     $thfont = array('family' => 'Arial', 'style' => 'B', 'size' => 11);
     $tbfont = array('family' => 'Arial', 'style' => '', 'size' => 11);
     $pdf->Ln(4);
     $twidth = array(150, 50);
     //column widths
     $theader = array('Item', 'Amount');
     //column titles
     $tdata = array(array('RiskMP Membership @ 1 ' . $profile_details['billingperiod'], '$' . $profile_details['amount']), array('Tax', '$' . $profile_details['taxamt']), array('Grand Total', '$' . number_format(floatval($profile_details['amount']) + floatval($profile_details['taxamt']), 2, '.', '')));
     $pdf->create_table($theader, $tdata, $twidth, 'L', 'L', $thfont, $tbfont);
     //add table to pdf document
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Subscription Start Date: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $subscription_details['date_of_redemption']);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Subscription Expiry Date: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $subscription_details['expiry_date']);
     return $pdf;
 }
    $attente = 1;
}
///**********ECRITURE DU COURRIER
/* initialisation/configuration de la classe*/
$courrier = new FPDF();
//font declaration des polices !
$courrier->AddFont('SourceSansPro-Regular', '', 'SourceSansPro-Regular.php');
$courrier->AddFont('SourceSansPro-Semibold', '', 'SourceSansPro-Semibold.php');
$courrier->AddFont('SourceSansPro-LightItalic', '', 'SourceSansPro-LightItalic.php');
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->open();
$courrier->SetAutoPageBreak(1, 15);
$courrier->AddPage();
/* Création bloc emetteur */
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->Image($logo, 5, 10, 45, 27);
$courrier->Ln(20);
$courrier->SetXY(55, 15);
$courrier->Cell(0, 5, $emetteur['nom'], 0, 2, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(55);
$courrier->MultiCell(0, 5, $emetteur['adr'], 0, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(55);
$courrier->MultiCell(0, 5, $emetteur['cp'] . " " . $ville, 0, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->Ln(20);
/* Création bloc destinataire */
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->SetX(120);
$courrier->Cell(0, 5, $destinataire['nom'], 0, 1, 'L', false);
<?php

include 'fpdf153/fpdf.php';
include 'seguridad.php';
include 'seguridad_usu.php';
include 'conectaBD.php';
$correo = $_SESSION["usuario"];
$id = $_REQUEST[id];
$usuario = ejecutaConsulta("Select * from usuario where id='{$id}' and correo='{$correo}';");
$nombre = html_entity_decode(pg_result($usuario, 0, 'nombre'));
$ape1 = html_entity_decode(pg_result($usuario, 0, 'ape1'));
$linea = $nombre . " " . $ape1;
$pdf = new FPDF(L, cm, A4);
$pdf->AddPage();
$pdf->SetFont('Arial', '', 16);
$pdf->Image('img/certifCastellano.jpg', 0, 0, 29.7, 21);
$pdf->MultiCell(27.7, 16, $linea, 0, C);
$pdf->Output('certificado.pdf', I);
示例#21
0
<?php

ini_set('display_errors', 1);
require_once "../wp-load.php";
$idProduct = $_REQUEST['idProduct'];
$product = get_post($idProduct);
// print_r($product);
// exit();
require_once "fpdf.php";
$pdf = new FPDF("P");
// L = mode paysage
$pdf->AddPage();
$pdf->SetAutoPageBreak(true, 0);
////////////////////////////////////////////////////////////
// HEADER
$pdf->Image("http://www.coinkeychain.com/wp-content/uploads/2013/12/header-pdf.jpg", 0, 0, 210, 35);
$startY = 45;
// POLICE
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'BU', '14');
////////////////////
// POSITION DE DEPART
// $pdf->Ln(10); // Saut de ligne
$pdf->setX(10);
$pdf->setY($startY);
////////////////////
// TITRE
$pdf->SetFontSize('14');
$pdf->Cell(0, 0, $product->post_title, '', 0, 'C');
////////////////////
$images = rwmb_meta('PRODUCT_first_image', 'type=image&size=large', $idProduct);
示例#22
0
$id = $_GET["id"];
$fecha = $_GET["fecha"];
$proveedor = utf8_decode($_GET["proveedor"]);
$idproveedor = $_GET["idproveedor"];
$tipo = $_GET["tipo"];
$encargado = utf8_decode($_GET["encargado"]);
$identrada = $_GET["identrada"];
$totalsiniva = $_GET["totalsiniva"];
$iva = $_GET["iva"];
$totalconiva = $_GET["totalconiva"];
$consulta = mysql_query("SELECT valor,tb_productos.nombre as nombre, cantidad,tr_productos_entradas.id_producto as id " . "FROM tr_productos_entradas,tb_productos,tb_usuarios WHERE id_entrada='{$identrada}' " . "and tr_productos_entradas.id_producto=tb_productos.id_producto and proveedor=cc");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetMargins(30, 25, 30);
$pdf->SetFont('Arial', '', 10);
$pdf->Image('../images/aseoblanco.jpg', 30, 30, 70);
$pdf->SetXY(29, 10);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(0, 100, 'Proveedor:', 0, 0, 'L');
$pdf->SetXY(50, 10);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 100, $proveedor, 0, 0, 'L');
if ($tipo == "Factura") {
    $pdf->SetXY(126, 30);
    $pdf->Cell(1, 10, $tipo, 0, 0, 'R');
    $pdf->SetXY(124, 40);
    $pdf->Cell(1, 10, 'Fecha', 0, 0, 'R');
    $pdf->SetXY(119, 55);
    $pdf->SetFont('Arial', 'B', 10);
    $pdf->Cell(1, 10, 'Nit:', 0, 0, 'R');
    $pdf->SetFont('Arial', '', 10);
示例#23
0
 //display date
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(20, 5, date("Y/m/d"), 0, 1, "C");
 //add new row
 $pdf->Cell(210, 5, '', 0, 1, "C");
 //Explora academy title
 $pdf->SetFont('Helvetica', '', 25);
 $pdf->Cell(200, 15, 'Explora Academy of Design', 0, 1, "C");
 //add new row
 $pdf->Cell(210, 5, '', 0, 1, "C");
 $pdf->SetFont('Arial', '', 12);
 $pdf->SetTextColor(0, 0, 0);
 //nata and all 3 courses
 $pdf->Cell(80, 5, '', 0, 0, "C");
 if (strtoupper($course) == "NATA") {
     $pdf->Cell(10, 5, $pdf->Image($image12, $pdf->GetX(), $pdf->GetY(), 10, 5), 1, 0, 'L', false);
     $pdf->Cell(15, 5, 'NATA', 0, 1, "C");
 } else {
     $pdf->Cell(10, 5, '', 1, 0, "C");
     $pdf->Cell(15, 5, 'NATA', 0, 1, "C");
 }
 $pdf->Cell(1, 1, '', 0, 1, "C");
 $pdf->Cell(210, 4, '', 0, 1, "C");
 $pdf->SetFont('Arial', '', 12);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell(80, 0, '', 0, 0, "C");
 if (strtoupper($course) == "INTERIOR DESIGN") {
     $pdf->Cell(10, 5, $pdf->Image($image12, $pdf->GetX(), $pdf->GetY(), 10, 5), 1, 0, 'L', false);
     $pdf->Cell(41, 5, 'INTERIOR DESIGN', 0, 1, "C");
 } else {
     $pdf->Cell(10, 5, '', 1, 0, "C");
示例#24
0
//$con=mysql_connect("localhost","root","");
//mysql_select_db("ciisa",$con);
include "../config/funciones_generales.php";
require 'pdf/fpdf.php';
include 'CNumeroaLetra.php';
include "../config/variables.php";
@mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME);
$factura = $_GET['id'];
$fac = new FPDF();
//$fac->AliasNbPages();
$fac->AddPage();
$fac->SetFont('Arial', '', 8);
//$fac->Image('PrintFormatos20100715210214.jpg',1,1 , 200);
$fac->Image('../images/' . CONFIG("EMP_LOGO") . '', 10, 10, 35, 20);
$fac->Image('../images/shcp.jpg', 165, 10, 35, 20);
$fac->setXY(50, 10);
//$aux=str_replace("\r\n", "<br>", CONFIG("EMP_DATOS_FISCALES"));
//$fac->Cell(100,0, $aux);
/*
$fac->SetFont('Arial','',6);
$fac->setXY(50,13);
$fac->Cell(100,0,'RFC: CII910918NSA');
$fac->setXY(50,16);
$fac->Cell(100,0,'Matriz: Monterrey, Nuevo León, Vancouver 152,');
$fac->setXY(50,19);
$fac->Cell(100,0,'Col. Vista Hermosa, C.P. 64620, Tel. +52 (81) 1257 8000');
$fac->setXY(50,22);
$fac->Cell(100,0,'Sucursal Saltillo, Coah. Blvd. Venustiano Carranza 3985, ');
$fac->setXY(50,25);
示例#25
0
 /**
  * See FPDF-Documentation ;-)
  */
 function Image($file, $x, $y, $w = 0, $h = 0, $type = '', $link = '')
 {
     parent::Image($file, $x, $y, $w, $h, $type, $link);
     if ($this->_intpl) {
         $this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file];
     } else {
         $this->_res['page'][$this->page]['images'][$file] =& $this->images[$file];
     }
 }
示例#26
0
while (@($row = mysql_fetch_assoc($dataquery))) {
    array_push($data_tabel, $row);
    $no++;
}
// sertakan library FPDF dan bentuk objek
$pdf = new FPDF();
$pdf->AddPage('L', 'A4');
// tampil judul laporan
$pdf->SetFont('Arial', '', '12');
$pdf->Cell(0, 5, '', 0, 1, 'C');
$pdf->Cell(0, 5, 'RUMAH SAKIT BERSALIN "BUAH DELIMA" ', 0, 1, 'C');
$pdf->Cell(0, 5, 'IKATAN BIDAN INDONESIA KABUPATEN SIDOARJO ', 0, 1, 'C');
$pdf->SetFont('Arial', '', '10');
$pdf->Cell(0, 5, 'Jl. Sunandar Priyo Sudarmo No.154 Telp. (031) 8056911', 0, 1, 'C');
$pdf->Cell(0, 5, 'Sidoarjo - Jawa Timur - Indonesia', 0, 1, 'C');
$pdf->Image('../_pwi/_assets_cetak_pdf/rsbbd_01.jpg', 58, 12, 25, 25);
// tampil garis line
$pdf->Line(45, 38, 250, 38);
$pdf->Line(45, 39, 250, 39);
$pdf->Ln();
$pdf->Cell(0, 5, '', 0, 1, 'C');
$pdf->Cell(0, 5, 'Laporan Ganti Jadwal Pegawai Tetap, Bulan ' . $bln . ' Tahun ' . $tahun, 0, 1, 'C');
$pdf->Ln();
$pdf->Cell(0, 5, 'Gedung Rawat Inap Dan UGD', 0, 1, 'C');
$pdf->Ln();
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->Cell(1, 7, '', '', 0, 'L');
#buat header tabel
foreach ($tabel_anggota as $kolom) {
    $pdf->Cell($kolom['length'], 7, $kolom['label'], 1, '0', $kolom['align'], true);
示例#27
0
<?php

$maindir = "../../";
require_once $maindir . "fpdf/fpdf.php";
require $maindir . "conexion/config.inc.php";
$idFolio = $_GET['id1'];
$query = $db->prepare("SELECT folios.NroFolio, folios.PersonaReferente, folios.UnidadAcademica, unidad_academica.NombreUnidadAcademica, folios.Organizacion, \n\t    organizacion.NombreOrganizacion, folios.TipoFolio,DATE(folios.FechaEntrada) as FechaEntrada, folios.FechaCreacion, folios.UbicacionFisica, \n\t\tubicacion_archivofisico.DescripcionUbicacionFisica ,folios.Prioridad  ,prioridad.DescripcionPrioridad, folios.DescripcionAsunto \n    \tFROM folios INNER JOIN ubicacion_archivofisico ON folios.UbicacionFisica = ubicacion_archivofisico.Id_UbicacionArchivoFisico \n    \tINNER JOIN prioridad ON folios.Prioridad = prioridad.Id_Prioridad \n    \tLEFT JOIN unidad_academica ON folios.UnidadAcademica = unidad_academica.Id_UnidadAcademica \n    \tLEFT JOIN organizacion ON folios.Organizacion = organizacion.Id_Organizacion \n    \tWHERE NroFolio = :NroFolio");
$query->bindParam(":NroFolio", $idFolio);
$query->execute();
$result = $query->fetch();
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 18);
$pdf->Image($maindir . 'assets/img/lucen-aspicio.png', 50, 30, 200, 200, 'PNG');
$pdf->Image($maindir . 'assets/img/logo_unah.png', 10, 5, 20, 35, 'PNG');
$pdf->Image($maindir . 'assets/img/logo-cienciasjuridicas.png', 170, 8, 35, 35, 'PNG');
$pdf->Cell(18, 10, '', 0);
$pdf->Cell(120, 10, '			Reporte de Seguimientos del Folio', 0);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(50, 10, 'Hoy: ' . date('Y-m-d') . '', 0);
$pdf->Ln(10);
$pdf->Cell(115, 8, '                            Folio: ' . $idFolio, 0);
$pdf->Ln(5);
if ($result['TipoFolio'] == 0) {
    $tipo = "Folio de entrada";
} elseif ($result['TipoFolio'] == 1) {
    $tipo = "Folio de salida";
}
$pdf->Cell(120, 8, '                            Tipo de Folio: ' . $tipo, 0);
$pdf->Ln(5);
$pdf->Cell(125, 8, '                            Descripcion: ' . $result['DescripcionPrioridad'], 0);
    $study_type = "zao";
}
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Alexandr Slovinskiy');
$pdf->SetTitle('Order Annex');
//set font for the entire document
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '');
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage('L');
$pdf->SetDisplayMode(real, 'default');
//display the title with a border around it
//Set x and y position for the main text, reduce font size and write content
$pdf->Image('img/form_1-12-2.jpg', 10, 15, 280);
$pdf->SetFontSize(9);
$pdf->SetXY(261, 29.5);
$pdf->Write(5, $_POST["order_number"]);
$pdf->SetXY(197.5, 37);
$pdf->Write(5, $_POST["day"]);
$pdf->SetXY(205, 37);
$pdf->Write(5, $_POST["month"]);
$pdf->SetXY(225.4, 37);
$pdf->Write(5, substr($_POST["year"], 2, 2));
$pdf->SetXY(196, 63);
if ($_POST["search_finance"] == 'b') {
    $pdf->Write(5, "за державним замовленням");
}
if ($_POST["search_finance"] == 'c') {
    $pdf->Write(5, "за рахунок коштів фізичних, юридичних осіб");
示例#29
-1
 public function post_handler()
 {
     global $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $fy = FormLib::get('fy');
     $per_page = FormLib::get('per_page');
     $custdata = new CustdataModel($dbc);
     $meminfo = new MeminfoModel($dbc);
     $query = $dbc->prepare('
         SELECT p.cardno,
             p.cash_pat,
             m.zip,
             p.check_number
         FROM patronage AS p
             INNER JOIN meminfo AS m ON p.cardno=m.card_no
             INNER JOIN custdata AS c ON p.cardno=c.CardNo AND c.personNum=1
         WHERE p.FY=?
         ORDER BY m.zip,
             c.LastName,
             c.FirstName');
     $result = $dbc->execute($query, array($fy));
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->SetMargins(6.35, 6.35, 6.35);
     // quarter-inch margins
     $pdf->SetAutoPageBreak(false);
     $filename = '';
     $this->files = array();
     $filenumber = 1;
     set_time_limit(0);
     while ($w = $dbc->fetch_row($result)) {
         if (empty($filename)) {
             $filename = $filenumber . '-' . substr($w['zip'], 0, 5);
         }
         $dbc = FannieDB::get($FANNIE_OP_DB);
         $custdata->CardNo($w['cardno']);
         $custdata->personNum(1);
         $custdata->load();
         $meminfo->card_no($w['cardno']);
         $meminfo->load();
         if ($w['check_number'] == '') {
             $patronage = new PatronageModel($dbc);
             $patronage->cardno($w['cardno']);
             $patronage->FY($fy);
             $number = GumLib::allocateCheck($patronage, false);
             $dbc = FannieDB::get($FANNIE_OP_DB);
             $patronage->check_number($number);
             $patronage->save();
             $w['check_number'] = $number;
         }
         $pdf->AddPage();
         $pdf->Image('rebate_body.png', 10, 0, 190);
         $check = new GumCheckTemplate($custdata, $meminfo, $w['cash_pat'], 'Rebate ' . $fy, $w['check_number']);
         $check->renderAsPDF($pdf);
         if ($pdf->PageNo() == $per_page) {
             $filename .= '-' . substr($w['zip'], 0, 5) . '.pdf';
             $filenumber++;
             $pdf->Output('/tmp/' . $filename, 'F');
             $this->files[] = $filename;
             $filename = '';
             $pdf = new FPDF('P', 'mm', 'Letter');
             $pdf->SetMargins(6.35, 6.35, 6.35);
             // quarter-inch margins
             $pdf->SetAutoPageBreak(false);
         }
     }
     $filename .= '-End.pdf';
     $pdf->Output('/tmp/' . $filename, 'F');
     $this->files[] = $filename;
     return true;
 }
示例#30
-7
             $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);
     $pdf->SetFont('', 'B');
     if ($result = $obj_modelo->GetDetalleTicket($id_ticket)) {
         if ($obj_conexion->GetNumberRows($result) > 0) {
             // Establecemos la cabecera de la tabla
             $pdf->SetFont('Arial', 'B', 10);