示例#1
3
 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');
 }
示例#2
3
    $table->writeToCell(2, 1, $tanggal, $font, new PHPRtfLite_ParFormat('center'));
    $table->addRows(1, 0.4);
    $table->writeToCell(4, 1, $psikolog, $font, new PHPRtfLite_ParFormat('center'));
    $table->writeToCell(4, 2, $project_mgr, $font, new PHPRtfLite_ParFormat('center'));
    $table->writeToCell(4, 3, "", $font, new PHPRtfLite_ParFormat('center'));
    $table->writeToCell(4, 4, "", $font, new PHPRtfLite_ParFormat('center'));
}
$project_id = $_GET["project_id"];
$ps_id = $_GET["ps_id"];
$qup = mysql_query("select * from t_project where project_id = {$project_id}");
$project_info = mysql_fetch_object($qup);
$qup = mysql_query("select *,date_format(ps_test_tanggal,'%d-%b-%Y') ps_test_tanggal2 from t_project_source where ps_id = {$ps_id}");
$project_source_info = mysql_fetch_object($qup);
$pdf = new FPDF();
$pdf->AddPage();
// $pdf->SetMargins(18,10,20);
$pdf->SetMargins(1, 2, 1, 2);
$rtf->setMargins(1, 2, 1, 2);
_createHeader($project_info);
//$rtf->setMargins(3,2,3,2);
$sect =& $rtf->addSection();
//_createTitle($project_info);
_createTable(0, 3);
//
$sect =& $rtf->addSection();
_createTable(3, 3);
//
$sect =& $rtf->addSection();
_createUraian();
$namafile = "Psikogram_" . $ps_id . ".rtf";
$rtf->sendRtf($namafile);
示例#3
1
 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 genpdf($typefacture, $datefacture, $nofacture, $montant, $civilite, $client, $contact, $chrono, $today)
{
    $pdf = new FPDF("P", "mm", "A4");
    $pdf->AddPage();
    $pdf->SetMargins(20, 20);
    $pdf->AddFont("Arialb", "", "arialb.php");
    //$pdf->AddFont("Courier","","arialb.php");
    /////////////////////////////////////en tete////////////////////////////////////////
    //logo
    $pdf->SetXY(18, 24);
    $X = $pdf->GetX();
    $Y = $pdf->GetY();
    $pdf->Image("img/logo.jpg", $X, $Y, 23, 19, "jpg");
    //Commune de Faa"a
    $pdf->SetXY(42, 22);
    $X = $pdf->GetX();
    $Y = $pdf->GetY();
    $pdf->SetFont("Arialb", "", 13);
    $pdf->Cell(55, 10, utf8_decode("COMMUNE DE FAA'A"));
    $pdf->SetXY($X + 1, $Y + 8);
    $pdf->SetFont("Arial", "", 12);
    $pdf->Cell(55, 5, utf8_decode("N° {$chrono}/DAF/FTR-Régie-hp"), 1, 1, "C");
    //$X=$pdf->GetX();
    $Y = $pdf->GetY();
    $pdf->SetXY($X, $Y);
    $pdf->SetFont("Arial", "", 9);
    $pdf->Cell(55, 5, utf8_decode("Affaire suivie par : Hinatini Parker"), 0, 1);
    $Y = $pdf->GetY();
    $pdf->SetXY($X, $Y);
    $pdf->SetFont("Arial", "", 9);
    $pdf->Cell(55, 3, utf8_decode("Téléphone : 800 960 poste 421"), 0, 0);
    ///////////////////////////////////fin en tete/////////////////////////////////////
    ///////////////////////////////////colonne droite/////////////////////////////////
    //Date
    $pdf->SetXY($X + 100, $Y);
    $pdf->SetFont("Arial", "", 10);
    $pdf->Cell(55, 3, "Faa'a le " . $today, 0);
    ///////////////////////////////////fin colonne droite////////////////////////////
    /////////////////////////////////info exp/dest //////////////////////////////////////
    //Le Maire
    $pdf->SetY(60);
    $pdf->SetFont("times", "", 18);
    $pdf->Cell(0, 10, "Le Maire", 0, 1, "C");
    //Destinataire
    $pdf->SetY(70);
    $pdf->SetFont("Arial", "", 10);
    $pdf->Multicell(0, 5, utf8_decode("à\n{$client}\n{$contact}"), 0, "C");
    $currentY = $pdf->GetY();
    $pdf->SetY($currentY + 10);
    $pdf->SetFont("Arialb", "U", 10);
    $pdf->Cell(20, 5, utf8_decode("Objet :"), 0, 0, "L");
    $pdf->SetFont("Arialb", "", 10);
    $pdf->Cell(0, 5, utf8_decode("Relance des factures impayées"), 0, 1, "L");
    $pdf->SetFont("Arial", "U", 10);
    $pdf->Cell(20, 5, utf8_decode("N/Réf :"), 0, 0, "L");
    $pdf->SetFont("Arial", "", 10);
    $pdf->Cell(0, 5, utf8_decode("Facture {$typefacture} N° {$nofacture} du {$datefacture}"), 0, 1, "L");
    $Y = $pdf->GetY();
    $pdf->SetY($Y + 20);
    $text = "{$civilite},\n\nJe vous informe que, sauf erreur de ma part, vous présentez un impayé " . "envers la Commune de FAA'A d'un montant de {$montant} FCP au titre de la (des) {$typefacture}.\n\n" . "Aussi, je vous demande de bien vouloir vous rapprocher de la Régie municipale pour vous acquitter de la somme due.\n\n" . "A défaut de réponse de votre part dans un délai de 45 jours à compter de la date du présent courrier," . "votre dossier sera transmis en contentieux à la Trésorerie des Iles du Vent, des Australes et des Archipels pour commandement de payer.\n\n" . "La Régie reste à votre disposition au 800.960 poste 421 pour toute entente préalable avant poursuite.\n\n" . "Je vous prie d'agréer, {$civilite}, l'expression de mes salutations distinguées";
    $pdf->Multicell(0, 5, utf8_decode($text), 0, "L");
    $pdf->Image("img/marianne.jpg", 150, 220, 31, 31, "jpg");
    ////////////////////////////////information////////////////////////////////////
    $pdf->Line(20, 273, 190, 273);
    $pdf->SetXY(20, 273);
    $pdf->SetFont("Arial", "", 7);
    $pdf->Cell(0, 3, utf8_decode("PK 4 côté mer - BP 60 002 - 98702 Faa’a Centre - Tahiti / Tél. : (689) 800 960 - Télécopie : (689) 834 890 - E-mail : mairiefaaa@mail.pf\n"), 0, 0, "C");
    ////////////////////////////////fin information////////////////////////////////////
    $pdf->Output();
}
示例#5
0
 function class_pdf_maker($orientation = 'P', $unit = 'in', $format = 'letter')
 {
     parent::FPDF($orientation, $unit, $format);
     parent::SetMargins(0, 0);
     parent::Open();
     parent::AddPage();
     parent::SetAutoPageBreak(FALSE);
 }
