コード例 #1
0
ファイル: transaksi.php プロジェクト: astadipati/klinik
 function pdf()
 {
     $this->load->library('cfpdf');
     $pdf = new FPDF('P', 'mm', 'A4');
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 'L');
     $pdf->SetFontSize(14);
     $pdf->Text(10, 10, 'LAPORAN TRANSAKSI');
     $pdf->SetFont('Arial', 'B', 'L');
     $pdf->SetFontSize(10);
     $pdf->Cell(10, 10, '', '', 1);
     $pdf->Cell(10, 7, 'No', 1, 0);
     $pdf->Cell(27, 7, 'Tanggal', 1, 0);
     $pdf->Cell(30, 7, 'Operator', 1, 0);
     $pdf->Cell(38, 7, 'Total Transaksi', 1, 1);
     // tampilkan dari database
     $pdf->SetFont('Arial', '', 'L');
     $data = $this->model_transaksi->laporan_default();
     $no = 1;
     $total = 0;
     foreach ($data->result() as $r) {
         $pdf->Cell(10, 7, $no, 1, 0);
         $pdf->Cell(27, 7, $r->tanggal_transaksi, 1, 0);
         $pdf->Cell(30, 7, $r->nama_lengkap, 1, 0);
         $pdf->Cell(38, 7, $r->total, 1, 1);
         $no++;
         $total = $total + $r->total;
     }
     // end
     $pdf->Cell(67, 7, 'Total', 1, 0, 'R');
     $pdf->Cell(38, 7, $total, 1, 0);
     $pdf->Output();
 }
コード例 #2
0
function parse_pdf_content($content, $member_id)
{
    // parse text content from Smarty to pdf content
    global $db, $config, $t;
    $pdf_content = '';
    $margins = array(mm_to_pt(20), mm_to_pt(20), mm_to_pt(20), mm_to_pt(20));
    //left, top, right, bottom (in points) 56pt ~= 20mm
    $font_size = 14;
    //points
    $pdf = new FPDF('P', 'pt', 'A4');
    // portrait, A4
    $pdf->SetCompression(false);
    $pdf->SetMargins($margins[0], $margins[1], $margins[2]);
    //only left, top, right margins. bottom margin equals to 20mm by default.
    $pdf->SetTitle('Your Invoice');
    $pdf->SetSubject('*** Your Payment');
    $pdf->SetAuthor('aMember');
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', $font_size);
    $current_x = $pdf->GetX();
    $current_y = $pdf->GetY();
    $width = mm_to_pt(210);
    $height = mm_to_pt(270);
    $width = $width - $margins[0] - $margins[2];
    // target width
    $height = $height - $margins[1] - $margins[3];
    // target height
    $image = $config['root_dir'] . "/logo.jpg";
    // logo path to include in pdf at top-right corner
    if (is_file($image)) {
        $size = getimagesize($image);
        $x = $width - $size[0] + $margins[0];
        $y = $current_y;
        $pdf->Image($image, $x, $y, $size[0], $size[1]);
        // use original size
        $current_y += $size[1];
    }
    $current_y += $font_size;
    //pt
    $contacts = explode("\n", $config['invoice_contacts']);
    // output contact information right-aligned
    $max_length = 0;
    foreach ($contacts as $row) {
        $row = trim($row);
        $length = $pdf->GetStringWidth($row);
        if ($length > $max_length) {
            $max_length = $length;
        }
    }
    $x = $width - $max_length + $margins[0];
    $y = $current_y;
    foreach ($contacts as $row) {
        $row = trim($row);
        $attr = get_font_styles($row);
        $pdf->SetFont('Arial', $attr, $font_size);
        $pdf->Text($x, $y, strip_tags($row));
        $y += $font_size;
    }
    $current_y = $y;
    $pdf->SetFont('Arial', '', $font_size);
    //return font settings
    // customer contacts
    $u = $db->get_user($member_id);
    if (!$t) {
        $t =& new_smarty();
    }
    $t->assign('u', $u);
    $cust_contacts = $t->fetch('mail_receipt_contact.pdf.txt');
    $cust_contacts = explode("\n", $cust_contacts);
    // output contact information left-aligned
    $num_rows = count($contacts);
    $x = $margins[0];
    $y = $current_y - $font_size * $num_rows;
    // $num_rows rows up from contact information and output customer data
    foreach ($cust_contacts as $row) {
        $row = trim($row);
        $attr = get_font_styles($row);
        $pdf->SetFont('Arial', $attr, $font_size);
        $pdf->Text($x, $y, strip_tags($row));
        $y += $font_size;
    }
    $current_y = $y;
    /*
    $y = $current_y - $font_size * 4; // 4 rows up from contact information and output customer data
    
    $string = $u['name_f'] . ' ' . $u['name_l'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    $string = $u['street'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    $string = $u['zip'] . ' ' . $u['city'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    	$state = db_getStateByCode($u['country'], $u['state']);
    	$country = db_getCountryByCode($u['country']);
    $string = $state .  ' '  . $country;
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    */
    $current_y = $y + $font_size * 2;
    //2 rows down
    $pdf->SetFont('Arial', '', $font_size);
    //return font settings
    // remove new lines
    $content = str_replace("\n", "", $content);
    $content = str_replace("\r", "", $content);
    $content = str_replace("£", chr(163), $content);
    // split text by <br />
    $content = explode("<br />", $content);
    $y = $current_y;
    // count maximum columns widths
    $widths = array();
    foreach ($content as $text) {
        $text = trim($text);
        if (preg_match('/\\|/i', $text, $regs)) {
            $column = 0;
            $items = explode("|", $text);
            foreach ($items as $item) {
                $length = $pdf->GetStringWidth(trim(strip_tags($item))) + 10;
                if ($widths[$column] < $length) {
                    $widths[$column] = $length;
                }
                $column++;
            }
        }
    }
    $length = 0;
    for ($i = 1; $i < count($widths); $i++) {
        $length += $widths[$i];
    }
    // width of column 0 is *
    $widths[0] = $width - $length;
    foreach ($content as $hr_content) {
        $hr_content = trim($hr_content);
        // split text by <hr>
        $hr_content = explode("<hr>", $hr_content);
        $hr_count = count($hr_content) - 1;
        //<br /> add new line
        if ($hr_count < 1 && strip_tags($hr_content[0]) == '') {
            $y += $font_size;
        }
        foreach ($hr_content as $text) {
            $line_feeds = 1;
            // how much rows feed
            if (strip_tags($text) != '') {
                // if there is a text
                if (!preg_match('/\\|/i', $text, $regs)) {
                    // simple text
                    $y += $font_size * $line_feeds;
                    $attr = get_font_styles($text);
                    $text = trim(strip_tags($text));
                    $pdf->SetFont('Arial', $attr, $font_size);
                    $pdf->Text($x, $y, $text);
                    // simple textout. no line feeds allowed.
                    /*
                    $length = $pdf->GetStringWidth ($text);
                    while ($length > $width)
                        $line_feeds++;
                    */
                } else {
                    //table content (splitted by "|")
                    $border = 0;
                    $fill = 0;
                    $pdf->SetFillColor(192, 192, 192);
                    // Silver
                    if (preg_match('/<fill>(.*)<\\/fill>/i', $text, $regs)) {
                        $text = $regs[1];
                        $fill = 1;
                    }
                    $text = strip_tags($text);
                    $items = explode("|", $text);
                    $column = 0;
                    $x = $margins[0];
                    foreach ($items as $item) {
                        $attr = get_font_styles($item);
                        $item = trim(strip_tags($item));
                        $pdf->SetFont('Arial', $attr, $font_size);
                        if ($column > 0) {
                            $align = 'R';
                        } else {
                            $align = 'L';
                        }
                        $pdf->SetXY($x, $y);
                        $pdf->MultiCell($widths[$column], $font_size, $item, $border, $align, $fill);
                        // multi rows output
                        for ($i = 1; $i < $line_feeds; $i++) {
                            $_y = $y + $i * $font_size;
                            $pdf->SetXY($x, $_y);
                            $pdf->MultiCell($widths[$column], $font_size, '', $border, $align, $fill);
                            // empty rows
                        }
                        if ($column == 0) {
                            // count line feeds only for 0 column
                            $length = $pdf->GetStringWidth($item);
                            while ($length > $widths[$column]) {
                                $line_feeds++;
                                $length -= $widths[$column];
                            }
                        }
                        $x += $widths[$column];
                        $column++;
                    }
                    $y += $font_size * $line_feeds;
                    $pdf->SetXY($margins[0], $y);
                }
            }
            // (strip_tags($text) != '')
            if ($hr_count > 0) {
                // check count of <hr> (do not draw last <hr>)
                $y += 2;
                $pdf->Line($margins[0], $y, $margins[0] + $width, $y);
                $y += 2;
                $hr_count--;
            }
            $x = $margins[0];
        }
        //foreach hr_content
    }
    //foreach content
    $current_y = $y;
    $pdf_content = $pdf->Output('', 'S');
    //get pdf content
    return $pdf_content;
}
コード例 #3
0
ファイル: Fpdf.php プロジェクト: vih/vih.dk
 function Text($x, $y, $txt)
 {
     $txt = utf8_decode($txt);
     return parent::Text($x, $y, $txt);
 }
