示例#1
0
 function pdf()
 {
     $this->load->library('cfpdf');
     $pdf = new FPDF('P', 'mm', 'A4');
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 'L');
     $pdf->Cell(10, 7, 'No', 1, 0);
     $pdf->cell(30, 7, 'Tanggal', 1, 0);
     $pdf->cell(30, 7, 'Operator', 1, 0);
     $pdf->cell(38, 7, 'Total', 1, 1);
     // tampilkan dari database
     $pdf->SetFont('Arial', 'B', 'L');
     $data = $this->model_transaksi->laporan_default();
     $no = 1;
     foreach ($data->result() as $d) {
         $total = 0;
     }
     $pdf->SetFont('Arial', 'B', 'L');
     $pdf->Cell(10, 7, $no, 1, 0);
     $pdf->cell(30, 7, $d->tanggal_transaksi, 1, 0);
     $pdf->cell(30, 7, $d->nama_lengkap, 1, 0);
     $pdf->cell(38, 7, '', 1, 1);
     // end
     $pdf->cell(67, 7, 'total', 1, 0, 'L');
     $pdf->cell(38, 7, '', 1, 0);
     $pdf->Output();
 }
$pdf->AddPage();
$codes = array("3ZRCT5L5", "V9K4NFKP", "F4RUH3CX", "PE99XUGV", "7RAA842U", "TSVULCL7", "W8J9TQ34", "49Z6SJD8", "ULLK3EC7", "2DXRNWWQ", "PFXB3X33", "2BSGC6VH", "K7APZR9J", "TBBY545M", "GXXR2UDP", "EP242HFK", "B5BPXTW7", "HAB7G93W", "R7PE4BJR", "FJ8KKCBD", "ACZDZP3Z", "EKH2FNJD", "7MZLG2CH", "6ERVQJUA", "PPSFDAJV", "RGABLEJW", "JJ65C52Q", "3B6FKAUB", "VQSZTZZ8", "3ZHFCKE9", "V9KYR97J", "25PTMJJZ", "6H4C9Z3Z", "D62C6UTT", "UVB4G8W6", "2Q37LUAA", "BLLB96WG", "URY895AA", "P6TNEMLJ", "QAPC92JF", "F5XBA9Z7", "Q3PPWR56", "4XSWBBY7", "DXFTMAXV", "3JYHCKXK", "KDXQ7AA2", "NJ7MPYWC", "GWQ9DYMF", "DM2CZWGJ", "GVHQWH5H", "WE6TAMSK", "KCFJPR9N", "4C48VR7F", "SP2J685S", "ACE7NM2C", "LEMXES7T", "AVEDQQ3V", "UDESHXN3", "3AEZM4Z2", "WUWFC4JC", "L8BUXGHD");
$start_x = 0.25;
$start_y = 0.5625;
$x_size = 1.75;
$y_size = 0.66;
$row_sep = 0.3125;
$cells_per_row = 15;
$cells_per_col = 4;
$cells_per_page = 60;
$cell = 0;
$page = 0;
for ($cell = 0; $cell < count($codes); ++$cell) {
    $newpage = intdiv($cell, $cells_per_page);
    if ($newpage > $page) {
        $pdf->AddPage();
        $page = $newpage;
    }
    $page_cell = $cell - $page * $cells_per_page;
    $row = $page_cell % 15;
    $col = intdiv($page_cell, 15);
    // Draw the party id
    $pdf->SetFont("ufonts.com_century-gothic", "", 8);
    $pdf->setXY($col * ($x_size + $row_sep), $start_y + $row * $y_size);
    $pdf->cell(0.25, 0.66, $cell + 1, 0, 0, "C", false);
    // Draw the code
    $pdf->SetFont("ufonts.com_century-gothic", "", 16);
    $pdf->setXY($start_x + $col * ($x_size + $row_sep), $start_y + $row * $y_size);
    $pdf->cell($x_size, $y_size, $codes[$cell], 0, 0, "C", false);
}
$pdf->Output();
示例#3
0
<?php