示例#6
0
 public function drawPDF()
 {
     $pdf = new \FPDF('L', 'mm', 'Letter');
     $pdf->SetMargins(3.175, 3.175, 3.175);
     $pdf->SetAutoPageBreak(false);
     $pdf = $this->loadPluginFonts($pdf);
     $pdf->SetFont($this->font, '', 16);
     $data = $this->loadItems();
     $count = 0;
     $sign = 0;
     $width = 136.52;
     $height = 108;
     $top = 30;
     $left = 15;
     $effective_width = $width - 2 * $left;
     foreach ($data as $item) {
         if ($count % 4 == 0) {
             $pdf->AddPage();
             $sign = 0;
         }
         $row = floor($sign / 2);
         $column = $sign % 2;
         $price = $this->printablePrice($item);
         $pdf->SetXY($left + $width * $column, $top + $row * $height);
         $pdf->SetFont($this->font, 'B', $this->SMALL_FONT);
         $pdf->Cell($effective_width, 10, $item['brand'], 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFont($this->font, '', $this->MED_FONT);
         $item['description'] = str_replace("\r", '', $item['description']);
         $pdf->Cell($effective_width, 10, str_replace("\n", '', $item['description']), 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFont($this->alt_font, '', $this->SMALLER_FONT);
         $item['size'] = $this->formatSize($item['size'], $item);
         $pdf->Cell($effective_width, 6, $item['size'], 0, 1, 'C');
         $pdf->SetXY($left + $width * $column, $top + $row * $height + 35);
         $pdf->SetFont($this->font, '', $this->BIG_FONT);
         $pdf->Cell($effective_width, 20, $price, 0, 1, 'C');
         if ($item['startDate'] != '' && $item['endDate'] != '') {
             // intl would be nice
             $datestr = $this->getDateString($item['startDate'], $item['endDate']);
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - $top - 20));
             $pdf->SetFont($this->alt_font, '', $this->SMALLEST_FONT);
             $pdf->Cell($effective_width, 20, $datestr, 0, 1, 'R');
         }
         if ($item['originShortName'] != '' || isset($item['nonSalePrice'])) {
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - $top - 20));
             $pdf->SetFont($this->alt_font, '', $this->SMALLEST_FONT);
             $text = $item['originShortName'] != '' ? $item['originShortName'] : sprintf('Regular Price: $%.2f', $item['nonSalePrice']);
             $pdf->Cell($effective_width, 20, $text, 0, 1, 'L');
         }
         $count++;
         $sign++;
     }
     $pdf->Output('Signage4UpL.pdf', 'I');
 }
 /**
  * Constructor method
  * @param  $orientation Page orientation
  * @param  $format Page format
  * @author Pablo Dall'Oglio
  */
 public function __construct($orientation = 'P', $format = 'a4')
 {
     parent::__construct($orientation, 'pt', $format);
     $this->setLocale();
     parent::SetAutoPageBreak(true);
     parent::SetMargins(0, 0, 0);
     parent::SetCreator('Adianti Studio PDF Designer');
     // parent::SetTitle('Letter');
     // parent::SetKeywords('www.xyz.com.br');
     parent::SetFillColor(255, 255, 255);
     parent::Open();
     parent::AliasNbPages();
     parent::SetX(20);
     $this->replaces = array();
     $this->href = '';
     $this->anchors = array();
     $this->orientation = $orientation;
     $this->format = $format;
     parent::SetFont('Arial', '', 10 * 1.3);
 }
   if($align == 2) // alineación derecha
   {
        $espacios = $long - $n;
        for($i = 1; $i <= $espacios; $i++)
        {
           $texto = " " . $texto;
        }
   }

   return $texto;
}

