public function drawPDF() { $pdf = new \FPDF('L', 'mm', 'Letter'); $pdf->SetMargins(3.175, 3.175, 3.175); $pdf->SetAutoPageBreak(false); if (\COREPOS\Fannie\API\FanniePlugin::isEnabled('CoopDealsSigns')) { $this->font = 'Gill'; $this->alt_font = 'GillBook'; define('FPDF_FONTPATH', dirname(__FILE__) . '/../../../modules/plugins2.0/CoopDealsSigns/noauto/fonts/'); $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php'); } $pdf->SetFont($this->font, '', 16); $data = $this->loadItems(); $width = 136.52; $height = 105; $top = 90; $left = 15; $effective_width = $width - 2 * $left; foreach ($data as $item) { $pdf->AddPage(); $column = 1; // right aligned $price = $this->printablePrice($item); $pdf->SetXY($left + $width * $column, $top); $pdf->SetFontSize($this->SMALL_FONT); $pdf->Cell($effective_width, 10, $item['brand'], 0, 1, 'C'); $pdf->SetX($left + $width * $column); $pdf->SetFontSize($this->MED_FONT); $pdf->MultiCell($effective_width, 12, $item['description'], 0, 'C'); $pdf->SetX($left + $width * $column); $pdf->SetFontSize($this->BIG_FONT); $pdf->Cell($effective_width, 25, $price, 0, 1, 'C'); $y_pos = $pdf->GetY(); if ($item['startDate'] != '' && $item['endDate'] != '') { // intl would be nice $datestr = $this->getDateString($item['startDate'], $item['endDate']); $pdf->SetXY($left + $width * $column, $top + ($height - 40)); $pdf->SetFontSize($this->SMALL_FONT); $pdf->Cell($effective_width, 20, $datestr, 0, 1, 'R'); } if ($item['originName'] != '') { $pdf->SetXY($left + $width * $column, $y_pos); $pdf->SetFontSize($this->SMALL_FONT); if (strlen($item['originName']) < 50) { $pdf->Cell($effective_width, 20, $item['originName'], 0, 1, 'L'); } else { $pdf->Cell($effective_width, 20, $item['originShortName'], 0, 1, 'L'); } } } $pdf->Output('WfcProdSingle.pdf', 'I'); }
private function generate_pdf($srcText, $dest) { // Set some document variables $author = ""; $x = 50; $text = "<<<EOT" . $srcText . "EOT"; // Create fpdf object $pdf = new FPDF('P', 'pt', 'Letter'); // Set base font to start $pdf->SetFont('Times', 'B', 24); // Add a new page to the document $pdf->addPage(); // Set the x,y coordinates of the cursor $pdf->SetXY($x, 50); // Write 'Simple PDF' with a line height of 1 at the current position $pdf->Write(25, 'Simple PDF'); // Reset the font $pdf->SetFont('Courier', 'I', 10); // Set the font color $pdf->SetTextColor(255, 0, 0); // Reset the cursor, write again. $pdf->SetXY($x, 75); $pdf->Cell(0, 11, "By: {$author}", 'B', 2, 'L', false); // Place an image on the pdf document //$pdf->Image('graph.jpg', $x, 100, 150, 112.5, 'JPG'); // Reset font, color, and coordinates $pdf->SetFont('Arial', '', 12); $pdf->SetTextColor(0, 0, 0); $pdf->SetXY($x, 250); // Write out a long text blurb. $pdf->write(13, $srcText); // echo "<pre>"; // print_r($pdf);exit; $fileName = substr($dest, 0, strpos($dest, '.')) . "_" . time() . '.pdf'; $pdf->Output($fileName, 'F'); }
$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(); ?>
function preprocess() { if (FormLib::get_form_value('start', False) !== False) { $pdf = new FPDF('P', 'in', 'Letter'); $pdf->SetMargins(0.5, 0.5, 0.5); $pdf->SetAutoPageBreak(False, 0.5); $pdf->AddPage(); $start = FormLib::get_form_value('start'); $x = 0.5; $y = 0.5; $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php'); $pdf->SetFont('Gill', '', 16); for ($i = 0; $i < 40; $i++) { $current = $start + $i; $pdf->SetXY($x, $y); $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C'); $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C'); if ($i % 2 == 0) { $x += 1.75 * 2 + 0.5; } else { $x = 0.5; $y += 0.5; } } $pdf->Close(); $pdf->Output("mem stickers {$start}.pdf", "I"); return False; } return True; }
function generatePDF($print_id, $print_type = 1) { include "config.php"; require_once 'fpdf/fpdf.php'; $db = go\DB\DB::create($db_params, 'mysql'); $db->query('SET CHARACTER SET cp1251'); $get_print = $db->query('SELECT `finish_number`, `valve_type_id` FROM {numbers} WHERE `print_id`=?', array($_GET['print_id']))->assoc(); $get_print_info = $db->query('SELECT DISTINCT(`nm`.`order`) as `order`, `us`.`name` as `name`, `nm`.`print_id` as `print_id` FROM {numbers} `nm` LEFT JOIN {users} `us` ON (`nm`.`user_id` = `us`.`id`) WHERE `print_id`=?', array($_GET['print_id']))->row(); define('FPDF_FONTPATH', 'fpdf/fonts'); $pdf = new FPDF("L", "mm", array("88", "7")); $pdf->AddFont('Arial-BoldMT', 'B', 'arial_bold.php'); $pdf->SetFont('Arial-BoldMT', 'B', 11); $pdf->SetTextColor(0); //Add info for this order $pdf->AddPage('L'); $pdf->SetAutoPageBreak(false); $pdf->SetXY(0, 0); $pdf->Cell(43, 7, $get_print_info['name'], 0, 0, "C", 0); $pdf->Cell(4, 7, '', 0, 0, "C", 0); $pdf->Cell(43, 7, $get_print_info['order'], 0, 0, "C", 0); //End of add for ($i = 0; $i < count($get_print); $i++) { $pdf->AddPage('L'); $pdf->SetAutoPageBreak(false); $pdf->SetXY(0, 0); $pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i]['finish_number'], 0, 0, "C", 0); $pdf->Cell(4, 7, '', 0, 0, "C", 0); if ($i + $print_type < count($get_print)) { $pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i + $print_type]['finish_number'], 0, 0, "C", 0); } $pdf->SetAutoPageBreak(false); $i += $print_type; } return $pdf->Output($get_print_info['print_id'] . '.pdf', 'I'); }
public function post_id_handler() { if (!is_array($this->id)) { $this->id = array($this->id); } $today = date("F j, Y"); $pdf = new FPDF('L', 'in', array(3.5, 5.0)); $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php'); $primary = ""; $pdf->SetAutoPageBreak(true, 0); $pdf->SetFont("Gill", "", 10); //Meat of the statement foreach ($this->id as $card_no) { $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no); $pdf->AddPage(); $pdf->SetXY(3.0, 1.45); foreach ($account['customers'] as $c) { if ($c['accountHolder']) { $pdf->Cell(2, 0.25, $c['firstName'] . ' ' . $c['lastName'], "", 1, "L"); break; } } $pdf->SetX(3.0); $pdf->Cell(2, 0.25, $account['addressFirstLine'], "", 1, "L"); if ($account['addressSecondLine']) { $pdf->SetX(3.0); $pdf->Cell(2, 0.25, $account['addressSecondLine'], "", 1, "L"); } $pdf->SetX(3.0); $str = $account['city'] . ", " . $account['state'] . " " . $account['zip']; $pdf->Cell(2, 0.25, $str, "", 1, "L"); } $pdf->Output('member postcards.pdf', 'D'); return false; }
function UsersTrafficPeriodPDF() { //require('chart.php'); require 'lib/fpdf.php'; global $SAMSConf; global $DATE; $DB = new SAMSDB(); $sdate = $DATE->sdate(); $edate = $DATE->edate(); $bdate = $DATE->BeginDate(); $eddate = $DATE->EndDate(); $size = ""; if (isset($_GET["size"])) { $size = $_GET["size"]; } require "reportsclass.php"; $dateselect = new DATESELECT($DATE->sdate(), $DATE->edate()); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; define('FPDF_FONTPATH', 'lib/font/'); require 'lib/fpdf.php'; $pdfFile = new FPDF(); $pdfFile->Open(); $pdfFile->AddFont('Nimbus', '', 'Nimbus.php'); $pdfFile->SetAuthor("SQUID Account Management System"); $pdfFile->SetCreator("Created by SAMS2"); $pdfFile->SetTitle("SAMS2 users statistic"); // UsersTrafficPeriodPDF(); $pdfFile->AddPage(); $pdfFile->SetFont('Nimbus', '', 15); //$pdfFile->SetFont('SUSESerif-Roman','',16); $pdfFile->SetXY(50, 15); echo " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}<br>"; $pdfFile->Write(0, " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}"); $pdfFile->Output(); }
//medifinisikan set margin $pdf->SetMargins(40, 10, 6); $pdf->Image('images/icon/kop.png', 12, 3, 0, 28); $pdf->SetFont('Arial', 'B', 10); //fungsi mengatur text area font $pdf->SetFont('Arial', 'B', 8); $pdf->Text(140, 50, "Tahun Ajaran"); $pdf->Text(165, 50, " : " . $tampilHasil['ta']); $pdf->Text(15, 50, "NIS"); $pdf->Text(40, 50, " : " . $tampilHasil['nis']); $pdf->Text(15, 55, "Nama Siswa"); $pdf->Text(40, 55, " : " . $tampilHasil['nama_siswa']); $pdf->Text(140, 55, "Semester"); $pdf->Text(165, 55, " : " . $tampilHasil['semester']); //fungsi mengatur dan posisi table x dan y $pdf->SetXY(15, 60); $pdf->AliasNbPages(); // function untuk menampilkan tabel //membuat header tabel set color $pdf->SetFillColor(50, 50, 50); $pdf->SetTextColor(255, 255, 255); $pdf->Cell(10, 5, "No.", 1, 0, 'C', true); $pdf->Cell(40, 5, "Kode Mapel", 1, 0, 'C', true); $pdf->Cell(40, 5, "Mata Pelajaran", 1, 0, 'C', true); $pdf->Cell(20, 5, "Kelas", 1, 0, 'C', true); $pdf->Cell(30, 5, "Nilai Akhir", 1, 0, 'C', true); $pdf->Cell(30, 5, "Predikat (NA)", 1, 0, 'C', true); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0); //membuat halaman $no = 1;
//set document properties $pdf->SetAuthor('CORCIOVA ENACHI'); $pdf->SetTitle('FISA PARTIDEI'); //set font for the entire document $pdf->SetFont('Helvetica', 'B', 10); //$pdf->SetTextColor(50,60,100); //set up a page $pdf->AddPage('P'); //$pdf->SetDisplayMode(real,'default'); //display the title with a border around it //$pdf->SetXY(50,20); //$pdf->SetDrawColor(50,60,100); $pdf->Write(7, 'CASA DE AJUTOR RECIPROC A PENSIONARILOR DIN FOCSANI SI JUDETUL VRANCEA'); //$pdf->Ln(2); $pdf->SetFont('Helvetica', 'B', 12); $pdf->SetXY(10, 15); //$pdf->Ln(3); $s = " "; $r2 = $s . "Partida nr: " . $par . " Nume: " . $nume . " CNP: " . $cnp; $pdf->Write(7, $r2); $pdf->SetFont('Helvetica', 'B', 10); $pdf->SetXY(10, 20); $r3 = $s . "CI/BI: " . $ser . " " . $nr . " Elib " . $delib . " Pol. " . $pol . " din " . $loca . " Adresa: " . $adr; $pdf->Write(7, $r3); //$pdf->Write(7,'C.E.C.nr. '); //$pdf->Write(7,$decp); $r4 = $s . "Data inscrierii: " . $dins . " Sectia credit: " . $discre . " Sotul: " . $sot . " Sectia deces: " . $disdec; $pdf->SetFont('Helvetica', 'B', 10); $pdf->SetXY(10, 25); $pdf->Write(7, $r4); $r5 = $s . "Decizie nr. " . $decp . " Pensie lunara: " . $pen;
} else { $pdf->Text(50, 35, " : Luar kota Yogyakarta"); } $pdf->Text(10, 40, "Alamat Pengiriman"); $pdf->Text(50, 40, " : " . $alamatPengiriman); $pdf->Text(10, 45, "Status Pemesanan"); if ($status == '0') { $st = "Proses Pembayaran"; $pdf->SetTextColor(255, 0, 0); } if ($status == '1') { $st = "Barang Sudah Dikirim"; $pdf->SetTextColor(0, 255, 0); } $pdf->Text(50, 45, " : " . $st); $pdf->SetXY(10, 50); $pdf->SetFillColor(50, 50, 50); $pdf->SetTextColor(255, 255, 255); $pdf->Cell(10, 5, "No.", 1, 0, 'C', true); $pdf->Cell(50, 5, "Nama Obat", 1, 0, 'C', true); $pdf->Cell(30, 5, "Harga", 1, 0, 'C', true); $pdf->Cell(20, 5, "Jumlah", 1, 0, 'C', true); $pdf->Cell(30, 5, "Subtotal", 1, 1, 'C', true); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0); $no = 1; $x = 0; $grandtotal = 0; $qData = "SELECT id_obat, jumlah, subtotal FROM _pemesanan_detail WHERE id_pemesanan = '{$idPemesanan}'"; $hqData = mysql_query($qData); while (list($idObat, $jumlahObat, $subtotal) = mysql_fetch_row($hqData)) {
include '../../resources/orcl_conex.php'; include 'Models/class.Denuncia.php'; include 'Models/class.DenunciaDAO.php'; include '../mod_ciudadanos/Models/class_fisc_ciudadano.php'; include '../mod_ciudadanos/Models/class_fisc_ciudadanoDAO.php'; $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('REPÚBLICA BOLIVARIANA DE VENEZUELA')); $pdf->Text(40, 13, utf8_decode('MINISTERIO DEL PODER POPULAR PARA EL TRABAJO Y SEGURIDAD SOCIAL')); $pdf->Text(40, 16, utf8_decode('INSTITUTO VENEZOLANO DE LOS SEGUROS SOCIALES')); $pdf->Text(40, 19, utf8_decode('DIRECCIÓN GENERAL DE FISCALIZACIÓN')); $pdf->SetXY(20, 26); $pdf->SetFillColor(35, 65, 129); $pdf->SetFont('Arial', 'B', 8); $pdf->setTextColor(255, 255, 255); $pdf->Cell(50, 6, utf8_decode('N° DE QUEJAS Y/O RECLAMOS'), 1, 0, 'C', TRUE); $pdf->SetXY(20, 32); $pdf->Cell(50, 6, '', 1, 0, 'C', FALSE); $pdf->setTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 8); $pdf->Text(60, 50, utf8_decode('COMPROBANTE DE RECEPCIÓN DE QUEJA Y/O RECLAMO')); $pdf->SetXY(20, 52); $pdf->SetFont('Arial', 'B', 8); $pdf->setTextColor(255, 255, 255); $pdf->Cell(50, 6, utf8_decode('FECHA DE PRESENTACIÓN'), 1, 0, 'C', TRUE); $pdf->Cell(35, 6, '', 1, 0, 'C', FALSE); $pdf->Cell(50, 6, utf8_decode('HORA DE PRESENTACIÓN'), 1, 0, 'C', TRUE);
$pdf->AddFont('Times', '', 'times.php'); $pdf->SetFont('Times', ''); $pdf->SetTextColor(0, 0, 0); //set up a page $pdf->AddPage('P'); $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_04_1.jpg', 5, 5, 205); if ($row['study_type'] == "Денна") { $pdf->Line(58, 53.5, 65, 53.5); } if ($row['study_type'] == "Заочна") { $pdf->Line(67, 53.5, 76, 53.5); } $pdf->SetXY(52, 64); $pdf->SetFont('Times', '', 10); $pdf->Write(5, $row['ab_id']); $pdf->SetFontSize(9); $pdf->SetXY(22, 70); $pdf->Write(5, $row['lastname']); $pdf->SetXY(15, 74.5); $pdf->Write(5, $row['firstname']); $pdf->SetXY(24, 78); $pdf->Write(5, $row['patronymic']); $pdf->SetFontSize(8); $pdf->SetXY(34, 81.5); $pdf->Write(5, $row['faculty']); $pdf->SetXY(7, 89); $pdf->Write(5, str_replace($row['faculty'], "", $row['training'])); $pdf->SetXY(7, 96);
foreach ($reports as $id => $report) { $teacherName = $report['classInfo']['first_name'] . " " . $report['classInfo']['last_name']; $rcv = 0; /** used for row shading **/ $pdf->AddPage('P'); $pdf->SetMargins($lm, $tm); //$pdf->SetTitle($className."_".$termName."_".$sname."_ProgressReport.pdf"); /** START BUILDING THE PAGE **/ /** First the heading **/ $y_coord = $tm; $x_coord = $lm; $pdf->SetFillColor(255, 255, 255); /** Page Title **/ $pdf->SetTextColor(51, 102, 102); $pdf->SetFont('Times', 'B', $titlefs); $pdf->SetXY($x_coord, $y_coord); $title = $pdf->Cell($headingw, $titleh, 'Questar III Student Progress Report', 0, 1, 'C', 0); $y_coord += $titleh; $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Times', 'B', $colheadingfs); $pdf->SetXY($x_coord, $y_coord); $pdf->Cell($headingw, 0.4, $report['studentName'], 0, 2, 'L', 0); $pdf->Cell($headingw, 0.4, $report['classInfo']['course_name'] . ' ~ ' . $teacherName, 0, 2, 'L', 0); $pdf->Cell($headingw, 0.4, "School Year " . $schoolYear . " ~ " . $report['classInfo']['term_name'], 0, 2, 'L', 0); $pdf->Cell($headingw, 0.4, "Printed on " . $currentDate, 0, 2, 'L', 0); /** SUMMARY SECTION **/ $y_coord = $tm + $titleh; $x_coord = $lm + $headingw; $pdf->SetFont('Times', 'B', $colheadingfs + 1); $pdf->SetXY($x_coord, $y_coord); $pdf->SetFillColor(192, 192, 192);
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"); }
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C'); $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C'); } if (isset($_GET['sonuc'])) { $readerUTime = $_GET['readerUTime']; $pdf = new FPDF('L', 'mm', 'A4'); $tabanhesabi = null; AddPage($readerUTime); $pdf->SetXY(15, 120); $pdf->Cell(200, 5, "Genel baþarý seviyesi deðerlendirmesidir.", 0, 0, 'L'); $tabanhesabi = 0; AddPage($readerUTime); $pdf->SetXY(15, 120); $pdf->Cell(200, 5, "Sadece \" {$tabanhesabi} \" baþarý seviyesinden büyük olanlarýn deðerlendirmesidir.", 0, 0, 'L'); $tabanhesabi = 50; AddPage($readerUTime); $pdf->SetXY(15, 120); $pdf->Cell(200, 5, "Sadece \" {$tabanhesabi} \" baþarý seviyesinden büyük olanlarýn deðerlendirmesidir.", 0, 0, 'L'); $pdf->SetCompression(true); $pdf->Output(); } else { ?> <html> <head><title>OMR</title>
///**********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); //largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond; $courrier->SetX(120);
} //logo $pdf->Image($logo, $X_logo, $Y_logo, $L_logo, $H_logo); } //adresse if ( !isset($X_etab) or empty($X_etab) ) { $X_etab = '5'; $Y_etab = '5'; } $pdf->SetXY($X_etab,$Y_etab); $pdf->SetFont('DejaVu','',14); $gepiSchoolName = getSettingValue('gepiSchoolName'); // mettre en gras le nom de l'établissement si $nom_etab_gras = 1 if ( $nom_etab_gras === '1' ) { $pdf->SetFont('DejaVu','B',14); } $pdf->Cell(90,7, ($gepiSchoolName),0,2,''); $pdf->SetFont('DejaVu','',10); $gepiSchoolAdress1 = getSettingValue('gepiSchoolAdress1');
$account_type = $row['account_type']; //$=$row['']; //$=$row['']; } $pdf->AddPage(); $timetext = time(); $lastword = substr($timetext, -1, 1); $j = 0; $randomtext = rand(1, 10); while ($j < rand(1, 10)) { $lastword = $lastword . $randomtext; $j++; } $pdf->Ln(); $pdf->SetFont("Times", "B", 12); $pdf->SetXY(10, 10); //print transparent random text $pdf->SetTextColor(255, 255, 255); $pdf->Cell(0, 10, "{$timetext} - {$lastword}", 0, 0, 'C'); $pdf->SetXY($xmargin, 10); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(0, 10, "{$org->organization_name} ({$org->companyno})", 0, 0, 'L'); //$pdf->SetFont("Times","",10); //$pdf->Cell(0,12,"($org->companyno)",0,0,'L'); $pdf->SetXY($xmargin, 18); //organization contact info block (2) $orgadd1 = "{$org->street1} {$org->street2} {$org->street3}"; $pdf->SetFont("Times", "", 8); $pdf->Cell(0, 4, "{$orgadd1} {$org->postcode} {$org->city} {$org->state} {$org->country_name}.", 0, 0, 'L'); $pdf->Ln(); $pdf->SetX($xmargin);
$result = $db->query($sql); $catcount = $result->num_rows; while ($row = $result->fetch_assoc()) { $cat_names_array[$row['category_name']] = $row['category_weight']; } $catcount = count($cat_names_array); if ($catcount) { $y_coord = $tm; $x_coord = $lm; $pdf->AddPage('P'); //print "Adding Page ".$page++."<br>"; $pdf->SetMargins($lm, $tm, 8.5); $pdf->SetFillColor(204, 204, 204); /** black **/ $pdf->SetTextColor(0, 0, 0); $pdf->SetXY($x_coord, $y_coord); /** Display a Page Title **/ $pageTitle = "Class Summary for " . $termName . " - " . $class_name . " - " . $teacherName; $pdf->SetFont('Times', 'B', $titlefs); $pdf->Cell($pw, $titleh, $pageTitle, 0, 1, 'C', 1); $y_coord += $titleh; $pdf->SetXY($x_coord, $y_coord); $pdf->SetFont('Times', 'B', $catfs); $numCats = count($cat_names_array); $overallavw = 1.0; $studentw = 2.0; $rightleft = $overallavw + $studentw; $catw = ($pw - ($overallavw + $studentw)) / $numCats; /** Student Names **/ $pdf->Cell($studentw, 2 * $cath, 'Student Names', 0, 0, 'C', 1); $x_coord += $studentw;
$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, "за рахунок коштів фізичних, юридичних осіб"); } $pdf->SetXY(222, 51.5);
$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); } else {
$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); foreach ($images as $image) { $pdf->setX(10); $pdf->Image($image['url'], 10, $startY + 5, 75, 75); } // DESCRIPTION ////////////////// $product->post_content = str_replace("<strong>", "", $product->post_content); $product->post_content = str_replace("</strong>", "", $product->post_content); $pdf->SetXY(90, $startY + 10); $pdf->SetFont('Arial', 'B', 12); $pdf->MultiCell(0, 5, utf8_decode($product->post_content), 0, 1, 'L'); ////////////////// $startXBlockProperties = 90; $startYBlockProperties = 130; // LOGO SIZE /////////////////// $pdf->SetXY($startXBlockProperties, $startYBlockProperties); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(35, 10, "Logo Size :", 0, 1, 'L'); $pdf->SetXY($startXBlockProperties + 30, $startYBlockProperties); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 10, utf8_decode(rwmb_meta('PRODUCT_logo_size', '', $idProduct)), 0, 1, 'L'); //////////////////// // ITEM SIZE
$paybaltx = "Debt Left"; //write the debt/balance used if any if (floatval($_POST['total']) - floatval($totpartial) > 0) { $paybalam = "\$ " . number_format(floatval($_POST['total']) - floatval($totpartial), 2); $paybaltx = $_POST['paid'] == 'no' ? $paybaltx : "Use Balance"; } $totpartial = "\$ " . number_format(floatval($totpartial), 2); //Create pdf file require "fpdf.php"; $pdf = new FPDF('P', 'mm', 'A4'); $pdf->AddPage(); $pdf->SetAutoPageBreak(false); if (file_exists('../setup/' . $cRow['company_logo'])) { $pdf->Image('../setup/' . $cRow['company_logo'], 10, 9, 53); } $pdf->SetXY(65, 8); $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(60, 5.3, $cRow['company_name'], 0, 2); $pdf->Cell(60, 5.3, "ABN: {$cRow['company_abn']}", 0, 2); $pdf->SetFont('Arial', '', 11); $company_address = explode("\n", $cRow["company_address"]); foreach ($company_address as $str) { $pdf->Cell(60, 5.3, $str, 0, 2); } $pdf->Cell(60, 5.3, "Ph: {$cRow['company_phone']}", 0, 2); $pdf->SetFont('Arial', 'UI', 11); $pdf->Cell(60, 5.3, $cRow['company_website'], 0, 2, 'L', false, "http://{$cRow['company_website']}"); $pdf->SetXY(152, 9); $pdf->SetFont('Arial', 'B', 20); if (strtolower($_POST['doc_type']) != 'quote') { $pdf->Cell(60, 10, strtoupper($_POST['goods']) == 'UNTAKEN' ? "PRO-FORMA" : "TAX INVOICE", 0, 2);
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; }
<?php require '../fpdf/fpdf.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont("Arial", "", 12); $pdf->Cell(0, 0, "SOMMAIRE", 0, 0, C); $pdf->Text(10, 25, "Title 1 "); $pdf->Text(20, 30, "Title 2 "); $pdf->Text(30, 35, "Title 3 "); $pdf->Text(20, 40, "Titre super "); $pdf->Text(10, 45, "Title Great "); $pdf->Text(20, 50, "Title super "); $pdf->AddPage(); $pdf->SetFont("Arial", "B", 32); $pdf->SetXY(0, 30); $pdf->Cell(0, 0, "SAMPLE DOC Oumar Exe ", 0, 0, C); $pdf->SetFont("Arial", "", 12); $pdf->SetTextColor(130, 0, 0); $pdf->Text(10, 45, "Title 1 "); $pdf->SetTextColor(0); $pdf->SetTextColor(0, 130, 0); $pdf->Text(20, 50, "Title 2 "); $pdf->SetTextColor(0); $pdf->SetTextColor(20, 20, 130); $pdf->Text(30, 55, "Title 3 "); $pdf->SetTextColor(0); $pdf->SetXY(10, 60); $pdf->Text(10, 60, "BONJOUR COUCOU GRAND Darktsar Oumar Exe TRAORE "); $cordX = $pdf->SetX($pdf->GetStringWidth("BONJOUR COUCOU GRAND Darktsar Oumar Exe TRAORE ")); $cordX = $pdf->GetX() + 9;
$pdf->SetMargins(25, 15, 15); // ******************************************************** SEITE ******************************************************** // // Seite hinzufügen $pdf->AddPage(); // Logo auf erster Seite einfügen $pdf->Image('./img/acb_logo_gross.jpg', 95, 10, 25); // Position auf der X- und Y-Achse $pdf->SetY(40); // Schriftart festlegen $pdf->SetFont('Times', 'BU', 14); $pdf->Cell(160, 7, utf8_decode('Telefonnummern der Flugleiter/-innen, Aero-Club Butzbach e.V.'), 0, 1, 'C'); // Schriftart festlegen $pdf->SetFont('Times', '', 11); $pdf->Cell(160, 5, sprintf(utf8_decode('Stand: %s %d'), utf8_decode($_monate[date('n')]), date('Y')), 0, 1, 'C'); // Position auf der X- und Y-Achse $pdf->SetXY(20, 280); // Schriftart und -farbe ändern $pdf->SetTextColor(128, 128, 128); $pdf->SetFont('Times', '', 8); // Ausgabe des Fusszeilentext $pdf->Cell(0, 10, 'Seite ' . $pdf->PageNo() . ' von {nb}', 0, 0, 'C'); // Position auf der X- und Y-Achse $x = 20; $y = 63; // alle Flugleiter des Vereins ermitteln $data = getFlugleiterliste(); // Schriftfarbe setzen $pdf->SetTextColor(0, 0, 0); foreach ($data as $mitglied) { // Schriftart festlegen $pdf->SetFont('Times', 'B', 11);
case 11: $nombre_mes = "Noviembre"; break; case 12: $nombre_mes = "Diciembre"; break; } if ($registros > 0) { require '/fpdf/fpdf.php'; $pdf = new FPDF('L'); $pdf->AddPage(); // Imagen $pdf->Image('serbimaAA.jpg', 245, 8, 30); // titulo $pdf->SetFont('Arial', 'B', 12); $pdf->SetXY(90, 10); $pdf->Write(1, "PLANILLA DE DESCUENTO {$emp}"); $pdf->SetXY(125, 15); $pdf->Write(1, 'Mes de ' . $nombre_mes . ' del ' . $ano); // Informacion del empleador $pdf->SetFont('Arial', 'U', 10); $pdf->SetXY(10, 30); $pdf->Write(1, 'Información del empleador'); if ($registro = sqlsrv_fetch_object($resultado)) { $rut_inst = $registro->rut_inst; $dv_inst = $registro->dv_inst; } function rut($rut) { return number_format(substr($rut, 0, -1), 0, "", ".") . '-' . substr($rut, strlen($rut) - 1, 1); }
function index_print() { global $root, $srcdir, $tmpdir; include_once $srcdir . DS . 'libs' . DS . 'fpdf.php'; include_once $srcdir . DS . 'libs' . DS . 'barcode.php'; if (!isset($_POST['mandate'])) { $_POST['mandate'] = 1; } if (!isset($_POST['subscription'])) { $_POST['subscription'] = 1; } $mdt = new Modele('mandate'); $mdt->fetch($_POST['mandate']); $sub = new Modele('subscription'); $sub->fetch($_POST['subscription']); $usr = new Modele('users'); $usr->fetch($_SESSION['user']['user_id']); $sublist = new Modele('subscription'); //$sublist->find(array('subscription_mandate' => $mdt->mandate_id)); $sublist->find(); if (new DateTime($mdt->mandate_start) > new DateTime() || new DateTime($mdt->mandate_end) < new DateTime()) { modexec('syscore', 'moderror'); } ob_start(); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetXY(18, 12); $pdf->SetFont('Arial', '', 30); $pdf->Cell(180, 10, 'EPITANIME', 0, 0, 'C'); $pdf->SetFont('Arial', '', 10); $pdf->SetXY(18, 21); $pdf->Cell(180, 5, 'FEUILLE DE RENSEIGNEMENTS ' . uc($mdt->mandate_label), 0, 0, 'C'); $pdf->SetXY(18, 26); $pdf->Cell(180, 5, 'Veuillez remplir lisiblement en lettres capitales', 0, 0, 'C'); $pdf->SetFont('Arial', 'B', 10); $pdf->SetXY(18, 35); $pdf->Cell(180, 5, 'Informations essentielles :', 0, 0, ''); $pdf->SetXY(18, 40); $pdf->Cell(50, 5, 'Pseudo', 1, 0, ''); $pdf->SetXY(18, 45); $pdf->Cell(50, 5, 'Nom', 1, 0, ''); $pdf->SetXY(18, 50); $pdf->Cell(50, 5, uc('Prénom'), 1, 0, ''); $pdf->SetXY(18, 55); $pdf->Cell(50, 5, 'Adresse', 1, 0, ''); $pdf->SetXY(18, 60); $pdf->Cell(50, 5, 'Code postal', 1, 0, ''); $pdf->SetXY(18, 65); $pdf->Cell(50, 5, 'Ville', 1, 0, ''); $pdf->SetXY(18, 70); $pdf->Cell(50, 5, 'Sexe', 1, 0, ''); $pdf->SetXY(18, 75); $pdf->Cell(50, 5, 'Date de naissance', 1, 0, ''); $pdf->SetXY(18, 80); $pdf->Cell(50, 5, uc('Téléphone'), 1, 0, ''); $pdf->SetXY(18, 85); $pdf->Cell(50, 5, 'Courriel', 1, 0, ''); $pdf->SetXY(18, 95); $pdf->Cell(50, 5, uc('Réservé aux étudiants IONIS'), 0, 0, ''); $pdf->SetXY(18, 100); $pdf->Cell(50, 5, 'Login', 1, 0, ''); $pdf->SetXY(18, 105); $pdf->Cell(50, 5, 'Ecole', 1, 0, ''); $pdf->SetXY(18, 110); $pdf->Cell(50, 5, 'Promotion', 1, 0, ''); $pdf->SetXY(18, 120); $pdf->Cell(50, 5, uc('Réservé aux membres prenant l\'inscription FFG (fédération française de GO)'), 0, 0, ''); $pdf->SetXY(18, 125); $pdf->Cell(50, 5, uc('Nationalité'), 1, 0, ''); $pdf->SetXY(18, 130); $pdf->Cell(50, 5, 'Niveau', 1, 0, ''); $pdf->SetXY(18, 135); $pdf->Cell(50, 5, 'Pseudo FFG', 1, 0, ''); $pdf->SetFont('Arial', '', 12); $pdf->SetXY(18, 222); $pdf->Cell(160, 5, uc('Reçu par ______________________ le ___/___/20___ , accompagné de la cotisation choisie.'), 0, 0, ''); $pdf->SetFont('Arial', 'B', 10); $pdf->SetXY(38, 230); $pdf->Cell(50, 5, 'Signature du membre', 1, 0, ''); $pdf->Rect(38, 235, 50, 20); $pdf->SetXY(130, 230); $pdf->Cell(50, 5, uc('Signature du récepteur'), 1, 0, ''); $pdf->Rect(130, 235, 50, 20); $pdf->SetFont('Arial', '', 8); $pdf->SetXY(18, 260); $pdf->MultiCell(180, 3, uc('Les informations recueillies sont nécessaires pour votre adhésion. Elles font l’objet d’un traitement informatique et sont destinées au secrétariat de l’association. En application de l’article 34 de la loi du 6 janvier 1978, vous bénéficiez d’un droit d’accès et de rectification aux informations qui vous concernent. Si vous souhaitez exercer ce droit et obtenir communication des informations vous concernant, veuillez vous adresser au secrétariat de l’association.')); $pdf->SetFont('Arial', '', 10); $pdf->SetXY(68, 40); $pdf->Cell(130, 5, uc($usr->user_name), 1, 0, ''); $pdf->SetXY(68, 45); $pdf->Cell(130, 5, uc($usr->user_lastname), 1, 0, ''); $pdf->SetXY(68, 50); $pdf->Cell(130, 5, uc($usr->user_firstname), 1, 0, ''); $pdf->SetXY(68, 55); $pdf->Cell(130, 5, uc($usr->user_address), 1, 0, ''); $pdf->SetXY(68, 60); $pdf->Cell(130, 5, uc($usr->user_cp), 1, 0, ''); $pdf->SetXY(68, 65); $pdf->Cell(130, 5, uc($usr->user_town), 1, 0, ''); $pdf->SetXY(68, 70); $pdf->Cell(130, 5, uc($usr->user_sexe), 1, 0, ''); $pdf->SetXY(68, 75); $pdf->Cell(130, 5, uc($usr->user_born), 1, 0, ''); $pdf->SetXY(68, 80); $pdf->Cell(130, 5, uc($usr->user_phone), 1, 0, ''); $pdf->SetXY(68, 85); $pdf->Cell(130, 5, uc($usr->user_email), 1, 0, ''); $pdf->SetXY(68, 100); $pdf->Cell(130, 5, uc($usr->user_login), 1, 0, ''); $pdf->SetXY(68, 105); $pdf->Cell(130, 5, uc($usr->user_type->ut_name), 1, 0, ''); $pdf->SetXY(68, 110); $pdf->Cell(130, 5, uc($usr->user_promo), 1, 0, ''); $pdf->SetXY(68, 125); $pdf->Cell(130, 5, '', 1, 0, ''); $pdf->SetXY(68, 130); $pdf->Cell(130, 5, '', 1, 0, ''); $pdf->SetXY(68, 135); $pdf->Cell(130, 5, '', 1, 0, ''); $pdf->SetFont('Arial', 'B', 10); $pdf->SetXY(18, 145); $pdf->Cell(50, 5, uc('Cotisation'), 0, 0, ''); $cb = '9' . str_pad($mdt->getKey(), 4, '0', STR_PAD_LEFT) . str_pad($usr->getKey(), 7, '0', STR_PAD_LEFT); $cbfile = tempnam($tmpdir, 'cb'); imagebarcode($cbfile, $cb, 200, 40, 2); $pdf->Image($cbfile, 10, 10, 30, 0, 'PNG'); unlink($cbfile); $pdf->SetFont('Arial', 'I', 8); $pdf->SetXY(185, 10); $pdf->Cell(10, 5, $usr->getKey(), 0, 0, 'R'); $pos = -1; $pdf->SetFont('Arial', '', 10); while ($c = $sublist->next()) { $pos++; $x = 25 + $pos % 2 * 90; $y = 150 + 5 * floor($pos / 2); $pdf->SetXY($x, $y); $pdf->Cell(60, 5, uc($c['subscription_label']), 1, 0, ''); $pdf->Cell(15, 5, number_format($c['subscription_price'], 2, ',', '') . ' ' . chr(128), 1, 0, ''); $pdf->Rect($x + 75, $y, 5, 5); if ($c['subscription_id'] == $sub->subscription_id) { $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(5, 5, 'X', 0, 0, 'C'); $pdf->SetFont('Arial', '', 10); } } if (ob_get_flush() == '') { $pdf->Output('inscription.pdf', 'I'); } quit(); }
function createContentFile($mod, $statement, $c_username, $bild) { //Erzeugung der pdf-Galerie //echo $statement; //$statement fuer exif, desc, zeit, kat(ausser Wurzel) uebergeben include '../share/global_config.php'; include $sr . '/bin/share/db_connect1.php'; switch ($mod) { case 'geo': $num100 = count($statement); break; default: $result100 = mysql_query("{$statement}"); @($num100 = mysql_num_rows($result100)); break; } if ($statement !== '') { //echo $statement; //echo "gefundene Bilder: ".$num100."<BR>"; $seiten = floor($num100 / 20) + 1; define('FPDF_FONTPATH', '../share/fpdf/font/'); require $sr . '/bin/share/fpdf/fpdf.php'; $pdf = new FPDF('P', 'mm', 'A4'); $pdf->SetLeftMargin(20); $pdf->SetFont('Arial', '', 10); $aktdatum = date('d.m.Y'); for ($seite = '0'; $seite < $seiten; $seite++) { $pdf->AddPage(); $pdf->Cell(0, 5, 'pic2base-Galerie', 0, 1, 'C'); $pdf->Cell(0, 5, 'Tipp: Mit einem Klick auf den Dateinamen erhalten Sie die vergr' . utf8_decode(ö) . 'sserte Ansicht des betreffenden Bildes.', 0, 1, 'C'); for ($zeile = '0'; $zeile < '5'; $zeile++) { $y_mitte = 50 + $zeile * 48; for ($spalte = '0'; $spalte < '4'; $spalte++) { $x_mitte = 45 + $spalte * 45; //Ermittlung des QH-/Ori-Dateinamens und der Bild-Masse $zaehler = $spalte + $zeile * 4 + $seite * 20; if ($zaehler < $num100) { //echo $zaehler; switch ($mod) { case 'geo': switch ($bild) { case '0': $result102 = mysql_query("SELECT * FROM {$table2} WHERE pic_id = '{$statement[$zaehler]}'"); $FileNameV = mysql_result($result102, 0, 'FileNameV'); //$FileNameHQ = mysql_result($result102, $zaehler, 'FileNameHQ'); @($parameter_v = getimagesize($sr . '/images/vorschau/thumbs/' . $FileNameV)); break; case '1': $result102 = mysql_query("SELECT * FROM {$table2} WHERE pic_id = '{$statement[$zaehler]}'"); $FileNameHQ = mysql_result($result102, 0, 'FileNameHQ'); @($parameter_v = getimagesize($sr . '/images/vorschau/hq-preview/' . $FileNameHQ)); break; } $FileName = mysql_result($result102, 0, 'FileName'); break; default: switch ($bild) { case '0': $FileNameV = mysql_result($result100, $zaehler, 'FileNameV'); $FileNameHQ = mysql_result($result100, $zaehler, 'FileNameHQ'); @($parameter_v = getimagesize($sr . '/images/vorschau/thumbs/' . $FileNameV)); break; case '1': $FileNameHQ = mysql_result($result100, $zaehler, 'FileNameHQ'); @($parameter_v = getimagesize($sr . '/images/vorschau/hq-preview/' . $FileNameHQ)); break; } $FileName = mysql_result($result100, $zaehler, 'FileName'); break; } $breite = $parameter_v[0]; $hoehe = $parameter_v[1]; $ratio = $breite / $hoehe; if ($ratio > '1') { //Breitformat $Breite = 40; $Hoehe = number_format($Breite / $ratio, 0, '.', ','); } else { //Hochformat $Hoehe = 40; $Breite = number_format($Hoehe * $ratio, 0, '.', ','); } $x0 = $x_mitte - $Breite / 2; $y0 = $y_mitte - $Hoehe / 2; switch ($bild) { case '0': $pdf->Image($sr . '/images/vorschau/thumbs/' . $FileNameV, $x0, $y0, $Breite, $Hoehe, 'jpg'); break; case '1': $pdf->Image($sr . '/images/vorschau/hq-preview/' . $FileNameHQ, $x0, $y0, $Breite, $Hoehe, 'jpg'); break; } //Ausgabe des Dateinamens: $x1 = $x_mitte - 15; $y1 = $y_mitte + 21; $pdf->SetXY($x1, $y1); $pdf->SetFont('Arial', '', 8); $pdf->Cell(30, 5, $FileName, 0, 0, 'C', 5, 'http://' . $_SERVER['SERVER_NAME'] . $inst_path . '/pic2base/images/vorschau/hq-preview/' . $FileNameHQ); //$pdf->Cell(30,5,$FileName,0,0,C,0,'http://www.pic2base.de'); } } } $seiten_nr = $seite + 1; $pdf->SetXY(25, 270); $pdf->Cell(0, 6, 'Druckdatum: ' . $aktdatum . ', Seite ' . $seiten_nr . ' von ' . $seiten, 0, 1, 'C'); $pdf->SetFont('Arial', '', 10); } $pdf->Output($p2b_path . 'pic2base/userdata/' . $c_username . '/kml_files/thumb-gallery.pdf'); } }
public function post_id_upc_terms_handler() { $this->id = preg_split('/[^\\d]/', $this->id, 0, PREG_SPLIT_NO_EMPTY); $pdf = new FPDF('P', 'mm', 'Letter'); $pdf->SetMargins(6.35, 6.35, 6.35); // quarter-inch margins $pdf->SetAutoPageBreak(false); $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php'); $pdf->AddFont('Gill', 'B', 'GillSansMTPro-Heavy.php'); $margins = $pdf->GetMargins(); $margins['top'] = 0.0; $check_left_x = $margins['left'] > 3.175 ? $margins['right'] : 3.175 - $margins['left']; $real_check_top_y = 183.675 - $margins['top']; $check_right_x = 203.2 - $margins['left']; $real_check_bottom_y = 255.112 - $margins['top']; $line_height = 5; $envelope_window_tab = 15; $right_col1 = 130; $right_col2 = 170; $my_address = array('610 E 4th St', 'Duluth, MN 55805', 'Tel: 218.728.0884', 'www.wholefoods.coop'); $check_date = date('F j, Y'); $dbc = $this->connection; $dbc->setDefaultDB($this->config->get('OP_DB')); $signage = new COREPOS\Fannie\API\item\FannieSignage(array()); foreach ($this->id as $card_no) { $pdf->AddPage(); $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no); $primary = array(); foreach ($account['customers'] as $c) { if ($c['accountHolder']) { $primary = $c; break; } } $check_number = rand(100000, 999995); for ($i = 0; $i < 3; $i++) { $pdf->SetFont('Gill', '', 10); $check_top_y = $real_check_top_y - $i * 90; $check_bottom_y = $real_check_bottom_y - $i * 90; $pdf->SetXY($check_left_x, $check_top_y); $pdf->Ln($line_height * 4.25); foreach ($my_address as $line) { $pdf->SetX($check_left_x + $envelope_window_tab + 20); if ($line == 'www.wholefoods.coop') { $pdf->SetFont('Gill', 'B', 9); } $pdf->Cell(0, $line_height, $line, 0, 1); } $pdf->SetFont('Gill', 'B', 10); $pdf->SetXY($check_left_x + $right_col1, $check_top_y); $pdf->Cell(30, $line_height, 'Check Number:', 0, 0, 'R'); $pdf->SetFont('Gill', '', 10); $pdf->SetTextColor(0xff, 0x58, 0); $pdf->SetX($check_left_x + $right_col2); $pdf->Cell(30, $line_height, $check_number, 0, 0, 'R'); $pdf->SetFont('Gill', 'B', 10); $pdf->SetTextColor(0, 0, 0); $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 1.5 * $line_height); $pdf->Cell(30, $line_height, 'Date:', 0, 0, 'R'); $pdf->SetFont('Gill', '', 10); $pdf->SetTextColor(0xff, 0x58, 0); $pdf->SetX($check_left_x + $right_col2); $pdf->Cell(30, $line_height, $check_date, 0, 0, 'R'); $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 3 * $line_height); $pdf->SetFont('Gill', 'B', 10); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(30, $line_height, 'Amount:', 0, 0, 'R'); $pdf->SetXY($check_left_x + $right_col1 + 30, $check_top_y + 3 * $line_height); $pdf->SetFont('Gill', '', 10); $pdf->SetTextColor(0xff, 0x58, 0); $pdf->MultiCell(40, $line_height, str_repeat(' ', 2) . $this->terms, 0, 'R'); $pdf->SetTextColor(0, 0, 0); $their_address = array($primary['firstName'] . ' ' . $primary['lastName']); $their_address[] = $account['addressFirstLine']; if ($account['addressSecondLine']) { $their_address[] = $account['addressSecondLine']; } $their_address[] = $account['city'] . ', ' . $account['state'] . ' ' . $account['zip']; $pdf->SetXY($check_left_x + $envelope_window_tab, $check_top_y + 11 * $line_height); $pdf->SetFont('Gill', 'B', 10); foreach ($their_address as $line) { $pdf->SetX($check_left_x + $envelope_window_tab); $pdf->Cell(0, $line_height, $line, 0, 1); } $pdf->SetFont('Gill', '', 10); $pdf->SetXY($check_left_x, $check_bottom_y + $line_height - 1); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Gill', 'B', 10); $pdf->Cell(0, $line_height, 'Redeemable only at Whole Foods Co-op', 0, 0, 'C'); $pdf->SetFont('Gill', '', 10); $pdf->SetXY($check_left_x + 145, $check_top_y + 6 * $line_height + 1); $pdf->SetFont('Gill', '', 8); $pdf->MultiCell(50, $line_height - 2, 'Limit one per day. Cannot be applied to previous purchases. No cash value.'); $pdf->SetFont('Gill', '', 10); $pdf->SetFillColor(0xcc, 0xcc, 0xcc); $pdf->Rect($check_left_x + 84, $check_top_y + 28, 39, 15, 'F'); $pdf->SetFillColor(0, 0, 0); $signage->drawBarcode(ltrim($this->upc, '0'), $pdf, $check_left_x + 87, $check_top_y + 30, array('height' => 11, 'fontsize' => 0)); $pdf->Image('logo.rgb.noalpha.png', $check_left_x + $envelope_window_tab, $check_top_y + 20, 20); $pdf->SetFont('Gill', 'B', '31'); $pdf->SetXY($check_left_x + $envelope_window_tab, $check_top_y + 0.5 * $line_height); $pdf->SetTextColor(0xff, 0x58, 0); $pdf->Cell(0, 3 * $line_height, 'We Appreciate You!'); $pdf->SetFont('Gill', '', '10'); $pdf->SetTextColor(0, 0, 0); $pdf->Image(dirname(__FILE__) . '/../GiveUsMoneyPlugin/img/sig.png', $check_right_x - 63.5, $check_top_y + 9 * $line_height, 63.5); $pdf->SetXY($check_right_x - 63.5, $check_top_y + 12 * $line_height); $pdf->Cell(63.5, $line_height, 'Authorized By Signature', 'T'); $check_number++; } } $pdf->Output(); }