コード例 #4
0
ファイル: RegHistory.php プロジェクト: ROCKY-SAM/IOC
<?php 
require 'libs/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 18);
if (!$Transactions) {
    echo '<h3 class="text-center success"><strong>There are no transactions done in this time period.</strong></h3>';
    return 0;
} else {
    //formatting pdf
    $pdf->Image('views/img/ioc.png', 95, 1, 20);
    $pdf->MultiCell(10, 20, "");
    $pdf->Text(35, 28, 'Regular Customer Transactions Monthly Report');
    //table data
    $pdf->SetFont('Arial', 'B', 8);
    date_default_timezone_set('Asia/Colombo');
    //to get srilankan time instead of GMT time
    $date = date("l jS \\of F Y h:i:s A");
    $pdf->Text(5, 5, ' Date: ' . $date);
    $heading = array("Customer", "VehicleNO", "Amount Rs.", "OrderDate", "ReturnedDate");
    $pdf->Cell(20, 20, '', 0, 0, 'C');
    foreach ($heading as $column_heading) {
        $pdf->Cell(30, 20, $column_heading, 1, 0, 'C');
    }
    $pdf->SetMargins(30, 0);
    foreach ($Transactions as $row) {
        $pdf->SetFont('Arial', '', 8);
        $pdf->Ln();
        foreach ($row as $column) {
            $pdf->Cell(30, 10, $column, 1, 0, 'C');
コード例 #5
0
$getTA = mysql_fetch_array(mysql_query("select ta from tahunajaran where id_ta='{$id_ta}'"));
$getSmt = $getSemester['semester'];
$hasilnya = mysql_query("SELECT a.id_ta ,b.nis, b.nama_siswa, m.mapel, a.nilai, t.semester, m.kd_mapel, d.kelas, t.ta\n\t  FROM nilai_mapel a\n\t  JOIN siswa b ON b.nis = a.nis\n\t  JOIN anggota_kelas ak ON ak.nis= a.nis\n\t  JOIN mapel m ON a.kd_mapel = m.kd_mapel\n\t  JOIN tahunajaran t ON ak.id_ta=t.id_ta\n\t  JOIN kelas d ON ak.kd_kelas = d.kd_kelas\n\t  WHERE b.nis='{$nnis}' AND a.id_ta='{$_GET['ta']}' AND t.semester='{$getSmt}' AND t.ta='{$getTA['ta']}'");
$hasilnya2 = mysql_query("SELECT m.kd_mapel,  m.mapel, d.kelas, a.nilai\n\t  FROM nilai_mapel a\n\t  JOIN siswa b ON b.nis = a.nis\n\t  JOIN anggota_kelas ak ON ak.nis= a.nis\n\t  JOIN mapel m ON a.kd_mapel = m.kd_mapel\n\t  JOIN tahunajaran t ON ak.id_ta=t.id_ta\n\t  JOIN kelas d ON ak.kd_kelas = d.kd_kelas\n\t  WHERE b.nis='{$nnis}' AND a.id_ta='{$_GET['ta']}' AND t.semester='{$getSmt}' AND t.ta='{$getTA['ta']}'");
$tampilHasil = mysql_fetch_array($hasilnya);
// list ($nama_siswa, $nis, $ta, $semester,$kd_mapel, $mapel, $kelas, $nilai)
//medifinisikan variable class fpdf dan page pdf
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->AddPage();
//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);
コード例 #6
0
<?php

session_start();
include '../librerias/fpdf/fpdf.php';
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);
コード例 #7
0
$pdf = new FPDF ( 'P', 'mm', 'A4' );
$pdf->SetMargins ( 1, 1, 1 );
$pdf->Open ();

$pdf->AddPage ();

$pdf->Image ( "imagenes/formato.jpg", 1, 1, 202 );

$pdf->SetFillColor ( 255, 255, 255 );
$pdf->SetTextColor ( 0 );
$pdf->SetDrawColor ( 0, 0, 0 );
$pdf->SetLineWidth ( .2 );
$pdf->SetFont ( 'Arial', 'B', 9 );

$pdf->Text ( 30, 43, $ren ["rfc"] );
$pdf->Text ( 88, 43, $ren ["curp"] );
$pdf->Text ( 174, 41, campo ( $ren ["folio"], 10, 2 ) );

$pdf->SetFont ( 'Arial', 'B', 8 );

$sql = "select upp as cveupp, razonsocial as upp, titular from empresa limit 1";
$res_emp = mysqli_query ( $conexion, $sql );
$ren_emp = mysqli_fetch_array ( $res_emp );

$titularupp = $ren_emp ["titular"];

$pdf->Text ( 17, 56, $ren_emp ["upp"] );
mysql_free_result ( $res_emp );

$pdf->Text ( 17, 63.5, $ren ["area"] );
コード例 #8
0
ファイル: pdf.php プロジェクト: tittyjacob/office
# $crdate=$rs[8];
# $crdts=$rs[9];
# $hosteller=$rs[10];
# $hosteldues=$rs[11];
# $scst=$rs[12];
# $presentad=$rs[13];
# $phonepresent=$rs[14];
# $permad=$rs[15];
# $phoneparent=$rs[16];
# $conn = mysql_close($conn);
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->SetTitle("Model Engineering College - Semester Registration");
$pdf->SetFont('Arial', '', 12);
$pdf->Text(70, 15, ' Model Engineering College');
$pdf->SetFont('Arial', '', 10);
#$pdf->Text(75,15,'Cochin, Kerala, India, Pin: 682 021');
#$pdf->SetFont('Arial','',10);
#$pdf->Text(65,20,'Request for Transfer Certificate / Course & Conduct Certificate');
###$pdf->Rect(10,10,35,10);
$pdf->SetFont('Arial', 'U', 10);
$pdf->Text(55, 25, 'Request for Transfer Certificate / Course & Conduct Certificate');
$pdf->SetFont('Arial', '', 10);
$row = 40;
$col = 25;
$pdf->Text($col, $row, 'From ');
$pdf->Text($col + 5, $row += 5, $name);
$pdf->Text($col + 5, $row += 5, $admno . ', ' . $branch);
$pdf->Text($col + 5, $row += 5, $course);
$pdf->Text($col, $row += 10, 'To');
コード例 #9
0
<?php

session_start();
define('FPDF_FONTPATH', '../pdf/font/');
require '../pdf/fpdf.php';
include '../funct.php';
$pdf = new FPDF();
$pdf->AddFont('Calligrapher', '', 'arial_ce.php');
$pdf->AddPage();
$pdf->Image('../img/logo.png', 165, 8, 33);
$pdf->SetFont('Calligrapher', '', 9);
$pdf->Text(10, 10, iconv('UTF-8', 'windows-1250//TRANSLIT', "NIEPUBLICZNY ZAKŁAD OPIEKI ZDROWOTNEJ"));
$pdf->Text(30, 13, "DARMEDICUS");
$pdf->SetFont('Calligrapher', '', 8);
$pdf->Text(18, 16, "04-364 Warszawa, ul. Wiatraczna 15 lok - U1");
$pdf->Text(29, 19, "tel/fax (22) 465 17 91");
$pdf->SetFont('Calligrapher', '', 14);
$pdf->Ln(15);
$pdf->MultiCell(0, 10, 'Grafik lekarzy w dniu ' . $_SESSION['data'], 0, "C");
$sql = "select wizyty.id_gab, sl_gab.nazwa from wizyty, sl_gab where wizyty.id_gab = sl_gab.id and wizyty.data like '" . date("Y-m-d", strtotime($_SESSION['data'])) . "%' ";
$result = mysql_query($sql);
$ile_gab = mysql_num_rows($result);
while ($row = mysql_fetch_array($result)) {
    $lista_gab[$row[0]] = $row[1];
}
if ($lista_gab == '') {
    $pdf->Ln(5);
    $pdf->MultiCell(0, 10, iconv('UTF-8', 'windows-1250//TRANSLIT', 'Brak lekarzy przyjmujących w danym dniu'));
} else {
    $nr_l = 1;
    $pdf->SetFont('Calligrapher', '', 8);
コード例 #10
0
ファイル: pumpReportSpec.php プロジェクト: ROCKY-SAM/IOC
<?php 
require 'libs/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 18);
if (!$modelStocks) {
    echo '<h3 class="text-center success"><strong>Bump , no records found !</strong></h3>';
    return 0;
} else {
    $pdf->Image('views/img/ioc.png', 95, 1, 20);
    $pdf->MultiCell(20, 20, "");
    $pdf->Text(75, 28, 'Pump readings report');
    //table data
    $pdf->SetFont('Arial', 'B', 8);
    date_default_timezone_set('Asia/Colombo');
    //to get srilankan time instead of GMT time
    $date = date("l jS \\of F Y h:i:s A");
    $pdf->Text(5, 5, ' Date: ' . $date);
    $heading = array("Date", "Reading", "Pump no");
    $pdf->Cell(30, 20, '', 0, 0, 'C');
    foreach ($heading as $column_heading) {
        $pdf->Cell(40, 20, $column_heading, 1, 0, 'C');
    }
    $pdf->SetMargins(40, 0);
    foreach ($modelStocks as $row) {
        $pdf->SetFont('Arial', '', 8);
        $pdf->Ln();
        foreach ($row as $column) {
            $pdf->Cell(40, 10, $column, 1, 0, 'C');
        }
コード例 #11
0
    public function createQRbyRestoID()
    {
        $id_restaurant = $_GET['id_restaurant'];
        $quantityQR = $_GET['quantityQR'];
        $id_request = $_GET['id_request'];
        $objResto = new MasterRestaurantModel();
        $objResto->getByID($id_restaurant);
        $objResto->table_quantity = $objResto->table_quantity + $quantityQR;
        $objResto->load = 1;
        $objResto->save();
        //        pr($objResto);
        $objQRRequest = new QRRequestModel();
        $objQRRequest->getByID($id_request);
        $objQRRequest->createdOn = leap_mysqldate();
        //        pr($objQRRequest);
        $objQRRequest->status = "1";
        $objQRRequest->load = 1;
        $objQRRequest->save();
        $objQR = new QRModel();
        global $db;
        $qtydiDB = "SELECT max(id_qr) as max from menurevo__QR";
        $arr = $db->query($qtydiDB, 1);
        for ($i = $arr->max + 1; $i <= $quantityQR + $arr->max; $i++) {
            $encode = addslashes(base64_encode($i));
            $q = "INSERT INTO menurevo__QR (id_qr, textQR,status) VALUES({$i},'{$encode}',0)";
            $id = $db->query($q, 1);
        }
        $pdf = new FPDF();
        $myarray = array(1, 2, 3);
        $pdf->SetFont('Arial', 'B', 16);
        for ($i = $arr->max + 1; $i <= $quantityQR + $arr->max; $i++) {
            $pdf->AddPage();
            $pdf->Image("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chld=L|0&chl=" . base64_encode($i), 60, 30, 90, 0, 'PNG');
            $pdf->Text(85, 130, "Menu Revolution");
        }
        $pdf->Output();
        ?>


        <html>
            <head>
                <title>Print QR-Code</title>
                <style>
                    body{ margin: 0; padding: 0; font-family: verdana;}
                </style>
            </head>
            <body>
        <?php 
        for ($i = $arr->max + 1; $i <= $quantityQR + $arr->max; $i++) {
            ?>
                    <!--                    <div style="width:800px; border-bottom: 3px dashed #aaaaaa; margin-bottom: 20px;">
                                            <img src="<?php 
            echo _SPPATH;
            ?>
images/headerleap.jpg"  width="100%">-->

                    <div style="padding:40px; text-align: center;">
                        <!--<div style="letter-spacing: 2px; font-size: 18px; font-weight: bold; padding-bottom: 20px;"> <?php 
            echo $mur->admin_nama_depan;
            ?>
</div>-->
                        <img src="<?php 
            echo "https://chart.googleapis.com/chart?chs=150x150&cht=qr&chld=L|0&chl=" . base64_encode($i);
            ?>
"alt="QR">

                    </div>

                    <!--</div>--> 

            <?php 
        }
        ?>
 </body>

        </html><?php 
        die('finished');
    }
コード例 #12
0
ファイル: render.php プロジェクト: oumartraore/LogicDocGen
<?php

require '../fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial", "B", 14);
$pdf->Cell(0, 0, "File name :  main.cpp", 0, 0, C);
$pdf->Text(10, 30, "File weight : 161 B");
$pdf->Text(10, 40, "using namespace std;");
$pdf->SetTextColor(130, 0, 0);
$pdf->Text(10 + 20, 50, "0 - Function : int main (void)");
$pdf->SetTextColor(0);
$pdf->Text(10, 60, "Return Type : int ");
$pdf->Text(10, 70, "Argument Type & Name : (void)");
$pdf->SetTextColor(130, 0, 0);
$pdf->Text(10 + 20, 80, "1 - Function : float lol (int a, int b)");
$pdf->SetTextColor(0);
$pdf->Text(10, 90, "Return Type : float");
$pdf->Text(10, 100, "Argument Type & Name : (int a, int b)");
$pdf->Text(10, 110, "Line Count : 15");
$pdf->Text(10, 120, "Number of Function : 2");
$pdf->Text(10, 260, "Fin de Page");
$pdf->AddPage();
$pdf->Text(10, 260, "Fin de Page");
$pdf->Output();
コード例 #13
0
ファイル: pdf_mitglied.php プロジェクト: angstmann82/flybook
 // neues PDF-Dokument erzeugen
 $pdf = new FPDF('P', 'mm', 'A4');
 // Seitenabstand definieren
 $pdf->SetMargins(25, 15, 15);
 // Automatischen Seitenumbruch deaktivieren
 $pdf->SetAutoPageBreak(false);
 // ******************************************************* SEITE 1 ******************************************************* //
 // erste Seite hinzufügen
 $pdf->AddPage();
 // Logo einfügen
 $pdf->Image('./img/acb_logo_neublau_klein.jpg', 165, 10, 30);
 // Schriftart festlegen
 $pdf->SetFont('Arial', 'B', 16);
 // Schriftfarbe festlegen
 $pdf->SetTextColor(5, 3, 252);
 $pdf->Text(30, 15, utf8_decode('A E R O - C L U B   B U T Z B A C H   E. V.'));
 // Schriftart festlegen
 $pdf->SetFont('Arial', 'B', 9);
 $pdf->Text(40, 20, utf8_decode('Ringstraße 4  -  35647 Waldsolms  -  Telefon 06085-987330'));
 $pdf->Text(55, 24, utf8_decode('eMail: vorstand@aero-club-butzbach.de'));
 // Schriftart festlegen
 $pdf->SetFont('Arial', 'BU', 14);
 // Schriftfarbe festlegen
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Text(20, 38, utf8_decode('Personen-Datenblatt'));
 // Schriftart festlegen
 $pdf->SetFont('Arial', '', 10);
 $pdf->Text(20, 46.5, '01');
 // neue XY-Position bestimmen
 $pdf->SetXY(30, 43);
 // neuer Zugang
コード例 #14
0
ファイル: emgReportX.php プロジェクト: ROCKY-SAM/IOC
<?php 
require 'libs/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 18);
if (!$modelStocks) {
    echo '<h3 class="text-center success"><strong>Bump , no records found !</strong></h3>';
    return 0;
} else {
    $pdf->Image('views/img/ioc.png', 95, 1, 20);
    $pdf->MultiCell(20, 20, "");
    $pdf->Text(50, 28, 'Monthly Emergency transport report');
    //table data
    $pdf->SetFont('Arial', 'B', 8);
    date_default_timezone_set('Asia/Colombo');
    //to get srilankan time instead of GMT time
    $date = date("l jS \\of F Y h:i:s A");
    $pdf->Text(5, 5, ' Date: ' . $date);
    $heading = array("Record id", "Fullname", "NIC", "Vehicleno", "Contact", "Description", "Email", "Date");
    $pdf->Cell(25, 20, '', 0, 0, 'C');
    foreach ($heading as $column_heading) {
        $pdf->Cell(25, 20, $column_heading, 1, 0, 'C');
    }
    $pdf->SetMargins(10, 0);
    foreach ($modelStocks as $row) {
        $pdf->SetFont('Arial', '', 8);
        $pdf->Ln();
        foreach ($row as $column) {
            $pdf->Cell(25, 10, $column, 1, 0, 'C');
        }
コード例 #15
0
 //EGO ================================================================
 $pdf->AddPage('P', 'A4');
 //A4 EGO PAGE
 $searchpath = dirname(dirname(dirname(__FILE__)));
 //."/input";
 //SET BAGROUNT PNG-----------------------------
 $pdf->Image($searchpath . "/version4/exporter/EP_BCK_PDF_EGO.png", 0, 0, -150);
 //DEFINE FONTS ---------------------------------
 $pdf->AddFont('Lato-Lig', '', 'Lato-Lig.php');
 $pdf->AddFont('Lato-LigIta', '', 'Lato-LigIta.php');
 $pdf->AddFont('Lato-Reg', '', 'Lato-Reg.php');
 $pdf->SetFont('Lato-Lig', '', 10);
 //BEGIN FILLING SHEET------------------------------
 $character = $_SESSION['cc']->character;
 //NAMES
 $pdf->Text(60, 12, $character->charName);
 //Character Name
 $pdf->Text(143, 12, $character->playerName);
 //Player Name
 //ORIGINES
 $pdf->Text(37, 26, formatIt($_SESSION['cc']->getCurrentBackground()->name));
 //Background
 $pdf->Text(37, 33, formatIt($_SESSION['cc']->getCurrentFaction()->name));
 //Faction
 $pdf->SetFont('Lato-LigIta', '', 7);
 setBookLink($_SESSION['cc']->getCurrentBackground()->name, 85, 27, $p, $pdf);
 //Background bookLink
 setBookLink($_SESSION['cc']->getCurrentFaction()->name, 85, 34, $p, $pdf);
 //Faction bookLink
 $pdf->SetFont('Lato-Lig', '', 10);
 //AGE - SEX
コード例 #16
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');
}
コード例 #17
0
ファイル: cheque.php プロジェクト: kashifnasim/nexexcel
            $str1 .= $sep . $amt[$counter];
            $sep = " ";
            $counter++;
        }
        if ($counter > count($amt)) {
            break;
        }
    } while ($w < $MAX_LIMIT);
    $str2 = "";
    $sep = "";
    for ($i = $counter; $i < count($amt); $i++) {
        $str2 .= $sep . $amt[$i];
        $w = $pdf->GetStringWidth($str2);
        $sep = " ";
    }
    $pdf->Text(11.4, 0.9, $_GET['date']);
    $pdf->Text(1.1, 2.6, $_GET['pay']);
    $pdf->Text(1.6, 3.3, $str1);
    $pdf->Text(0.4, 4.1, $str2);
    $pdf->Line(13, 2.65, 14.8, 2.65);
    //cross the 'or bearer' text
    $pdf->SetFont('Arial', 'B', 12);
    $pdf->Text(11.1, 4.1, number_format($_GET['amount']));
    $pdf->Output("cheque.pdf", "D");
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="shortcut icon" href="../images/logo_icon.gif">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
コード例 #18
0
 $pdf->Line(40, $linha + 25, 40, $linha + 33);
 $pdf->Line(86, $linha + 25, 86, $linha + 33);
 $pdf->Line(112, $linha + 25, 112, $linha + 33);
 $pdf->Line(125, $linha + 25, 125, $linha + 33);
 $pdf->Line(45, $linha + 33, 45, $linha + 41);
 $pdf->Line(65, $linha + 33, 65, $linha + 41);
 $pdf->Line(91, $linha + 33, 91, $linha + 41);
 $pdf->Line(121, $linha + 33, 121, $linha + 41);
 $pdf->Line(10, $linha + 93, 195, $linha + 93);
 //codigo de barras
 $pdf->SetFillColor(0, 0, 0);
 $pdf->int25(10, $linha + 94, @$codigo_barras, 20, 0.341);
 // quadrado inferior //
 //$pdf->Image("logosantander.jpg",10,187,35,7);
 $pdf->SetFont('Arial', 'b', 14);
 $pdf->Text(49, $linha + 7, "104-8");
 $pdf->SetFont('Arial', 'b', 11);
 $pdf->Text(70, $linha + 7, @$linha_digitavel);
 $pdf->SetFont('Arial', 'b', 5);
 $pdf->Text(13, $linha + 11, "Local de Pagamento");
 $pdf->Text(151, $linha + 11, "Parcela");
 $pdf->Text(171, $linha + 11, "Vencimento");
 $pdf->Text(13, $linha + 19, "Cedente");
 $pdf->Text(151, $linha + 19, "Agência/Código Cedente");
 $pdf->Text(13, $linha + 27, "Data do Documento");
 $pdf->Text(42, $linha + 27, "Número do Documento");
 $pdf->Text(88, $linha + 27, "Espécie Doc.");
 $pdf->Text(114, $linha + 27, "Aceite");
 $pdf->Text(127, $linha + 27, "Data do Processamento");
 $pdf->Text(151, $linha + 27, "Nosso Número");
 $pdf->Text(13, $linha + 35, "Código do Cedente");
コード例 #19
0
ファイル: facture.php プロジェクト: Ophois/webforce3
		$this->SetY(-15);
		// Adresse
		$this->Cell(196, 5, 'Projet Champagne', 0, 0, 'C');
	}

}

// Instanciation de la classe PDF
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
$pdf->SetFont('DejaVu', '', 12);
$pdf->SetTextColor(0);

// Infos de la commande calées à gauche
$pdf->Text(20, 80, 'N° de facture : '.$tCommande[0]['id']);
$pdf->Text(20, 85, 'N° de client : '.$tCommande[0]['idClient']);

// Infos du client calées à droite
$pdf->Text(120, 50, $tClient['nomClient'].' '.$tClient['prenomClient']);
$pdf->Text(120, 55, $tClient['adresseClient']);
$pdf->Text(120, 60, $tClient['cpClient'].' '.$tClient['villeClient']);

// Infos date
$pdf->Text(120, 80, 'Buire, le '.date("d-m-Y", strtotime($tCommande[0]['dateFacture'])));

/* --- Tableau détail commande --- */
// en-tête
$pdf->SetDrawColor(183); // couleur du fond
$pdf->SetFillColor(221); // couleur des filets
$pdf->SetTextColor(0); // couleur du texte
コード例 #20
0
ファイル: genericpdf.php プロジェクト: phpsmith/IS4C
 $y = 0;
 $date = date("m/d/Y");
 $signage = new FannieSignage(array());
 for ($i = 0; $i < 4; $i++) {
     if ($count % 4 == 0) {
         $pdf->AddPage();
         $pdf->SetDrawColor(0, 0, 0);
         $pdf->Line(108, 0, 108, 279);
         $pdf->Line(0, 135, 215, 135);
     }
     $x = $count % 2 == 0 ? 5 : 115;
     $y = $count / 2 % 2 == 0 ? 10 : 145;
     $pdf->SetXY($x, $y);
     $tmp = explode(":", $toid);
     $pdf->SetFont('Arial', '', '12');
     $pdf->Text($x + 85, $y, "1 / 1");
     $pdf->SetFont('Arial', 'B', '24');
     $pdf->Cell(100, 10, 'WFC Special', 0, 1, 'C');
     $pdf->SetFont('Arial', '', '12');
     $pdf->SetX($x);
     $pdf->SetFont('Arial', '', '16');
     $pdf->Cell(100, 9, $_REQUEST['desc'], 0, 1, 'C');
     $pdf->SetX($x);
     $pdf->Cell(100, 9, "", 0, 1, 'C');
     $pdf->SetX($x);
     $pdf->SetFont('Arial', 'B', '16');
     $txt = explode("\n", wordwrap($_REQUEST['disc'], 30));
     foreach ($txt as $t) {
         $pdf->Cell(100, 9, $t, 0, 1, 'C');
         $pdf->SetX($x);
     }
コード例 #21
0
$pdf->Line(10, 220, 205, 220);
$pdf->Line(205, 50, 205, 220);
$pdf->Line(20, 50, 20, 220);
//1
$pdf->Line(44, 50, 44, 220);
//2
$pdf->Line(135, 50, 135, 220);
//3-qtty
$pdf->Line(150, 50, 150, 220);
//4-uom
$pdf->Line(164, 50, 164, 220);
//5
$pdf->Line(10, 57, 205, 57);
//$pdf->Line(10,170,205,170);
//table title
$pdf->Text(12, 54, 'NO');
$pdf->Text(22, 54, 'ITEM CODE');
$pdf->Text(52, 54, 'DESCRIPTION');
$pdf->Text(138, 54, 'QTY');
$pdf->Text(153, 54, 'UOM');
$pdf->Text(170, 54, 'REMARKS');
//$pdf->Text(197,64,'(A)');
$starting = 63;
////////////
$count = '0';
//SQL  //gives the following
// doc_number, doc_date, doc_type, branch_id, branch_from, branch_to, approver, approver_date,
// requester, requester_date, status,
// -- id, doc_number, item_id, quantity, remark, from_branch, status,
// -- id, name, location, phone_no,
// -- description, unit_of_measure, doc_date
コード例 #22
0
<?php

require 'fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Text(10, 10, 'Hello World');
$pdf->Output();
コード例 #23
0
ファイル: invoice-pdf.php プロジェクト: razordice/siakad
<?php

session_start();
require "../includes/config.php";
require "../includes/functions.php";
require "../includes/fpdf/fpdf.php";
$pdf = new FPDF("L", "mm", "A5");
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Text(10, 10, "Data Pemesanan");
$idPemesanan = $_GET['id'];
list($tanggal, $tujuanPengiriman, $alamatPengiriman, $status) = mysql_fetch_row(mysql_query("SELECT tanggal, tujuan_pengiriman, alamat_pengiriman, status FROM _pemesanan WHERE id_pemesanan = '{$idPemesanan}'"));
$pdf->SetFont('Arial', '', 12);
$pdf->Text(10, 20, "Kode Pemesanan");
$pdf->Text(50, 20, " : " . $idPemesanan);
$pdf->Text(10, 25, "Hari, Tanggal");
$pdf->Text(50, 25, " : " . SearchDay($tanggal) . ", " . ReportDate($tanggal));
$pdf->Text(10, 30, "Nama Customer");
$pdf->Text(50, 30, " : " . $_SESSION['s_namaCust']);
$pdf->Text(10, 35, "Tujuan");
if ($tujuanPengiriman == '0') {
    $pdf->Text(50, 35, " : Dalam kota Yogyakarta");
} 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);
コード例 #24
0
ファイル: wydr_wiz.php プロジェクト: wycus/darmedic
<?php

session_start();
define('FPDF_FONTPATH', '../pdf/font/');
require '../pdf/fpdf.php';
include '../funct.php';
$pdf = new FPDF();
$pdf->AddFont('Calligrapher', '', 'arial_ce.php');
$pdf->AddPage();
$pdf->Image('../img/logo.png', 165, 8, 33);
$pdf->SetFont('Calligrapher', '', 9);
$pdf->Text(10, 10, "NIEPUBLICZNY ZAK£AD OPIEKI ZDROWOTNEJ");
$pdf->Text(30, 13, "DARMEDICUS");
$pdf->SetFont('Calligrapher', '', 8);
$pdf->Text(18, 16, "04-364 Warszawa, ul. Wiatraczna 15 lok - U1");
$pdf->Text(29, 19, "tel/fax (22) 465 17 91");
$sql = "select DATE_FORMAT(wizyty.data, '%Y-%m-%d') from wizyty where wizyty.id = " . $_GET['wiz'];
$result = mysql_query($sql);
$dat = @mysql_fetch_array($result);
$pdf->Text(175, 43, $dat[0]);
$pdf->Ln(15);
$pdf->SetFont('Calligrapher', '', 14);
$pdf->MultiCell(0, 10, 'KARTA INFORMACYJNA', 0, "C");
$pdf->Ln(5);
$sql = "select pac.pac_nazwisko, pac.pac_imie, pac.pac_pesel from pac, wizyty where wizyty.id_pac = pac.id and wizyty.id = " . $_GET['wiz'];
$result = mysql_query($sql);
$pac = @mysql_fetch_array($result);
$pac['naz'] = iconv('UTF-8', 'windows-1250//TRANSLIT', $pac[0]);
$pac['imie'] = iconv('UTF-8', 'windows-1250//TRANSLIT', $pac[1]);
$pdf->SetFont('Calligrapher', '', 12);
$pdf->Text(40, 40, "Pacjent " . $pac['naz'] . " " . $pac['imie']);
コード例 #25
0
ファイル: expense.php プロジェクト: ROCKY-SAM/IOC
<?php 
require 'libs/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 18);
//formatting pdf
date_default_timezone_set('Asia/Colombo');
//to get srilankan time instead of GMT time
$date = date("l jS \\of F Y h:i:s A");
$pdf->Image('views/img/ioc.png', 95, 1, 20);
$pdf->MultiCell(20, 20, "");
$pdf->Text(80, 28, 'Expenses Report');
//table data
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(5, 5, ' Date: ' . $date);
//fuel
$pdf->MultiCell(10, 10, "");
$pdf->Text(20, 35, iconv("UTF-8", "ISO-8859-1", ">>> Fuel Expenses"));
$pdf->SetMargins(40, 0);
$heading = array("Fuel Type", "Capacity", "Date", "Expense(Rs.)");
$pdf->Cell(30, 20, "", 0, 0, 'C');
foreach ($heading as $column_heading) {
    $pdf->Cell(30, 20, $column_heading, 1, 0, 'C');
}
foreach ($Expenses as $row) {
    $pdf->SetFont('Arial', '', 8);
    $pdf->Ln();
    foreach ($row as $column) {
        $pdf->Cell(30, 10, $column, 1, 0, 'C');
    }
コード例 #26
0
ファイル: certificado.php プロジェクト: kailIII/CERTIFICADOS
define('FPDF_FONTPATH', 'font/');
require 'fpdf.php';
require 'config.php';
$cedula = $_POST['cedula'];
$strConsulta = "SELECT primer_nombre, primer_apellido from nacional where cedula='{$cedula}'";
$cedula = mysql_query($strConsulta);
$row = mysql_fetch_array($cedula);
//Propiedades
//$cedula = $_POST['cedula'];
$dia = '28';
$mes = 'Noviembre';
//$ano = '2013';
//$pdf = new FPDF('L','cm',array(29.700,21));
$pdf = new FPDF('L', 'mm', 'A4');
$pdf->SetTextColor(0, 0, 0);
$pdf->AddPage();
$pdf->Image('img/certificado.png', 0, 0, 297, 210, 'PNG');
// Nombre y Apellido
$pdf->SetFont('helvetica', 'B', 35);
$pdf->Text(80, 105, $row['primer_nombre'] . " " . $row['primer_apellido']);
// Cedula
//$pdf->SetFont('helvetica','',8);
//$pdf->Text(1.7,6.1,$cedula);
// Dia
$pdf->SetFont('helvetica', 'B', 15);
$pdf->Text(210, 147, $dia);
// Mes
$pdf->SetFont('helvetica', 'B', 15);
$pdf->Text(230, 147, $mes);
$pdf->Output('certificado', 'I');
コード例 #27
0
ファイル: test.txt.php プロジェクト: oumartraore/LogicDocGen
<?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;
コード例 #28
0
 /**
  * @return void
  * @param FPDF $pdf
  * @param integer $linha
  * @param array $digitais
  */
 public function addEtiqueta($pdf, $linha, $digitais)
 {
     $yImagem = 0.0;
     $yTexto = 0.0;
     switch ($linha) {
         case 1:
             $yImagem = 1.8;
             $yTexto = $yImagem - 0.1;
             break;
         case 2:
             $yImagem = 3.8;
             $yTexto = $yImagem - 0.1;
             break;
         case 3:
             $yImagem = 6.0;
             $yTexto = $yImagem - 0.1;
             break;
         case 4:
             $yImagem = 8.1;
             $yTexto = $yImagem - 0.1;
             break;
         case 5:
             $yImagem = 10.3;
             $yTexto = $yImagem - 0.1;
             break;
         case 6:
             $yImagem = 12.3;
             $yTexto = $yImagem - 0.1;
             break;
         case 7:
             $yImagem = 14.5;
             $yTexto = $yImagem - 0.1;
             break;
         case 8:
             $yImagem = 16.5;
             $yTexto = $yImagem - 0.1;
             break;
         case 9:
             $yImagem = 18.7;
             $yTexto = $yImagem - 0.1;
             break;
         case 10:
             $yImagem = 20.8;
             $yTexto = $yImagem - 0.1;
             break;
         case 11:
             $yImagem = 22.9;
             $yTexto = $yImagem - 0.1;
             break;
         case 12:
             $yImagem = 25.0;
             $yTexto = $yImagem - 0.1;
             break;
         case 13:
             $yImagem = 27.2;
             $yTexto = $yImagem - 0.1;
             break;
     }
     $xImagem = 0.9;
     $xTexto = 1.5;
     for ($slot = 1; $slot <= 5; $slot++) {
         if (isset($digitais[$this->slot])) {
             /**
              * Valor do Digital
              */
             $valor = $digitais[$this->slot];
             if ($slot != 5) {
                 $pdf->Text($xTexto, $yTexto, " " . __ETIQUETA__);
                 $pdf->Code128($xImagem, $yImagem, $valor, 3, 0.9);
                 if ($linha == 1) {
                     $pdf->Text($xTexto + 0.3, $yTexto + 1.3, $valor);
                 } else {
                     $pdf->Text($xTexto + 0.3, $yTexto + 1.3, $valor);
                 }
                 $this->slot++;
                 if ($slot != 4) {
                     if ($slot == 1) {
                         $xImagem = $xImagem + 4.2;
                         $xTexto = $xTexto + 4.2;
                     } else {
                         if ($slot != 2) {
                             $xImagem = $xImagem + 4.2 - 0.1;
                             $xTexto = $xTexto + 4.2 - 0.1;
                         } else {
                             $xImagem = $xImagem + 4.2 - 0.4;
                             $xTexto = $xTexto + 4.2 - 0.4;
                         }
                     }
                 }
             } else {
                 $xImagem = $xImagem + 4.0;
                 $xTexto = $xTexto + 4.0;
                 $yImagem = $yImagem;
                 $yTexto = $yTexto;
                 $pdf->Text($xTexto, $yTexto, __ETIQUETA__);
                 $pdf->Code128($xImagem, $yImagem, $valor, 3, 0.9);
                 if ($linha == 1) {
                     $pdf->Text($xTexto + 0.3, $yTexto + 1.4, $valor);
                 } else {
                     $pdf->Text($xTexto + 0.3, $yTexto + 1.3, $valor);
                 }
                 $this->slot++;
             }
         }
     }
 }
コード例 #29
0
$pdf->Line(20, 60, 20, 170);
//1
$pdf->Line(40, 60, 40, 170);
//2
$pdf->Line(135, 60, 135, 170);
//3-qtty
$pdf->Line(150, 60, 150, 170);
//4-uom
$pdf->Line(165, 60, 165, 180);
//5
$pdf->Line(185, 60, 185, 180);
//6
$pdf->Line(10, 70, 205, 70);
$pdf->Line(10, 170, 205, 170);
//table title
$pdf->Text(12, 64, 'NO');
$pdf->Text(22, 64, 'ITEM');
$pdf->Text(22, 67, 'CODE');
$pdf->Text(42, 64, 'DESCRIPTION');
$pdf->Text(137, 64, 'QTTY');
$pdf->Text(152, 64, 'UOM');
$pdf->Text(167, 64, 'UNIT');
$pdf->Text(167, 67, 'PRICE');
$pdf->Text(187, 64, 'EXT.');
$pdf->Text(187, 67, 'PRICE');
$pdf->Text(167, 175, 'TOTAL');
$pdf->Text(100, 165, 'DISCOUNT');
$starting = 73;
////////////
$count = '0';
//SQL  //gives the following
コード例 #30
0
ファイル: cetak.php プロジェクト: aldhikurniawan/testIQ
        } else {
            if ($res[0]['skor'] <= 129 && $res[0]['skor'] >= 115) {
                $tingkat = 'Tinggi dalam kategori normal';
            } else {
                if ($res[0]['skor'] <= 139 && $res[0]['skor'] >= 130) {
                    $tingkat = 'Superior';
                } else {
                    $tingkat = 'Jenius';
                }
            }
        }
    }
}
if ($res[0]['id'] != $user) {
    echo '<script>document.location="index.php"</script>';
}
$pdf = new FPDF('L', 'cm', 'A4');
$pdf->Open();
$pdf->addPage();
$pdf->setAutoPageBreak(false);
$pdf->setFont('Times', '', 17);
$pdf->Image('sertifikatku.jpg', 0, 0, 29.7, 21);
$pdf->Text(20.5, 5.84, '' . $kategori . '');
$pdf->setFont('Times', 'B', 20);
$pdf->text(14.2, 12, '' . $res[0]['skor'] . '', 'C');
$pdf->Cell(0, 25.5, '' . $tingkat . '', 0, 0, 'C', 0, 0);
$pdf->setFont('Times', 'B', 36);
$pdf->Cell(-28, 15.4, '' . $nama . '', 0, 0, 'C', 0, 0);
$pdf->setFont('Times', 'B', 14);
$pdf->text(7.58, 2.818, '' . $tgl . '/' . $nomor . '', 'C');
$pdf->output();