include("./fpdf/fpdf.php");

    $pdf=new FPDF('L', 'mm', 'A4');
	$pdf->SetMargins(4, 4, 4);
    $pdf->Open();

	
	$sueldobase = 0;
	$compensacion = 0;
	$prima = 0;
	$aguinaldo = 0;
	$otrasper = 0;
	$isr = 0;
	$imss = 0;
	$otrasded = 0;
	$neto = 0;
	
	$Ssueldobase = 0;
	$Scompensacion = 0;
示例#9
0
$DistritoEducativo = $config->mostrarConfig("DistritoEducativo", 1);
$DistritoEscolar = $config->mostrarConfig("DistritoEscolar", 1);
$NombreUnidad = $config->mostrarConfig("NombreUnidad", 1);
$TipoUnidadEducativa = $config->mostrarConfig("TipoUnidadEducativa", 1);
$Sie = $config->mostrarConfig("Sie", 1);
$TurnoUnidad = $config->mostrarConfig("TurnoUnidad", 1);
$Localidad = $config->mostrarConfig("Localidad", 1);
function escribe($x, $y, $t, $tam = 12)
{
    global $pdf;
    $pdf->SetFont('Arial', '', $tam);
    $pdf->SetXY($x, $y);
    $pdf->Cell(5, 4, utf8_decode(mb_strtoupper($t, "utf8")), 0, 0, "C");
}
$pdf = new FPDF("P", "mm", array(216, 330));
$pdf->SetMargins(0, 0, 0);
$pdf->SetAutoPageBreak(true, 0);
$pdf->SetFont('Arial', 'B', 12);
$pdf->AddPage();
$pdf->Image("../../imagenes/rude/rude2012.jpg", 0, 0, 216, 330);
//Codigo Sie
escribe(167.5, 29, $Sie[strlen($Sie) - 8]);
escribe(172, 29, $Sie[strlen($Sie) - 7]);
escribe(176.5, 29, $Sie[strlen($Sie) - 6]);
escribe(181, 29, $Sie[strlen($Sie) - 5]);
escribe(185.5, 29, $Sie[strlen($Sie) - 4]);
escribe(190, 29, $Sie[strlen($Sie) - 3]);
escribe(194.5, 29, $Sie[strlen($Sie) - 2]);
escribe(199, 29, $Sie[strlen($Sie) - 1]);
switch ($TipoUnidadEducativa) {
    case 'Privada':
$clearance_model = new ClearanceStatus();
foreach ($listOfSignatories["id"] as $key => $value) {
    $status = $clearance_model->getOverallSignatoryClearanceStatus($stud_id, $value, $current_sysemID);
    if ($status == "No Requirements") {
        $status = "Cleared";
    }
    $listOfSignatories["status"][$key] = $status;
}
//var_dump($listOfSignatories);
$fpdf = new FPDF('P', 'mm', 'Legal');
$fpdf->SetDisplayMode('fullpage', 'continuous');
$fpdf->SetTitle("SOCS Clearance - Export Copy");
$fpdf->SetCreator("USEP SOCS");
$fpdf->SetAuthor("University of Southeastern Philippines");
$fpdf->SetSubject("Electronic Clearance (export copy)");
$fpdf->SetMargins(15, 15, 15);
$fpdf->AddPage();
$fpdf->SetY('15');
$fpdf->Image('logo.jpg', 13, $fpdf->GetY() - 5, 25);
printBody();
$fpdf->Cell(0, 0, "Registrar's Copy", 0, 1, 'R', false);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "", 1, 1, 'L', true);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "Adviser's Copy", 0, 1, 'R', false);
$fpdf->SetY($fpdf->GetY() + 10);
$fpdf->Image('logo.jpg', 13, $fpdf->GetY() - 5, 25);
printBody();
function printBody()
{
    global $fpdf, $stud_id, $stud_gender, $stud_name, $stud_year, $stud_course, $stud_dept, $current_sem, $current_sy, $listOfSignatories, $signatory_model;
 public function create5160MailingLabelFile($results, $name = "dummy_")
 {
     $name .= date("M_d_Y") . ".pdf";
     $fpdf = new FPDF();
     $fpdf->Open();
     $fpdf->AddPage();
     $fpdf->SetFont('Arial', 'B', 10);
     $fpdf->SetMargins(0, 0);
     $fpdf->SetAutoPageBreak(false);
     $x = 0;
     $y = 0;
     // create the array of the ids want to query the database for addresses
     foreach ($results as $student) {
         $st = new PSUPerson($student['spriden_id'], array('address'));
         $LabelText = sprintf("%s\n%s\n%s, %s, %s", $student['spriden_last_name'] . ", " . $student['spriden_first_name'] . " " . $student['spriden_mi'], $st->address['CA'][0]->street_line1, $st->address['CA'][0]->city, $st->address['CA'][0]->stat_code, $st->address['CA'][0]->zip);
         $this->Avery5160($x, $y, $fpdf, $LabelText);
         $y++;
         // next row
         if ($y == 10) {
             // end of page wrap to next column
             $x++;
             $y = 0;
             if ($x == 3) {
                 // end of page
                 $x = 0;
                 $y = 0;
                 $fpdf->AddPage();
             }
         }
         $st->destroy();
     }
     echo $fpdf->Output($name, $destination = 'd');
 }
示例#12
0
 function SetMargins($left, $top, $right = -1)
 {
     parent::SetMargins($left, $top, $right);
     $this->_makePageSize();
 }
示例#13
0
 public function drawPDF()
 {
     $pdf = new \FPDF('L', 'mm', 'Letter');
     $pdf->SetMargins(3.175, 3.175, 3.175);
     $pdf->SetAutoPageBreak(false);
     define('FPDF_FONTPATH', dirname(__FILE__) . '/noauto/fonts/');
     $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     $pdf->AddFont('Gill', 'B', 'GillSansMTPro-Heavy.php');
     $pdf->AddFont('GillBook', '', 'GillSansMTPro-Book.php');
     $pdf->SetFont('Gill', '', 16);
     $data = $this->loadItems();
     $count = 0;
     $sign = 0;
     $width = 68.67;
     $height = 71;
     $top = 22;
     $left = 6.0;
     $effective_width = $width - $left;
     foreach ($data as $item) {
         if ($count % 12 == 0) {
             if ($count != 0) {
                 // draw tick marks again
                 // sometimes other content of the page
                 // overwrites them
                 $pdf->Line(2, $height + 0.0, 6, $height + 0.0);
                 $pdf->Line(2, 2 * $height + 1.0, 6, 2 * $height + 1.0);
                 $pdf->Line(4 * $width - 3, $height + 0.0, 4 * $width + 1, $height + 0.0);
                 $pdf->Line(4 * $width - 3, 2 * $height + 1.0, 4 * $width + 1, 2 * $height + 1.0);
                 $pdf->Line($width + 1.5, 2, $width + 1.5, 8);
                 $pdf->Line(2 * $width + 1.5, 2, 2 * $width + 1.5, 8);
                 $pdf->Line(3 * $width + 1.5, 2, 3 * $width + 1.5, 8);
                 $pdf->Line($width + 1.5, 3 * $height - 6, $width + 1.5, 3 * $height);
                 $pdf->Line(2 * $width + 1.5, 3 * $height - 6, 2 * $width + 1.5, 3 * $height);
                 $pdf->Line(3 * $width + 1.5, 3 * $height - 6, 3 * $width + 1.5, 3 * $height);
             }
             $pdf->AddPage();
             // draw tick marks for cutting
             $pdf->Line(2, $height + 0.0, 6, $height + 0.0);
             $pdf->Line(2, 2 * $height + 1.0, 6, 2 * $height + 1.0);
             $pdf->Line(4 * $width - 3, $height + 0.0, 4 * $width + 1, $height + 0.0);
             $pdf->Line(4 * $width - 3, 2 * $height + 1.0, 4 * $width + 1, 2 * $height + 1.0);
             $pdf->Line($width + 1.5, 2, $width + 1.5, 8);
             $pdf->Line(2 * $width + 1.5, 2, 2 * $width + 1.5, 8);
             $pdf->Line(3 * $width + 1.5, 2, 3 * $width + 1.5, 8);
             $pdf->Line($width + 1.5, 3 * $height - 6, $width + 1.5, 3 * $height);
             $pdf->Line(2 * $width + 1.5, 3 * $height - 6, 2 * $width + 1.5, 3 * $height);
             $pdf->Line(3 * $width + 1.5, 3 * $height - 6, 3 * $width + 1.5, 3 * $height);
             $sign = 0;
         }
         $row = floor($sign / 4);
         $column = $sign % 4;
         $price = $item['normal_price'];
         if ($item['scale']) {
             if (substr($price, 0, 1) != '$') {
                 $price = sprintf('$%.2f', $price);
             }
             $price .= ' /lb.';
         } elseif (isset($item['signMultiplier'])) {
             $price = $this->formatPrice($item['normal_price'], $item['signMultiplier']);
         } else {
             $price = $this->formatPrice($item['normal_price']);
         }
         $pdf->Image(dirname(__FILE__) . '/cd_head_16.png', $left - 1 + $width * $column, $top - 19 + $row * $height, $width - 6);
         $pdf->SetXY($left + $width * $column, $top + $row * $height + 1);
         $pdf->SetFont('Gill', 'B', $this->SMALL_FONT);
         $pdf->MultiCell($effective_width, 6, strtoupper($item['brand']), 0, 'C');
         /**
           This block attempts to write the description then
           checks how many lines it took. If the description was
           longer than two lines, it whites the whole thing out,
           drops one font size, and tries again. Calculating
           effective text size with smart line breaks seems
           really tough.
         */
         $pdf->SetFont('Gill', '', $this->MED_FONT);
         $font_shrink = 0;
         while (true) {
             $pdf->SetX($left + $width * $column);
             $y = $pdf->GetY();
             $pdf->MultiCell($effective_width, 7, $item['description'], 0, 'C');
             if ($pdf->GetY() - $y > 14) {
                 $pdf->SetFillColor(0xff, 0xff, 0xff);
                 $pdf->Rect($left + $width * $column, $y, $left + $width * $column + $effective_width, $pdf->GetY(), 'F');
                 $font_shrink++;
                 if ($font_shrink >= $this->MED_FONT) {
                     break;
                 }
                 $pdf->SetFontSize($this->MED_FONT - $font_shrink);
                 $pdf->SetXY($left + $width * $column, $y);
             } else {
                 if ($pdf->GetY() - $y < 14) {
                     $words = explode(' ', $item['description']);
                     $multi = '';
                     for ($i = 0; $i < floor(count($words) / 2); $i++) {
                         $multi .= $words[$i] . ' ';
                     }
                     $multi = trim($multi) . "\n";
                     for ($i = floor(count($words) / 2); $i < count($words); $i++) {
                         $multi .= $words[$i] . ' ';
                     }
                     $item['description'] = trim($multi);
                     $pdf->SetFillColor(0xff, 0xff, 0xff);
                     $pdf->Rect($left + $width * $column, $y, $left + $width * $column + $effective_width, $pdf->GetY(), 'F');
                     $pdf->SetXY($left + $width * $column, $y);
                     $pdf->MultiCell($effective_width, 7, $item['description'], 0, 'C');
                 }
                 break;
             }
         }
         $pdf->SetX($left + $width * $column);
         $pdf->SetFont('GillBook', '', $this->SMALLER_FONT);
         $item['size'] = strtolower($item['size']);
         if (substr($item['size'], -1) != '.') {
             $item['size'] .= '.';
             // end abbreviation w/ period
             $item['size'] = str_replace('fz.', 'fl oz.', $item['size']);
         }
         if (substr($item['size'], 0, 1) == '.') {
             $item['size'] = '0' . $item['size'];
             // add leading zero on decimal qty
         }
         if (strlen(ltrim($item['upc'], '0')) < 5 && $item['scale']) {
             $item['size'] = 'PLU# ' . ltrim($item['upc'], '0');
             // show PLU #s on by-weight
         }
         $pdf->Cell($effective_width, 6, $item['size'], 0, 1, 'C');
         $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - 42));
         $pdf->SetFont('Gill', '', $this->BIG_FONT);
         $pdf->Cell($effective_width, 12, $price, 0, 1, 'C');
         if ($item['startDate'] != '' && $item['endDate'] != '') {
             // intl would be nice
             $datestr = date('M d', strtotime($item['startDate'])) . chr(0x96) . date('M d', strtotime($item['endDate']));
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - 37));
             $pdf->SetFont('GillBook', '', $this->SMALLEST_FONT);
             $pdf->Cell($effective_width, 20, strtoupper($datestr), 0, 1, 'R');
         }
         if ($item['upc'] != '') {
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - 37));
             $pdf->SetFont('GillBook', '', $this->SMALLEST_FONT);
             $pdf->Cell($effective_width, 20, $item['upc'], 0, 1, 'L');
         }
         $pdf->Image(dirname(__FILE__) . '/' . $this->footer_image, $left - 1 + $width * $column, $top + $height * $row + ($height - $top - 4), $width - 6);
         $count++;
         $sign++;
     }
     $pdf->Output('Signage12UpL.pdf', 'I');
 }