require 'fpdf/fpdf.php';
$pdf = new FPDF('P', 'cm', 'A4');
//Titres des colonnes
$header = array('Nom', 'Prenom', 'Adresse e-mail', 'Téléphone', 'Fax', 'Status cotisation');
$pdf->SetFont('Arial', 'B', 14);
$pdf->AddPage();
$pdf->SetFillColor(96, 96, 96);
$pdf->SetTextColor(255, 255, 255);
mysql_connect('localhost', 'root', 'monpass') or die("ERROR DATABASE CONNECTION");
mysql_select_db('compfundation') or die("DATA SELECTION ERRROR");
$query = "select * from intervenants";
$resultat = mysql_query($query);
$pdf->SetXY(3, 3);
for ($i = 0; $i < sizeof($header); $i++) {
    $pdf->cell(5, 1, $header[$i], 1, 0, 'C', 1);
}
$pdf->SetFillColor(0xdd, 0xdd, 0xdd);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial', '', 10);
$pdf->SetXY(3, $pdf->GetY() + 1);
$fond = 0;
while ($row = mysql_fetch_array($resultat)) {
    $pdf->cell(5, 0.7, $row['int_nom'], 1, 0, 'C', $fond);
    $pdf->cell(5, 0.7, $row['int_prenom'], 1, 0, 'C', $fond);
    $pdf->cell(5, 0.7, $row['int_email'], 1, 0, 'C', $fond);
    $pdf->SetXY(3, $pdf->GetY() + 0.7);
    $fond = !$fond;
}
$pdf->output();
 #CASE generating the pdf of items to rennew
 case "generate_renewal_pdf":
     require_once "NestedTree.class.php";
     $tree = new NestedTree($pre . 'nested_tree', 'id', 'parent_id', 'title');
     //Prepare the PDF file
     include '../includes/libraries/fpdf/pdf.fonctions.php';
     $pdf = new FPDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Cell(0, 10, $txt['renewal_needed_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('Arial', 'I', 12);
     $pdf->Cell(0, 10, $txt['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"))), 0, 1, 'C', false);
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(70, 6, $txt['label'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['creation_date'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['expiration_date'], 1, 0, "C", 1);
     $pdf->cell(45, 6, $txt['group'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['author'], 1, 1, "C", 1);
     $pdf->SetFont('Arial', '', 9);
     foreach (explode('@|@', addslashes($_POST['text'])) as $line) {
         $elem = explode('@;@', $line);
         if (!empty($elem[0])) {
             $pdf->cell(70, 6, $elem[0], 1, 0, "L");
             $pdf->cell(25, 6, $elem[1], 1, 0, "C");
             $pdf->cell(25, 6, $elem[2], 1, 0, "C");
             $pdf->cell(45, 6, $elem[3], 1, 0, "C");
             $pdf->cell(25, 6, $elem[4], 1, 1, "C");
         }
     }
示例#5
0
$db = new db();
$db->_DEBUG = 1;
$pdf = new FPDF("L", 'mm', "A4");
$pdf->open();
$pdf->AddPage();
$fonte = 'times';
$pdf->SetLeftMargin(5);
$pdf->SetAutoPageBreak("on", 2);
$pdf->SetFont($fonte, "", 12);
$pdf->sety(15);
$pdf->SetFont($fonte, "b", 12);
$pdf->setx(5);
$pdf->ln();
$pdf->SetFont($fonte, "", 14);
$pdf->setx(5);
$pdf->cell(50, 5, "Controle de Entregas", 0, 1);
$pdf->line(5, $pdf->GetY(), 290, $pdf->GetY());
$pdf->ln(10);
$pdf->setfont($fonte, "B", "14");
$pdf->cell(0, 5, $_GET["dtvenda"], 0, 1, "C");
$pdf->setfillcolor(235);
$pdf->SetFont($fonte, "b", 10);
$total = $db->entregas["total"];
$sql = " SELECT fun_nome,count(*) as total\n         FROM   comandas inner join comandaentrega \n                on cet_comid = com_id\n                inner join funcionarios on fun_id = cet_funid\n         WHERE com_dtcomanda = '" . strformat($_GET["dtvenda"], "dten") . "' group by fun_nome order by fun_nome";
$rs = $db->executa($sql);
$pdf->cell(140, 5, "Funcionário", "B", 0, "C", 1);
$pdf->cell(45, 5, "Qtde", "B", 1, "C", 1);
$pdf->SetFont($fonte, "", 10);
while ($ln = $db->fetch_array($rs)) {
    if ($pdf->getY() >= $pdf->h - 15) {
        $pdf->addpage();
$row = 6;
while ($data = mysql_fetch_array($sql)) {
    $rak = mysql_query("select*from rak where id='{$data['rak']}'");
    $kar = mysql_fetch_array($rak);
    if ($ya > 250) {
        $pdf->addPage();
        $ya = 6;
        $pdf->text(10, 280, 'Perpustakaan Online SMK Negeri 10 Jakarta');
    }
    $pdf->setXY(10, $ya);
    $pdf->setFont('arial', '', 9);
    if ($no % 2 == 0) {
        $pdf->setFillColor(183, 255, 255);
    } else {
        if ($no % 2 == 1) {
            $pdf->setFillColor(183, 255, 127);
        }
    }
    $pdf->cell(10, 6, $no, 1, 0, 'C', 1);
    $pdf->cell(20, 6, $data[id], 1, 0, 'C', 1);
    $pdf->cell(80, 6, $data[Judul], 1, 0, 'L', 1);
    $pdf->cell(60, 6, $kar[nama], 1, 0, 'L', 1);
    $pdf->cell(20, 6, $data[Jumlah], 1, 0, 'C', 1);
    $ya = $ya + $row;
    $no++;
    $i++;
    if ($no < 3) {
        $pdf->text(10, 280, 'Perpustakaan Online SMK Negeri 10 Jakarta');
    }
}
$pdf->Output();
示例#7
0
$db = new db();
$pdf = new FPDF("L", 'mm', "A4");
$pdf->open();
$pdf->AddPage();
$fonte = 'times';
$pdf->SetLeftMargin(5);
$pdf->SetAutoPageBreak("on", 2);
$pdf->SetFont($fonte, "", 12);
$pdf->sety(15);
$pdf->SetFont($fonte, "b", 12);
$pdf->setx(5);
$pdf->ln();
$pdf->Text(230, 10, "Emissão: " . date("d/m/Y"));
$pdf->SetFont($fonte, "", 14);
$pdf->setx(5);
$pdf->cell(50, 5, "Lista de clintes Duplos", 0, 1);
$pdf->line(5, $pdf->GetY(), 290, $pdf->GetY());
$pdf->ln(10);
$pdf->setfillcolor(235);
$pdf->SetFont($fonte, "b", 10);
$pdf->cell(170, 5, "Cliente", 1, 0, "C", 1);
$pdf->cell(45, 5, "Fone", 1, 1, "C", 1);
$sql = "SELECT distinct cli_nome, \n               cli_foneprinc\n        from   clientes\n        group  by cli_nome,cli_foneprinc having count(*) > 1";
$rs = $db->executa($sql);
$pdf->SetFont($fonte, "", 10);
while ($ln = $db->fetch_array($rs)) {
    if ($pdf->getY() >= $pdf->h - 15) {
        $pdf->addpage();
        $pdf->SetFont($fonte, "b", 10);
        $pdf->cell(170, 5, "Cliente", 1, 0, "C", 1);
        $pdf->cell(45, 5, "Fone", 1, 1, "C", 1);
示例#8
0
$rezulto = sql_faru(datumbazdemando(array("p.ID", "pn.ID"), array("partoprenantoj" => "p", "partoprenoj" => "pn"), array("alvenstato = 'a'", "partoprentipo = 't'"), "renkontigxoID"));
while ($row = mysql_fetch_array($rezulto, MYSQL_NUM)) {
    $gesamt += 1;
    $partoprenanto = new Partoprenanto($row[0]);
    $seksagxo[$partoprenanto->datoj[sekso]][$partoprenanto->datoj[agxo]] += 1;
    $partopreno = new Partopreno($row[1]);
    $ko = new Kotizo($partopreno, $partoprenanto, $_SESSION["renkontigxo"]);
    $kotizo += $ko->kotizo;
    $pagantoj[$ko->agxkategorio][$ko->aligxkategorio][$ko->landakategorio][$partopreno->datoj[domotipo]] += 1;
    //echo $ko->agxkategorio." / ".$ko->aligxkategorio." / ".$ko->landakategorio." / ".$partopreno->datoj[domotipo]." <BR>";
    //echo "Ko: ".$ko->kotizo;
}
//echo "entute: $gesamt<br>";
$pdf->setY(30);
$pdf->text(20, 65, "entute: {$gesamt}");
$pdf->cell(20, 4, "domo", 1, 0, C);
$pdf->cell(21, 4, "<1.10.", 1, 0, C);
//bei Bedarf aus der DB holen
$pdf->cell(21, 4, "<1.12.", 1, 0, C);
$pdf->cell(21, 4, ">=1.12.", 1, 1, C);
for ($i = 2; $i >= 0; $i--) {
    $pdf->cell(20, 4, $i, 1, 0, C);
    for ($j = 2; $j >= 0; $j--) {
        for ($k = A; $k <= C; $k++) {
            $pdf->cell(7, 4, $pagantoj[$i][$j][$k][J], 1, 0, C);
        }
    }
    $pdf->ln();
    //echo "<BR> ";
}
//  echo "MEM:<BR>";
<?php

require "fpdf/fpdf.php";
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial", "B", "20");
$pdf->cell(0, 10, "hello,world");
$pdf->Output();
示例#10
0
$factions = get_project_factions($project_id);
$firstPage = true;
foreach ($characters as $faction_num => $faction_characters) {
    if ($factions[$faction_num]['deleted']) {
        continue;
    }
    foreach ($faction_characters as $character_num => $faction_character) {
        if ($faction_character['deleted']) {
            continue;
        }
        if (!$firstPage) {
            $pdf->AddPage();
        }
        $firstPage = false;
        $character_data = get_character_data($project_id, $faction_character['character_id']);
        $pdf->cell(45, 10, 'Character: ' . $faction_character['character_name'], 0, 0, 'L');
        $pdf->cell(45, 10, 'Player: ' . $faction_character['player_name'], 0, 0, 'L');
        $pdf->cell(45, 10, 'Faction: ' . $factions[$faction_num]['faction_name'], 0, 0, 'L');
        $pdf->cell(45, 10, 'Priority: ' . $faction_character['priority_label'], 0, 1, 'L');
        $pdf->multicell(90, 4, 'Bio: ' . $faction_character['character_bio'], 0, 2);
        $pdf->Ln();
        $inner_characters = $characters;
        foreach ($inner_characters as $inner_faction_num => $inner_faction_characters) {
            if ($factions[$inner_faction_num]['deleted']) {
                continue;
            }
            $pdf->cell(45, 4, $factions[$inner_faction_num]['faction_name'], 0, 1);
            foreach ($inner_faction_characters as $inner_character_num => $inner_faction_character) {
                if ($inner_faction_character['deleted']) {
                    continue;
                }
示例#11
0
<?php

define('FPDF_FONTPATH', 'fpdf151/font/');
require 'fpdf151/fpdf.php';
include "libs/classes.class";
include "libs/funcoes.php";
$db = new db();
$sql = str_replace("#\$", "'", $str_sql);
$rs = $db->executa($sql);
echo $sql;
$pdf = new FPDF('L', 'mm', 'A4');
$pdf->Open();
$pdf->AddPage();
$Letra = 'Times';
$pdf->setfont($Letra, 'b', 12);
//cabeçalho
$pdf->Image('libs/imagens/logocab.jpg', 10, 10, 30, 30);
$pdf->Image('libs/imagens/Brasao.png', 180, 10, 20, 28);
$pdf->sety(15);
$pdf->cell(0, 5, "SECRETARIA MUNICIPAL DE EDUCAÇÃO E DESPORTO", 0, 1, "C");
$pdf->setxy(50, 30);
$pdf->setfont($Letra, 'b', 10);
//Nome da Escola
$pdf->cell(15, 5, "Relatório das instituições", 0, 1, "L");
$pdf->setxy(10, 50);
$pdf->SetFillColor(204);
for ($i = 0; $i < pg_num_fields($rs); $i++) {
    $pdf->cell(50, 5, ucfirst(pg_field_name($rs, $i)), 1, 0, 'C');
}
//$pdf->output();
示例#12
0
    public function makepdf()
    {
        global $user;
        // Get required files.
        require_once 'others/fpdf/fpdf.php';
        // Set some document variables
        $author = "eduCloud";
        $x = 35;
        $text = <<<EOT
Hello
EOT;
        // Create fpdf object
        $pdf = new FPDF('P', 'pt', 'Letter');
        // Set base font to start
        $pdf->SetFont('Arial', 'B', 16);
        // Add a new page to the document
        $pdf->addPage();
        $pdf->setLeftMargin($x);
        //page border
        $pdf->Line(35, 30, 35, 750);
        $pdf->Line(35, 30, 575, 30);
        $pdf->Line(575, 30, 575, 750);
        $pdf->Line(575, 750, 35, 750);
        //end of page border
        // Set the x,y coordinates of the cursor
        $pdf->SetXY($x + 20, 40);
        // Write 'Simple PDF' with a line height of 1 at the current position
        $pdf->Write(25, 'Employee Details');
        $pdf->Image($_SERVER['DOCUMENT_ROOT'] . '/cloud/images/school_logo.jpg', 500, 35, 50, 50, 'JPG');
        // Reset the font
        // Reset font, color, and coordinates
        $pdf->SetFont('Arial', '', 12);
        $pdf->SetTextColor(0, 0, 0);
        $pdf->SetLeftMargin($x + 50);
        $pdf->setXY($x + 50, 90);
        global $objPDO;
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
        $record = new Teacher($objPDO);
        if ($user->checkAdmin()) {
            $eid = $_GET['uid'];
        } else {
            $student = new Student($objPDO, $user->getuserId());
            $eid = $student->getID();
        }
        $record->loadByUserId($eid);
        // Write out a long text blurb.
        //$array=$record->getAsArray();
        //$x=0;
        /* TEMPLATE 1 DESIGN*/
        $pdf->SetFont('Arial', '', 8);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Employee Id (reference) : ' . $record->getTeacherId(), 0, 1, 'L', true);
        $pdf->SetFont('Arial', '', 12);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Employee Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Employee Name', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Qualification', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getQualification(), 0, 1, 'C', true);
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
        $subject_id = new Subject($objPDO);
        $subject_id->setID($record->getSubjectId());
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Subject', 0, 0, 'C', true);
        $pdf->cell(250, 20, $subject_id->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Date Of Birth', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getDateOfBirth(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Gender', 0, 0, 'C', true);
        $pdf->cell(250, 20, ucfirst($record->getGender()), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Blood Group', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getBloodGroup(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, '', 0, 1, 'C', true);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Contact Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Correspondence Address', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine1(), 0, 1, 'C', true);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine2(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'City', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceCity(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'State', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceState(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Pincode', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondencePincode(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Phone', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getPhone(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Mobile', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getMobile(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Email', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getEmail(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(450, 20, '', 0, 1, 'C', true);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Login Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Employee Id *', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getTeacherId(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Temporary Password **', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getTempPass(), 0, 1, 'C', true);
        /* TEMPLATE 1 DESIGN END*/
        $pdf->SetFont('Arial', '', 10);
        $pdf->SetXY($x + 100, 620);
        $pdf->write(15, 'Employee\'s Signature');
        $pdf->SetXY($x + 350, 620);
        $pdf->write(15, 'Admin\'s Signature');
        $pdf->SetFont('Arial', '', 8);
        $pdf->SetXY($x + 20, 710);
        $pdf->write(15, '* Employee Id may be Temporary , ** Please Change the Password for Security Reasons');
        $pdf->SetXY($x + 20, 720);
        $pdf->write(15, 'This is a Computer Generated Form. If any Discrepancy Contact Admin : eduCloud Reference Number ' . $user->getuserId());
        // Close the document and save to the filesystem with the name simple.pdf
        $pdf->Output('generated_files/enroll' . $record->getUserId() . '.pdf', 'F');
        header('Location:http://localhost/cloud/generated_files/enroll' . $record->getUserId() . '.pdf');
    }
    //En-tête
    $w = array(50, 25, 25, 80);
    $atelier = array('Date', 'Heure', 'Durée', 'Sujet');
    for ($i = 0; $i < 4; $i++) {
        $courrier->Cell($w[$i], 7, $atelier[$i], 0, 0, 'C', 1);
    }
    $courrier->Ln();
    //Restauration des couleurs et de la police
    $courrier->SetFillColor(219, 239, 204);
    $courrier->SetTextColor(0, 0, 0, 0);
    $courrier->SetFont('SourceSansPro-Regular', '', 10);
    //Données
    $fill = false;
    $courrier->SetAutoPageBreak(1, 30);
    while ($row = mysqli_fetch_array($rowatelier)) {
        $courrier->cell(50, 7, getDayfr($row['date_atelier']), 0, 0, 'C', $fill);
        $courrier->cell(25, 7, $row['heure_atelier'], 0, 0, 'C', $fill);
        $courrier->cell(25, 7, $row['duree_atelier'] . ' min', 0, 0, 'C', $fill);
        $courrier->cell(80, 7, $row['label_atelier'], 0, 1, 'C', $fill);
        //getSujet($row['id_sujet']);
        $fill = !$fill;
    }
    $courrier->Ln(6);
} else {
    $courrier->Write(5, "Vous n'êtes inscrit à aucun atelier actuellement.");
}
//****Liste d'attente aux ateliers
if ($nbattente > 0) {
    $courrier->MultiCell(0, 5, utf8_decode('Vous êtes inscrit(e) en attente pour les ateliers suivants'), 0, 'J', false);
    $courrier->SetFillColor(230, 230, 230);
    $courrier->SetTextColor(46, 46, 46);
示例#14
0
	
		include("membrete_recibos.php");
		
		$nombre = $ren_emp["nombre"];
		$dia = $row_dia['dia'];
		$ur = $ren_emp["ur"];
		$idarea = $ren_emp["idarea"];
		$rfc = $ren_emp["rfc"];
		$fechaingr = $ren_emp["fechaingr"];
		$nafiliacion = $ren_emp["nafiliacion"];
		$curp = $ren_emp["curp"];
		$jornada = $ren_emp["jornada"];
		$salariofv = $ren_emp["salariofv"];
	
	
		$pdf->cell(15,5,"Nombre: ", 0, 0, 'L');
		$pdf->cell(85,5,$nombre, 0, 0, 'L');
		$pdf->cell(25,5,"D�as del per�odo: ", 0, 0, 'L');
		$pdf->cell(75,5,$dia, 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"UR: ", 0, 0, 'L');
		$pdf->cell(85,5,$ur, 0, 0, 'L');
		$pdf->cell(25,5,"Per�odo del: ", 0, 0, 'L');
		$pdf->cell(75,5,$_POST["fdesde"], 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"R.F.C.:", 0, 0, 'L');
		$pdf->cell(85,5,$rfc, 0, 0, 'L');
		$pdf->cell(25,5,"Al: ", 0, 0, 'L');
		$pdf->cell(75,5,$_POST["fhasta"], 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"Ingreso: ", 0, 0, 'L');
示例#15
0
 function genCarpentras2()
 {
     global $options;
     # paramètres
     $mg = 3;
     // Marge de gauche =>  initial 17
     $mh = 13;
     // Marge du haut =>  initial 9
     $md = 0;
     // Marge de droite
     $mb = 11;
     // Marge du bas
     $largeur_etiquette = 70;
     // largeur_etiquette =>  initial 60
     $espace_etiquettes = 0;
     // =>  initial 7
     $nb_ligne_etiquettes = 11;
     $nb_etiquette_ligne = 3;
     $hauteur_etiquette = 25;
     // Préparation du document PDF.
     $pdf = new FPDF('P', 'mm', 'A4');
     $pdf->Open();
     $pdf->SetLeftMargin($mg);
     $pdf->SetTopMargin($mh);
     $pdf->SetAutoPageBreak(1, 0);
     $pdf->AddPage();
     // Gestion des fonts
     $pdf->AddFont('code39', '', 'IDAutomation_Code_39.php');
     $pdf->SetFont('times', '', 12);
     // Préparation des informations.
     $nom = strtoupper($this->patient->getNom());
     $prenom = strtoupper($this->patient->getPrenom());
     $date = new clDate($this->patient->getDateNaissance());
     $dateN = $date->getDate("d/m/Y");
     if ($this->patient->getSexe() == "F") {
         $sexe = "F";
         $e = "e";
     } elseif ($this->patient->getSexe() == "M") {
         $sexe = "M";
         $e = "";
     } else {
         $sexe = "Ind.";
         $e = "";
     }
     $date->setDate($this->patient->getDateAdmission());
     $led = $date->getDate("d/m/Y");
     $ipp = $this->patient->getILP();
     $nsej = $this->patient->getNSej();
     $uf = $this->patient->getUF();
     for ($i = 0; $i < $nb_ligne_etiquettes; $i++) {
         for ($j = 0; $j < $nb_etiquette_ligne; $j++) {
             $l = $j * $largeur_etiquette + $mg;
             $h = $i * $hauteur_etiquette + $mh;
             $le = $largeur_etiquette - $mg;
             $pdf->setY($h);
             $pdf->setX($l);
             $pdf->setFont('times', '', 9);
             $pdf->Cell($le, 4, "Dossier : ", 0, 0, L);
             $pdf->setY($h);
             $pdf->setX($l + 17);
             $pdf->setFont('times', 'b', 9);
             $pdf->cell($le - 10, 4, $nsej, 0, 0, L);
             //$pdf->setFont('times', '', 9 ) ;
             $pdf->setY($h);
             $pdf->setX($l);
             $pdf->cell($le - 10, 4, "U", 0, 0, R);
             $pdf->setY($h + 4);
             $pdf->setX($l);
             $pdf->setFont('times', '', 9);
             $pdf->cell($le, 4, $nom . " " . $prenom, 0, 0, L);
             $pdf->setY($h + 9);
             $pdf->setX($l);
             $pdf->cell($le, 4, "Né{$e} le : {$dateN}", 0, 0, L);
             $pdf->setY($h + 9);
             $pdf->setX($l);
             $pdf->cell($le - 10, 4, "Sexe : {$sexe}", 0, 0, R);
             $pdf->setY($h + 13);
             $pdf->setX($l);
             $pdf->cell($le, 4, "Le : {$led}", 0, 0, L);
             $pdf->setY($h + 13);
             $pdf->setX($l);
             $pdf->cell($le - 10, 4, "UF : {$uf}", 0, 0, R);
             $pdf->setY($h + 17);
             $pdf->setX($l);
             $pdf->cell($le - 10, 4, "NIP : {$ipp}", 0, 0, L);
         }
     }
     $pdf->Output();
 }
示例#16
0
     }
 }
 //Build PDF
 if (!empty($full_listing)) {
     //Prepare the PDF file
     include '../includes/libraries/fpdf/pdf.fonctions.php';
     $pdf = new FPDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Cell(0, 10, $txt['print_out_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('Arial', 'I', 12);
     $pdf->Cell(0, 10, $txt['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"))) . ' ' . $txt['by'] . ' ' . $_SESSION['login'], 0, 1, 'C', false);
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(65, 6, $txt['label'], 1, 0, "C", 1);
     $pdf->cell(55, 6, $txt['login'], 1, 0, "C", 1);
     $pdf->cell(70, 6, $txt['pw'], 1, 1, "C", 1);
     $pdf->SetFont('Arial', '', 9);
     foreach ($full_listing as $item) {
         $pdf->cell(65, 6, stripslashes($item['label']), 1, 0, "L");
         $pdf->cell(55, 6, stripslashes($item['login']), 1, 0, "C");
         $pdf->cell(70, 6, stripslashes($item['pw']), 1, 1, "C");
     }
     $pdf_file = "print_out_pdf_" . date("Y-m-d", mktime(0, 0, 0, date('m'), date('d'), date('y'))) . ".pdf";
     //send the file
     $pdf->Output($_SESSION['settings']['cpassman_dir'] . "\\files\\" . $pdf_file);
     //Open PDF
     echo 'window.open(\'' . $_SESSION['settings']['cpassman_url'] . '/files/' . $pdf_file . '\', \'_blank\');';
     //reload
     echo 'LoadingPage();';
示例#17
0
require './lib/php/fpdf/fpdf.php';
require '../admin/lib/php/db_pg.php';
require '../admin/lib/php/classes/cat.class.php';
require '../admin/lib/php/classes/catManager.class.php';
$buffer = ob_get_clean();
$db = Connexion::getInstance($dsn, $user, $pass);
$mg = new catManager($db);
$data = $mg->getCat();
$pdf = new FPDF('L', 'cm', 'A4');
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 15);
$pdf->cell(3, 10, $pdf->Image('../admin/images/print2.png', 0, 0), 0, 0, 'L');
$pdf->Ln();
$pdf->cell(3.5, 1, 'Catalogue de DVD en folie', 0, 0, 'L');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Ln();
$pdf->cell(10, 0.7, 'Titre', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Prix', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Genre', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Realisateur', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Support', 1, 0, 'C');
$pdf->Ln();
for ($i = 0; $i < count($data); $i++) {
    $titre = $data[$i]->titre;
    $prix = $data[$i]->prix;
    $genre = $data[$i]->genre;
    $realisateur = $data[$i]->realisateur;
		$pdf->AddPage();
	
		include("membrete_recibos.php");
		
		$nombre = $ren_emp["nombre"];
		$dia = $ren_emp["dia"];
		$ur = $ren_emp["ur"];
		$rfc = $ren_emp["rfc"];
		$fechaingr = $ren_emp["fechaingr"];
		$nafiliacion = $ren_emp["nafiliacion"];
		$curp = $ren_emp["curp"];
		$jornada = $ren_emp["jornada"];
		$salariofv = $ren_emp["salariofv"];
	
	
		$pdf->cell(15,5,"Nombre: ", 0, 0, 'L');
		$pdf->cell(85,5,$nombre, 0, 0, 'L');
		$pdf->cell(25,5,"Días del período: ", 0, 0, 'L');
		$pdf->cell(75,5,$dia, 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"UR: ", 0, 0, 'L');
		$pdf->cell(85,5,$ur, 0, 0, 'L');
		$pdf->cell(25,5,"Período del: ", 0, 0, 'L');
		$pdf->cell(75,5,$_POST["fdesde"], 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"R.F.C.:", 0, 0, 'L');
		$pdf->cell(85,5,$rfc, 0, 0, 'L');
		$pdf->cell(25,5,"Al: ", 0, 0, 'L');
		$pdf->cell(75,5,$_POST["fhasta"], 0, 0, 'L');
		$pdf->Ln(5);
		$pdf->cell(15,5,"Ingreso: ", 0, 0, 'L');
示例#19
0
    $pdf->cell(20, 10, $nop, 1, 0);
    $pdf->cell(50, 10, $total, 1, 0);
    $pdf->Output();
}
if (isset($_POST['veg_book'])) {
    $appe = json_encode($_POST['appe_order']);
    $first = json_encode($_POST['first_order']);
    $main = json_encode($_POST['main_order']);
    $dessert = json_encode($_POST['dessert_order']);
    $pp = 300;
    $total = $nop * $pp;
    $category = "Veg-Meal";
    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->SetFont("Arial", "B", 60);
    $pdf->cell(180, 30, "PM Banquet", 1, 1, "C");
    $pdf->SetFont("Arial", "B", 16);
    $pdf->cell(180, 10, "Thank You for choosing us.", 1, 1, "C");
    $pdf->SetFont("Arial", "B", 16);
    $pdf->cell(90, 10, "Booking ID:{$id}", 1, 1, "C");
    $pdf->SetFont("Arial", "B", 16);
    $pdf->cell(40, 10, "", 0, 1);
    $pdf->cell(40, 10, "Appetizers", 0, 1, "C");
    $pdf->SetFont("Arial", "B", 10);
    $pdf->cell(180, 30, "{$appe}", 1, 1);
    $pdf->SetFont("Arial", "B", 16);
    $pdf->cell(40, 10, "First-Meal", 0, 1, "C");
    $pdf->SetFont("Arial", "B", 12);
    $pdf->cell(180, 30, "{$first}", 1, 1);
    $pdf->SetFont("Arial", "B", 16);
    $pdf->cell(40, 10, "Main-Meal", 0, 1, "C");
示例#20
0
include '../connect.php';
date_default_timezone_set('mexico/general');
$fch1 = date("Y-m-d") . " 00:00:00";
$fch2 = date("Y-m-d") . " 23:59:59";
require '../fpdf.php';
$pdf = new FPDF('P', 'mm', array(80, 297));
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 12);
$pdf->Image("../images/logo.png", "25", "10", "30", "10");
$pdf->Cell(0, 5, '', 0, 1, 'C');
$pdf->Cell(4, 1, '                 BIOGYM GEOVILLAS');
$pdf->Ln();
$pdf->Cell(4, 10, '   BLVD NUEVO HIDALGO 100 LOCAL 3');
$pdf->Cell(4, 20, '     FRACC GEOVILLAS C.P. 42083');
$pdf->cell(40, 10, date("Y-m-d"));
$pdf->cell(40, 10, date("H:i:s"));
$pdf->Cell(0, 5, 'Registro de Pagos Extra (Egresos)', 0, 1, "C");
$pdf->Cell(0, 5, '', 0, 1, 'C');
$pdf->Cell(0, 5, '', 0, 1, 'C');
$pdf->SetFont('Arial', 'B', 10);
$query = "SELECT tipo, SUM(cantidad) FROM pagosextras  where fecha BETWEEN '{$fch1}' AND '{$fch2}'  GROUP BY tipo";
$pdf->SetFont('Arial', '', 8);
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
    $pdf->Cell(60, 5, $row['concepto'], 1);
    $pdf->Cell(20, 5, $row['cantidad'], 1, 0);
}
$pdf->Output('Listado de Socios', 'I');
?>
								   
示例#21
0
<?php

require_once "./fpdf/fpdf.php";
$pdf = new FPDF();
$pdf->addPage();
$pdf->setFont('Arial', 'B', 16);
$pdf->cell(40, 10, 'Hello Out There!');
$pdf->output();
示例#22
0
		$PA=mysqli_query($conexion_extra,"CALL calcula_imss('$ren[id]','$quincena',@sec)");
		$row=mysqli_fetch_array($PA);
		$importe_imss=$row['total'];
		mysqli_close($conexion_extra);
		$insert="INSERT INTO nominapago(idnominaemp,cve_concepto,importe,tipo,quincena,anio,fechaemision,usuario,cve_sat,idarea) 
		VALUES('$ren[id]','274','$importe_imss','D','$quincena',YEAR(NOW()),CURDATE(),'2','021','$ren[ur]')";
		mysql_query($insert,$conexion);*/
		//-------------------------------------------------------------------------------------
		
		if($otraur != $ren["ur"])
		{
			$pdf->SetTextColor(0);
			$pdf->SetDrawColor(0,0,0);
			$pdf->SetLineWidth(.2);
			
			$pdf->cell(57,7,"SUBTOTAL ($emp)", 1, 0, 'C');
			$pdf->cell(22,7,number_format($Ssueldobase, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(22,7,number_format($Scompensacion, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(22,7,number_format($Sprima, 2, ".", ","), 1, 0, 'R');	
			$pdf->cell(20,7,number_format($Saguinaldo, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(22,7,number_format($Sotrasper, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(17,7,number_format($Sisr, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(17,7,number_format($Simss, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(22,7,number_format($Sotrasded, 2, ".", ","), 1, 0, 'R');
			$pdf->cell(22,7,number_format($Sneto, 2, ".", ","), 1, 0, 'R');
			
			$Ssueldobase = 0;
			$Scompensacion = 0;
			$Sprima = 0;
			$Saguinaldo = 0;
			$Sotrasper = 0;
示例#23
0
<?php

include '../connect.php';
date_default_timezone_set('mexico/general');
$f1 = $_GET['f1'];
$f2 = $_GET['f2'];
require '../fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(4, 1, 'BIOGYM');
$pdf->Ln();
$pdf->Cell(40, 10, 'Reporte Socios inscritos.');
$pdf->Ln();
$pdf->cell(40, 10, "DE: " . $f1);
$pdf->cell(40, 10, "              Hasta: " . $f2);
$pdf->Ln();
$pdf->Cell(4, 10, '----------------------------------------------------------------------');
$pdf->Ln();
$pdf->Cell(40, 10, 'ID                                Socios.                              Area.                           Fecha. ');
$pdf->Ln();
$query = "SELECT acceso.id_socio as id,socios.nombre as nombre ,socios.ap as ap, socios.membresia as area, acceso.ultimopago as fecha FROM acceso inner join socios on acceso.id_socio=socios.id_socio where acceso.ultimopago BETWEEN '{$f1}' AND '{$f2}' ";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
    if ($row['area'] == "") {
        $no = "NO ESPECIFICADA";
    } else {
        $no = $row['area'];
    }
    $pdf->Cell(4, 1, $row['id'] . "|               " . $row['nombre'] . " " . $row['ap'] . "|          " . $no . "|       " . $row['fecha']) . "\n";
    $pdf->Ln();
$pdf->SetFont('Arial', '', 18);
$pdf->Cell(5, 10, '', 0);
$pdf->Cell(70, 10, 'Universidad Nacional Autonoma de Honduras', 0);
$pdf->Ln(8);
$pdf->Cell(18, 10, '', 0);
$pdf->SetFont('Arial', '', 16);
$pdf->Cell(35, 10, '', 0);
$pdf->Cell(70, 10, 'Facultad de ciencias Juridicas', 0);
$pdf->Ln(13);
$pdf->SetFont('Arial', 'U', 14);
$pdf->Cell(30, 8, ' ', 0, 0, "C");
$pdf->Cell(125, 8, 'Plan operativo Anual', 0, 0, "C");
//$pdf->Rect(6, 45, 200, 230 ,'D');
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(10);
$pdf->cell(5, 8, '');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->cell(5, 8, '');
$pdf->Cell(70, 10, 'Actividades Faltantes', 0);
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(20);
$pdf->cell(10, 8, '');
$pdf->cell(20, 8, 'Codigo', 1);
$pdf->cell(30, 8, 'Correlativo', 1);
$pdf->cell(30, 8, 'Fecha Inicio', 1);
$pdf->cell(30, 8, 'Fecha Fin', 1);
$pdf->cell(70, 8, 'Descripcion', 1);
$pdf->ln(10);
$contador = 0;
while ($row = mysql_fetch_array($query)) {
示例#25
0
<?php

define('FPDF_FONTPATH', '.');
require '../../fpdf.php';
$pdf = new FPDF();
$pdf->addFont('Calligrapher', '', 'calligra.php');
$pdf->addPage();
$pdf->setFont('Calligrapher', '', 35);
$pdf->cell(0, 10, 'Enjoy new fonts with FPDF!');
$pdf->output();
$pdf->SetFont('Arial', '', 18);
$pdf->Cell(5, 10, '', 0);
$pdf->Cell(70, 10, 'Universidad Nacional Autonoma de Honduras', 0);
$pdf->Ln(8);
$pdf->Cell(18, 10, '', 0);
$pdf->SetFont('Arial', '', 16);
$pdf->Cell(35, 10, '', 0);
$pdf->Cell(70, 10, 'Facultad de ciencias Juridicas', 0);
$pdf->Ln(13);
$pdf->SetFont('Arial', 'U', 14);
$pdf->Cell(30, 8, ' ', 0, 0, "C");
$pdf->Cell(125, 8, 'Plan operativo Anual', 0, 0, "C");
//$pdf->Rect(6, 45, 200, 230 ,'D');
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(10);
$pdf->cell(5, 8, '');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->cell(5, 8, '');
$pdf->Cell(70, 10, ' Actividades Realizadas', 0);
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(20);
$pdf->cell(10, 8, '');
$pdf->cell(20, 8, 'Codigo', 1);
$pdf->cell(50, 8, 'Fecha', 1);
$pdf->cell(40, 8, 'Comite', 1);
$pdf->cell(60, 8, 'Descripcion', 1);
$pdf->ln(10);
$contador = 0;
$costotot = 0;
while ($row = mysql_fetch_array($query)) {
$pdf->setfont('arial', '', 8);
$pdf->text($coluna, 9, $ender);
$pdf->text($coluna, 12, $munic . ' - ' . $uf);
$pdf->text($coluna, 15, $telef);
$pdf->text($coluna, 18, $email);
$pdf->text($coluna, 21, $url);
$clquery->sql_query("cgm", "z01_nome", "", "z01_numcgm= {$q20_numcgm}");
$clquery->sql_record($clquery->sql);
db_fieldsmemory($clquery->result, 0);
$pdf->sety(25);
$pdf->setfont('arial', 'B', 10);
$pdf->multicell(0, 4, 'ISSQN COM RETENÇÃO NA FONTE', 0, "C", 0);
$pdf->ln(5);
$altura = 6;
$pdf->setfont('arial', 'B', 8);
$pdf->cell(130, $altura, 'TOMADOR DO SERVIÇO', 1, 0, "C", 0);
$pdf->cell(60, $altura, 'DADOS DA PLANILHA', 1, 1, "C", 0);
$pdf->setfont('arial', '', 8);
$pdf->cell(130, $altura, 'NOME : ' . strtoupper($z01_nome), 1, 0, "L", 0);
$pdf->cell(60, $altura, 'CODIGO : ' . db_formatar($planilha, 's', '0', 4, 'e'), 1, 1, "L", 0);
$pdf->cell(130, $altura, 'INSCRIÇÃO : ' . $q20_inscr, 1, 0, "L", 0);
$pdf->cell(60, $altura, 'COMPETÊNCIA : ' . db_formatar($q20_mes, 's', '0', 2, 'e') . '/' . $q20_ano, 1, 1, "L", 0);
$pdf->multicell(190, $altura, 'OBSERVAÇÃO :  Os valores registrados nesta planilha somente serão considerados após o pagamento desta guia.', 1, "L", 0);
$linha = 65;
for ($i = 0; $i < 2; $i++) {
    $pdf->SetLineWidth(0.05);
    //$pdf->SetDash(1,1);
    $pdf->Line(5, $linha - 2, 205, $linha - 2);
    // linha tracejada horizontal
    //$pdf->SetDash();
    $pdf->Line(47, $linha, 47, $linha + 9);
示例#28
0
$pdf->setFont('Arial', '', 9);
$pdf->setFillColor(222, 222, 222);
$pdf->setXY(10, $ya);
$pdf->CELL(6, 6, 'ID', 1, 0, 'C', 1);
$pdf->CELL(40, 6, 'Username', 1, 0, 'C', 1);
$pdf->CELL(50, 6, 'Password', 1, 0, 'C', 1);
$ya = $yi + $row;
$sql = "SELECT id, password, username FROM user";
$result = $conn->query($sql);
$i = 1;
$no = 1;
$max = 31;
//$row = 6;
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $pdf->setXY(10, $ya);
        $pdf->setFont('arial', '', 9);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(6, 6, $row["id"], 1, 0, 'C', 1);
        $pdf->cell(40, 6, $row["username"], 1, 0, 'L', 1);
        $pdf->cell(50, 6, $row["password"], 1, 0, 'L', 1);
        //$ya = $ya+$row;
        //$no++;
        //$i++;
        //$dm[id] = $row[0];
    }
}
$pdf->text(150, $ya + 6, "Regards , " . date('d-M-Y'));
$pdf->text(150, $ya + 20, "ARC Digital");
//$pdf->WriteHTML("This is a <img src='<img src="barcode.php?text='.$txt1.'" alt="testing">' test");
$pdf->output();
示例#29
0
$pdf->Cell(65, 5, ': ' . $row['tempat'] . ', ' . $tgl_lahir[2] . '-' . $tgl_lahir[1] . '-' . $tgl_lahir[0], 0, 0, 'l', 0);
$pdf->Cell(5, 5, '3. Bagi yang menemukan kartu ini, harap dilaporkan. ', 0, 0, 'l', 0);
$pdf->Ln();
$pdf->SetX(13);
$pdf->Cell(30, 5, 'Keperluan', 0, 0, 'L', 0);
$pdf->Cell(65, 5, ': ' . $row['prodi'], 0, 0, 'l', 0);
$pdf->Cell(5, 5, '    ke security ', 0, 0, 'l', 0);
$pdf->Ln();
//$pdf->Cell(98);$pdf->Cell(5,5,' ke security',0,0,'l',0);$pdf->Ln();
//$pdf->Rect(15, 52, 20, 25 , 'D') ;
if (!empty($row['photo_url'])) {
    $pdf->Image($row['photo_url'], 70, 38, 22, 0);
}
$pdf->SetFont('Arial', '', 10);
$tglskr_temp = date("d - m - Y");
$pdf->SetY($y_axis1 + 45);
$pdf->cell(12);
$pdf->cell(6, 5, 'BSD, ' . $tglskr_temp);
$pdf->Ln();
$pdf->cell(40);
$pdf->cell(6, 5, '');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial', 'BU', 9);
$pdf->cell(12);
$pdf->cell(50, -20, 'Yasin Yusuf, S.Kom.');
$pdf->Ln(3);
$pdf->SetFont('Arial', 'B', 9);
//				mysql_close;
$pdf->Output();
示例#30
-1
 public function download()
 {
     define('FPDF_FONTPATH', APPPATH . 'plugins/fpdf/font/');
     require APPPATH . 'plugins/fpdf/fpdf.php';
     $this->load->helper('url');
     $getmed = $this->dbroom->getmedical();
     $getlau = $this->dbroom->getlaundry();
     $data['mednil'] = 0;
     $data['launil'] = 0;
     if ($getmed->num_rows() == 0) {
         $data['mednil'] = 1;
     }
     if ($getlau->num_rows() == 0) {
         $data['launil'] = 1;
     }
     $pdf = new FPDF('p', 'mm', 'a4');
     $pdf->AddPage();
     $pdf->setDisplayMode('fullpage');
     $pdf->setFont('times', 'B', '20');
     if (!$data['mednil']) {
         $pdf->write(10, "\nStudents Asked for Medical Help\n\n");
         $pdf->setFont('times', 'B', '15');
         $pdf->cell(80, 10, "Name", 1, 0, 'C');
         $pdf->cell(40, 10, "Room", 1, 0, 'C');
         $pdf->cell(40, 10, "Phone", 1, 0, 'C');
         $pdf->write(10, "\n");
         foreach ($getmed->result() as $row) {
             $pdf->setFont('times', '', '15');
             $pdf->cell(80, 10, $row->name, 1, 0, 'C');
             $pdf->cell(40, 10, $row->room, 1, 0, 'C');
             $pdf->cell(40, 10, $row->phone, 1, 0, 'C');
             $pdf->write(10, "\n");
             // $pdf -> cell(200,30,$row->room,1,1);
             // $pdf -> cell(200,30,$row->phone,1,1);
         }
     }
     $pdf->setFont('times', 'B', '20');
     if (!$data['launil']) {
         $pdf->write(10, "\nStudents Asked for Laundry Service\n\n");
         $pdf->setFont('times', 'B', '15');
         $pdf->cell(80, 10, "Name", 1, 0, 'C');
         $pdf->cell(40, 10, "Room", 1, 0, 'C');
         $pdf->cell(40, 10, "Phone", 1, 0, 'C');
         $pdf->write(10, "\n");
         foreach ($getlau->result() as $row) {
             $pdf->setFont('times', '', '15');
             $pdf->cell(80, 10, $row->name, 1, 0, 'C');
             $pdf->cell(40, 10, $row->room, 1, 0, 'C');
             $pdf->cell(40, 10, $row->phone, 1, 0, 'C');
             $pdf->write(10, "\n");
             // $pdf -> cell(200,30,$row->room,1,1);
             // $pdf -> cell(200,30,$row->phone,1,1);
         }
     }
     $pdf->output('service.pdf', 'D');
 }