示例#14
0
fwrite($fh, $telephone."\n");
fwrite($fh, "\n\n");
fwrite($fh, $fullclient1."\n");
fwrite($fh, $fullclient2."\n");
fwrite($fh, $fullclient3."\n");
fwrite($fh, "\n\n");
fwrite($fh, "Pet ID # ".$petid." A ".$gender." ".$speciesdesc." named ".$petinfo."\n");
fwrite($fh, "Date of Visit: ".$date."  \n");
fwrite($fh, "Temperature was ".$temp."   Weight was ".$weight."   Pulse was ".$pulse."\n");
fclose($fh);
*/
$filename = "./notes/visit" . $petid . ".pdf";
require_once './fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetMargins(10, 10, 10);
$pdf->SetFont('Courier', 'B', 16);
$pdf->Cell(0, 5, $coname, 0, 1, "C");
$pdf->SetFont('Courier', 'B', 14);
$pdf->Cell(0, 5, $fulladdress, 0, 1, "C");
$pdf->Cell(0, 5, $telephone, 0, 1, "C");
$pdf->Ln(5);
$pdf->Ln(5);
$pdf->SetFont('Courier', '', 12);
$pdf->Cell(0, 5, $fullclient1, 0, 1, "L");
$pdf->Cell(0, 5, $fullclient2, 0, 1, "L");
$pdf->Cell(0, 5, $fullclient3, 0, 1, "L");
$pdf->Ln(5);
$pdf->Ln(5);
$pdf->Cell(0, 5, "Pet ID # " . $petid . " A " . $gender . " " . $speciesdesc . " named " . $petinfo, 0, 1, "L");
$pdf->Cell(0, 5, "Date of Visit: " . $date, 0, 1, "L");
示例#15
0
        $this->Cell(30, 10, 'Cetak Kartu', 1, 0, 'C');
        //Line break
        $this->Ln(20);
    }
    function Footer()
    {
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf = new FPDF('L', 'cm', 'A4');
$pdf->AddPage();
$pdf->SetMargins(1.5, 3, 1.75);
$pdf->SetFont('times', '', 14);
$pdf->Cell('', 0.6, 'Kartu Berobat', 0, 1, 'C');
$pdf->Ln();
$pdf->SetFontSize(10);
$pdf->Cell(3, 0.6, 'Antiran No', 1, 0, 'C');
$pdf->Cell(3, 0.6, 'ID Pasien', 1, 0, 'C');
$pdf->Cell(3, 0.6, 'Nama Pasien', 1, 0, 'C');
$pdf->Cell(4, 0.6, 'Alamat', 1, 0, 'C');
$pdf->Cell(2.5, 0.6, 'Jenis Kelamin', 1, 0, 'C');
$pdf->Cell(3, 0.6, 'Usia', 1, 0, 'C');
$pdf->Cell(3, 0.6, 'Golongan Darah', 1, 0, 'C');
$pdf->Cell(2.5, 0.6, 'No Ponsel', 1, 0, 'C');
$sql = "select * from pasien WHERE pasien_id='{$_GET['id']}' ";
foreach ($dbh->query($sql) as $data) {
    $no++;
示例#16
0
 foreach ($loc as $class_id => $class_name) {
     $cat_names_array = array();
     /** holds the names of the categories for this class **/
     $sql = "SELECT * from categories where class_id=" . $class_id;
     $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;
 //create a new pdf object:
 $pageOrientation = getTableCardProperty(TC_PAGE_ORIENTATION, $tableCardId);
 $measureUnit = getTableCardProperty(TC_MEASURE_UNIT, $tableCardId);
 $dimension = getTableCardProperty(TC_DIMENSION, $tableCardId);
 if ($dimension == TC_CUSTOM_FORMAT) {
     $size = array();
     $size[] = getTableCardProperty(TC_CUSTOM_FORMAT_Y, $tableCardId);
     $size[] = getTableCardProperty(TC_CUSTOM_FORMAT_X, $tableCardId);
 } else {
     $size = $dimension;
 }
 //create the pdf with constructor:
 $pdf = new FPDF($pageOrientation, $measureUnit, $size);
 $pdf->AddPage();
 //raender setzen: $pdf->SetMargins(float left, float top [, float right])
 $pdf->SetMargins(5.0, 5.0);
 //SetFont(string family [, string style [, float size]])
 /*
 # Courier (fixed-width)
 # Helvetica or Arial (synonymous; sans serif)
 # Times (serif) 
 Font style. Possible values are (case insensitive):
 
     * empty string: regular
     * B: bold
     * I: italic
     * U: underline 
     * 
     * Font size in points. 
 * */
 $pdf->SetFont('Arial', 'B', 16);
<?php

// advancedII/pdf/teste.php
require_once 'meupdf.php';
$pdf = new FPDF('P', 'cm', 'A4');
$pdf->SetAuthor('GerenciaNet');
$pdf->SetTitle('Meu Primeiro Documento PDF');
$pdf->SetMargins(2, 2, 1);
$pdf->AliasNbPage('{nb}');
$pdf->AddPage();
// tentar adicionar um footer, adicionar a página, e tentar adicionar um header na nova página
$produtos = array(array('nome' => 'Lixa de unha reutilizável', 'marca' => 'Treco', 'preco' => 10.5), array('nome' => 'Escova de Dentes Multiuso', 'marca' => 'OralBJ', 'preco' => 12), array('nome' => 'Refrigerante de Cachaça', 'marca' => 'Companhia das Índias Antigas', 'preco' => 4.5));
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(8, 1, 'Nome do Produto', 1, 0, 'C');
$pdf->Cell(5, 1, 'Marca', 1, 0, 'C');
$pdf->Cell(5, 1, 'Preço', 1, 0, 'C');
$pdf->Ln(1);
$pdf->SetFont('Arial', '', 11);
foreach ($produtos as $produto) {
    $pdf->Cell(8, 1, $produto['nome'], 1, 0, 'C');
    $pdf->Cell(5, 1, $produto['marca'], 1, 0, 'C');
    $pdf->Cell(5, 1, $produto['preco'], 1, 0, 'C');
    $pdf->Ln(1);
}
$pdf->Output('first.pdf', 'I');
示例#19
0
    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');
        }
    }
    $pdf->Output();
}
?>

示例#20
0
require 'fpdf/fpdf.php';
//query databases
$id_ta = $_GET['ta'];
$nnis = $_GET['nis'];
$getSemester = mysql_fetch_array(mysql_query("select semester from tahunajaran where id_ta='{$id_ta}'"));
$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();
示例#21
0
文件: expense.php 项目: ROCKY-SAM/IOC
$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');
    }
}
foreach ($sum as $row) {
    $pdf->SetFont('Arial', '', 8);
    $pdf->Ln();
示例#22
0
 /** width of the averages in heading **/
 /** @ 72dpi, 11 X 8.5 is (792 X 612) **/
 /** with a margin of 36 pts or 1/2 inch **/
 $pdf = new FPDF('P', 'in', 'Letter');
 $pdf->open();
 $pdf->SetTitle($pageTitle);
 /** Get the list of categories for this class **/
 /** NOW LOOP OVER THE ARRAY OF STUDENTS **/
 /** THE FOLLOWING SHOULD BE REPEATED FOR EACH STUDENT **/
 if (count($reports)) {
     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);
$query_empleado .= " left join cat_movimientos mov on n.estatus = mov.idmovimiento";

$query_empleado .= " where n.idnominaemp='$_GET[idnominaemp]'";
$res = mysqli_query (  $conexion,$query_empleado );
$ren = mysqli_fetch_array ( $res );

if ($_GET [ver] != 1) {
	$insertMH = "INSERT INTO movimiento_historial (" . $query_empleado . ")";
	// insercion en movimiento historial
	mysqli_query ( $conexion,$insertMH );
}

include ("./fpdf/fpdf.php");

$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 ) );
示例#24
-1
require '../fpdf17/fpdf.php';
require '../Conexion.php';
$id = $_GET["id"];
$fecha = $_GET["fecha"];
$proveedor = utf8_decode($_GET["proveedor"]);
$idproveedor = $_GET["idproveedor"];
$tipo = $_GET["tipo"];
$encargado = utf8_decode($_GET["encargado"]);
$identrada = $_GET["identrada"];
$totalsiniva = $_GET["totalsiniva"];
$iva = $_GET["iva"];
$totalconiva = $_GET["totalconiva"];
$consulta = mysql_query("SELECT valor,tb_productos.nombre as nombre, cantidad,tr_productos_entradas.id_producto as id " . "FROM tr_productos_entradas,tb_productos,tb_usuarios WHERE id_entrada='{$identrada}' " . "and tr_productos_entradas.id_producto=tb_productos.id_producto and proveedor=cc");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetMargins(30, 25, 30);
$pdf->SetFont('Arial', '', 10);
$pdf->Image('../images/aseoblanco.jpg', 30, 30, 70);
$pdf->SetXY(29, 10);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(0, 100, 'Proveedor:', 0, 0, 'L');
$pdf->SetXY(50, 10);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 100, $proveedor, 0, 0, 'L');
if ($tipo == "Factura") {
    $pdf->SetXY(126, 30);
    $pdf->Cell(1, 10, $tipo, 0, 0, 'R');
    $pdf->SetXY(124, 40);
    $pdf->Cell(1, 10, 'Fecha', 0, 0, 'R');
    $pdf->SetXY(119, 55);
    $pdf->SetFont('Arial', 'B', 10);
示例#25
-1
 public function post_handler()
 {
     global $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $fy = FormLib::get('fy');
     $per_page = FormLib::get('per_page');
     $custdata = new CustdataModel($dbc);
     $meminfo = new MeminfoModel($dbc);
     $query = $dbc->prepare('
         SELECT p.cardno,
             p.cash_pat,
             m.zip,
             p.check_number
         FROM patronage AS p
             INNER JOIN meminfo AS m ON p.cardno=m.card_no
             INNER JOIN custdata AS c ON p.cardno=c.CardNo AND c.personNum=1
         WHERE p.FY=?
         ORDER BY m.zip,
             c.LastName,
             c.FirstName');
     $result = $dbc->execute($query, array($fy));
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->SetMargins(6.35, 6.35, 6.35);
     // quarter-inch margins
     $pdf->SetAutoPageBreak(false);
     $filename = '';
     $this->files = array();
     $filenumber = 1;
     set_time_limit(0);
     while ($w = $dbc->fetch_row($result)) {
         if (empty($filename)) {
             $filename = $filenumber . '-' . substr($w['zip'], 0, 5);
         }
         $dbc = FannieDB::get($FANNIE_OP_DB);
         $custdata->CardNo($w['cardno']);
         $custdata->personNum(1);
         $custdata->load();
         $meminfo->card_no($w['cardno']);
         $meminfo->load();
         if ($w['check_number'] == '') {
             $patronage = new PatronageModel($dbc);
             $patronage->cardno($w['cardno']);
             $patronage->FY($fy);
             $number = GumLib::allocateCheck($patronage, false);
             $dbc = FannieDB::get($FANNIE_OP_DB);
             $patronage->check_number($number);
             $patronage->save();
             $w['check_number'] = $number;
         }
         $pdf->AddPage();
         $pdf->Image('rebate_body.png', 10, 0, 190);
         $check = new GumCheckTemplate($custdata, $meminfo, $w['cash_pat'], 'Rebate ' . $fy, $w['check_number']);
         $check->renderAsPDF($pdf);
         if ($pdf->PageNo() == $per_page) {
             $filename .= '-' . substr($w['zip'], 0, 5) . '.pdf';
             $filenumber++;
             $pdf->Output('/tmp/' . $filename, 'F');
             $this->files[] = $filename;
             $filename = '';
             $pdf = new FPDF('P', 'mm', 'Letter');
             $pdf->SetMargins(6.35, 6.35, 6.35);
             // quarter-inch margins
             $pdf->SetAutoPageBreak(false);
         }
     }
     $filename .= '-End.pdf';
     $pdf->Output('/tmp/' . $filename, 'F');
     $this->files[] = $filename;
     return true;
 }
示例#26
-1
        $ref_pdf->Text(75, 284, utf8_decode('Volksbank Butzbach - IBAN: DE29 5186 1403 0000 0370 52 - BIC: GENODE51BUT'));
        $ref_pdf->Text(187, 284, sprintf('%d / {nb}', $ref_pdf->PageNo()));
        // Schriftfarbe setzen
        $ref_pdf->SetTextColor(0, 0, 0);
    }
}
// PDF-Bibliothek einbinden
require_once './pdf/fpdf.php';
// neues PDF-Dokument erzeugen
$pdf = new FPDF('P', 'mm', 'A4');
// ... entspricht dem Aufruf von
$pdf->AliasNbPages('{nb}');
// Automatischen Seitenumbruch deaktivieren
$pdf->SetAutoPageBreak(false);
// Seitenabstand definieren
$pdf->SetMargins(25, 15, 15);
// die Fluggeldkonten aller Mitglieder ermitteln
$data = getTabelleFluggeldkonten();
// ******************************************************** SEITE ******************************************************** //
// Seite hinzufügen
$pdf->AddPage();
// Kopfzeile auf der aktuellen Seite hinzufügen
pdf_header($pdf);
$y = 35;
foreach ($data as $saldo) {
    $pdf->SetXY(20, $y);
    // Schriftgrad einstellen
    $pdf->SetFont('Arial', '', 11);
    $pdf->Cell(20, 5.5, utf8_decode($saldo['acb_nr']), 0, 0, 'L');
    $pdf->Cell(40, 5.5, utf8_decode($saldo['nachname']), 0, 0, 'L');
    $pdf->Cell(40, 5.5, utf8_decode($saldo['vorname']), 0, 0, 'L');
示例#27
-1
 function SetMargins($left, $top, $right = null, $bottom = null)
 {
     parent::SetMargins($left, $top, $right);
     $this->bMargin = $bottom ? $bottom : $top;
     $this->_makePageSize();
 }
示例#28
-2
$query = "SELECT * FROM nasabah ORDER BY noiden_n";
$sql = mysqli_query($query);
$data = array();
while ($row = mysqli_fetch_assoc($sql)) {
    array_push($data, $row);
}
#setting judul laporan dan header tabel
$judul = "LAPORAN DATA NASABAH";
$header = array(array("label" => "No Identitas", "length" => 25, "align" => "L"), array("label" => "Nama", "length" => 20, "align" => "L"), array("label" => "Nama Ibu Kan", "length" => 15, "align" => "L"), array("label" => "Bukti Ident", "length" => 10, "align" => "L"), array("label" => "Tempat Lahir", "length" => 20, "align" => "L"), array("label" => "Tgl Lahir", "length" => 15, "align" => "L"), array("label" => "Jenis Kelamin", "length" => 20, "align" => "L"), array("label" => "Pekerjaan", "length" => 20, "align" => "L"), array("label" => "Penghasilan (/bulan)", "length" => 25, "align" => "L"), array("label" => "Alamat", "length" => 20, "align" => "L"), array("label" => "Telp", "length" => 20, "align" => "L"), array("label" => "Ahli Waris", "length" => 30, "align" => "L"));
#sertakan library FPDF dan bentuk objek
ob_start();
require_once "fpdf16/fpdf.php";
$pdf = new FPDF();
$pdf->AddPage();
#tampilkan judul laporan
$pdf->SetMargins(5, 20, 20, 20);
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(0, 20, $judul, '0', 1, 'C');
#buat header tabel
$pdf->SetFont('Arial', 'B', '7');
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
foreach ($header as $kolom) {
    $pdf->Cell($kolom['length'], 3, $kolom['label'], 1, '0', $kolom['align'], true);
}
$pdf->Ln();
#tampilkan data tabelnya
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('');
示例#29
-3
    decode_get2($_SERVER["REQUEST_URI"]);
}
$id_grupo = $_GET["id_grupo"];
$cod_se = $_GET["cod_se"];
$sigla = $_GET["sigla"];
$id_materia = $_GET["id_materia"];
$archivo = $sigla . "_" . $id_grupo . ".pdf";
if (!isset($_SESSION["__doc_usuario"]) || !isset($_SESSION["__doc_cambio_clave"])) {
    $id = encode_this("id_gestion={$id_gestion}&id_periodo={$id_periodo}");
    header("location: ../index.php?" . $id);
    die;
}
$smarty = new Smarty();
$f = new uti();
$pdf = new FPDF('p', 'mm', 'Letter');
$pdf->SetMargins('25', '21');
$descrip_grupo = '';
if ($id_grupo >= 50 && $id_grupo <= 69) {
    $descrip_grupo = 'P.A.I.';
}
if ($id_grupo >= 70 && $id_grupo <= 79) {
    $descrip_grupo = 'Ex.MESA';
}
if ($id_grupo >= 80 && $id_grupo <= 89) {
    $descrip_grupo = 'Ex.GRACIA';
}
if ($id_grupo == 90) {
    $descrip_grupo = '1';
    $sigla = $sigla . "  (INTENSIVO)";
}
if ($id_grupo == 91) {
示例#30
-3
 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();
 }