本文整理汇总了PHP中FPDF::SetXY方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::SetXY方法的具体用法?PHP FPDF::SetXY怎么用?PHP FPDF::SetXY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::SetXY方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_id_upc_terms_handler
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');
//.........这里部分代码省略.........
示例2: drawPDF
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');
}
示例3: preprocess
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;
}
示例4: generate_pdf
private function generate_pdf($srcText, $dest)
{
// Set some document variables
$author = "";
$x = 50;
$text = "<<<EOT" . $srcText . "EOT";
// Create fpdf object
$pdf = new FPDF('P', 'pt', 'Letter');
// Set base font to start
$pdf->SetFont('Times', 'B', 24);
// Add a new page to the document
$pdf->addPage();
// Set the x,y coordinates of the cursor
$pdf->SetXY($x, 50);
// Write 'Simple PDF' with a line height of 1 at the current position
$pdf->Write(25, 'Simple PDF');
// Reset the font
$pdf->SetFont('Courier', 'I', 10);
// Set the font color
$pdf->SetTextColor(255, 0, 0);
// Reset the cursor, write again.
$pdf->SetXY($x, 75);
$pdf->Cell(0, 11, "By: {$author}", 'B', 2, 'L', false);
// Place an image on the pdf document
//$pdf->Image('graph.jpg', $x, 100, 150, 112.5, 'JPG');
// Reset font, color, and coordinates
$pdf->SetFont('Arial', '', 12);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY($x, 250);
// Write out a long text blurb.
$pdf->write(13, $srcText);
// echo "<pre>";
// print_r($pdf);exit;
$fileName = substr($dest, 0, strpos($dest, '.')) . "_" . time() . '.pdf';
$pdf->Output($fileName, 'F');
}
示例5: FPDF
$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
require 'fpdf17/fpdf.php';
//create a FPDF object
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
$pdf->Image('logo.png', 10, 20, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 20);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 75, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(10, 90);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
//Output the document
$pdf->Output();
?>
示例6: generatePDF
function generatePDF($print_id, $print_type = 1)
{
include "config.php";
require_once 'fpdf/fpdf.php';
$db = go\DB\DB::create($db_params, 'mysql');
$db->query('SET CHARACTER SET cp1251');
$get_print = $db->query('SELECT `finish_number`, `valve_type_id` FROM {numbers} WHERE `print_id`=?', array($_GET['print_id']))->assoc();
$get_print_info = $db->query('SELECT DISTINCT(`nm`.`order`) as `order`, `us`.`name` as `name`, `nm`.`print_id` as `print_id` FROM {numbers} `nm` LEFT JOIN {users} `us` ON (`nm`.`user_id` = `us`.`id`) WHERE `print_id`=?', array($_GET['print_id']))->row();
define('FPDF_FONTPATH', 'fpdf/fonts');
$pdf = new FPDF("L", "mm", array("88", "7"));
$pdf->AddFont('Arial-BoldMT', 'B', 'arial_bold.php');
$pdf->SetFont('Arial-BoldMT', 'B', 11);
$pdf->SetTextColor(0);
//Add info for this order
$pdf->AddPage('L');
$pdf->SetAutoPageBreak(false);
$pdf->SetXY(0, 0);
$pdf->Cell(43, 7, $get_print_info['name'], 0, 0, "C", 0);
$pdf->Cell(4, 7, '', 0, 0, "C", 0);
$pdf->Cell(43, 7, $get_print_info['order'], 0, 0, "C", 0);
//End of add
for ($i = 0; $i < count($get_print); $i++) {
$pdf->AddPage('L');
$pdf->SetAutoPageBreak(false);
$pdf->SetXY(0, 0);
$pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i]['finish_number'], 0, 0, "C", 0);
$pdf->Cell(4, 7, '', 0, 0, "C", 0);
if ($i + $print_type < count($get_print)) {
$pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i + $print_type]['finish_number'], 0, 0, "C", 0);
}
$pdf->SetAutoPageBreak(false);
$i += $print_type;
}
return $pdf->Output($get_print_info['print_id'] . '.pdf', 'I');
}
示例7: post_id_handler
public function post_id_handler()
{
if (!is_array($this->id)) {
$this->id = array($this->id);
}
$today = date("F j, Y");
$pdf = new FPDF('L', 'in', array(3.5, 5.0));
$pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
$primary = "";
$pdf->SetAutoPageBreak(true, 0);
$pdf->SetFont("Gill", "", 10);
//Meat of the statement
foreach ($this->id as $card_no) {
$account = \COREPOS\Fannie\API\member\MemberREST::get($card_no);
$pdf->AddPage();
$pdf->SetXY(3.0, 1.45);
foreach ($account['customers'] as $c) {
if ($c['accountHolder']) {
$pdf->Cell(2, 0.25, $c['firstName'] . ' ' . $c['lastName'], "", 1, "L");
break;
}
}
$pdf->SetX(3.0);
$pdf->Cell(2, 0.25, $account['addressFirstLine'], "", 1, "L");
if ($account['addressSecondLine']) {
$pdf->SetX(3.0);
$pdf->Cell(2, 0.25, $account['addressSecondLine'], "", 1, "L");
}
$pdf->SetX(3.0);
$str = $account['city'] . ", " . $account['state'] . " " . $account['zip'];
$pdf->Cell(2, 0.25, $str, "", 1, "L");
}
$pdf->Output('member postcards.pdf', 'D');
return false;
}
示例8: UsersTrafficPeriodPDF
function UsersTrafficPeriodPDF()
{
//require('chart.php');
require 'lib/fpdf.php';
global $SAMSConf;
global $DATE;
$DB = new SAMSDB();
$sdate = $DATE->sdate();
$edate = $DATE->edate();
$bdate = $DATE->BeginDate();
$eddate = $DATE->EndDate();
$size = "";
if (isset($_GET["size"])) {
$size = $_GET["size"];
}
require "reportsclass.php";
$dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
$lang = "./lang/lang.{$SAMSConf->LANG}";
require $lang;
define('FPDF_FONTPATH', 'lib/font/');
require 'lib/fpdf.php';
$pdfFile = new FPDF();
$pdfFile->Open();
$pdfFile->AddFont('Nimbus', '', 'Nimbus.php');
$pdfFile->SetAuthor("SQUID Account Management System");
$pdfFile->SetCreator("Created by SAMS2");
$pdfFile->SetTitle("SAMS2 users statistic");
// UsersTrafficPeriodPDF();
$pdfFile->AddPage();
$pdfFile->SetFont('Nimbus', '', 15);
//$pdfFile->SetFont('SUSESerif-Roman','',16);
$pdfFile->SetXY(50, 15);
echo " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}<br>";
$pdfFile->Write(0, " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}");
$pdfFile->Output();
}
示例9:
//medifinisikan set margin
$pdf->SetMargins(40, 10, 6);
$pdf->Image('images/icon/kop.png', 12, 3, 0, 28);
$pdf->SetFont('Arial', 'B', 10);
//fungsi mengatur text area font
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(140, 50, "Tahun Ajaran");
$pdf->Text(165, 50, " : " . $tampilHasil['ta']);
$pdf->Text(15, 50, "NIS");
$pdf->Text(40, 50, " : " . $tampilHasil['nis']);
$pdf->Text(15, 55, "Nama Siswa");
$pdf->Text(40, 55, " : " . $tampilHasil['nama_siswa']);
$pdf->Text(140, 55, "Semester");
$pdf->Text(165, 55, " : " . $tampilHasil['semester']);
//fungsi mengatur dan posisi table x dan y
$pdf->SetXY(15, 60);
$pdf->AliasNbPages();
// function untuk menampilkan tabel
//membuat header tabel set color
$pdf->SetFillColor(50, 50, 50);
$pdf->SetTextColor(255, 255, 255);
$pdf->Cell(10, 5, "No.", 1, 0, 'C', true);
$pdf->Cell(40, 5, "Kode Mapel", 1, 0, 'C', true);
$pdf->Cell(40, 5, "Mata Pelajaran", 1, 0, 'C', true);
$pdf->Cell(20, 5, "Kelas", 1, 0, 'C', true);
$pdf->Cell(30, 5, "Nilai Akhir", 1, 0, 'C', true);
$pdf->Cell(30, 5, "Predikat (NA)", 1, 0, 'C', true);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0, 0, 0);
//membuat halaman
$no = 1;
示例10:
//set document properties
$pdf->SetAuthor('CORCIOVA ENACHI');
$pdf->SetTitle('FISA PARTIDEI');
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 10);
//$pdf->SetTextColor(50,60,100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//display the title with a border around it
//$pdf->SetXY(50,20);
//$pdf->SetDrawColor(50,60,100);
$pdf->Write(7, 'CASA DE AJUTOR RECIPROC A PENSIONARILOR DIN FOCSANI SI JUDETUL VRANCEA');
//$pdf->Ln(2);
$pdf->SetFont('Helvetica', 'B', 12);
$pdf->SetXY(10, 15);
//$pdf->Ln(3);
$s = " ";
$r2 = $s . "Partida nr: " . $par . " Nume: " . $nume . " CNP: " . $cnp;
$pdf->Write(7, $r2);
$pdf->SetFont('Helvetica', 'B', 10);
$pdf->SetXY(10, 20);
$r3 = $s . "CI/BI: " . $ser . " " . $nr . " Elib " . $delib . " Pol. " . $pol . " din " . $loca . " Adresa: " . $adr;
$pdf->Write(7, $r3);
//$pdf->Write(7,'C.E.C.nr. ');
//$pdf->Write(7,$decp);
$r4 = $s . "Data inscrierii: " . $dins . " Sectia credit: " . $discre . " Sotul: " . $sot . " Sectia deces: " . $disdec;
$pdf->SetFont('Helvetica', 'B', 10);
$pdf->SetXY(10, 25);
$pdf->Write(7, $r4);
$r5 = $s . "Decizie nr. " . $decp . " Pensie lunara: " . $pen;
示例11: FPDF
include '../../resources/orcl_conex.php';
include 'Models/class.Denuncia.php';
include 'Models/class.DenunciaDAO.php';
include '../mod_ciudadanos/Models/class_fisc_ciudadano.php';
include '../mod_ciudadanos/Models/class_fisc_ciudadanoDAO.php';
$pdf = new FPDF('P');
$pdf->AddPage();
$pdf->Image('../../public_html/imagenes/logoclaro.png', 40, 50, 120);
$pdf->SetTitle("Notificación al denunciante", true);
$pdf->Image('../../public_html/imagenes/logoivss.png', 20, 7, 13);
$pdf->SetFont('Arial', '', 6);
$pdf->Text(40, 10, utf8_decode('REPÚBLICA BOLIVARIANA DE VENEZUELA'));
$pdf->Text(40, 13, utf8_decode('MINISTERIO DEL PODER POPULAR PARA EL TRABAJO Y SEGURIDAD SOCIAL'));
$pdf->Text(40, 16, utf8_decode('INSTITUTO VENEZOLANO DE LOS SEGUROS SOCIALES'));
$pdf->Text(40, 19, utf8_decode('DIRECCIÓN GENERAL DE FISCALIZACIÓN'));
$pdf->SetXY(20, 26);
$pdf->SetFillColor(35, 65, 129);
$pdf->SetFont('Arial', 'B', 8);
$pdf->setTextColor(255, 255, 255);
$pdf->Cell(50, 6, utf8_decode('N° DE QUEJAS Y/O RECLAMOS'), 1, 0, 'C', TRUE);
$pdf->SetXY(20, 32);
$pdf->Cell(50, 6, '', 1, 0, 'C', FALSE);
$pdf->setTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(60, 50, utf8_decode('COMPROBANTE DE RECEPCIÓN DE QUEJA Y/O RECLAMO'));
$pdf->SetXY(20, 52);
$pdf->SetFont('Arial', 'B', 8);
$pdf->setTextColor(255, 255, 255);
$pdf->Cell(50, 6, utf8_decode('FECHA DE PRESENTACIÓN'), 1, 0, 'C', TRUE);
$pdf->Cell(35, 6, '', 1, 0, 'C', FALSE);
$pdf->Cell(50, 6, utf8_decode('HORA DE PRESENTACIÓN'), 1, 0, 'C', TRUE);
示例12:
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '');
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage('P');
$pdf->SetDisplayMode(real, 'default');
//display the title with a border around it
//Set x and y position for the main text, reduce font size and write content
$pdf->Image('img/form_1_04_1.jpg', 5, 5, 205);
if ($row['study_type'] == "Денна") {
$pdf->Line(58, 53.5, 65, 53.5);
}
if ($row['study_type'] == "Заочна") {
$pdf->Line(67, 53.5, 76, 53.5);
}
$pdf->SetXY(52, 64);
$pdf->SetFont('Times', '', 10);
$pdf->Write(5, $row['ab_id']);
$pdf->SetFontSize(9);
$pdf->SetXY(22, 70);
$pdf->Write(5, $row['lastname']);
$pdf->SetXY(15, 74.5);
$pdf->Write(5, $row['firstname']);
$pdf->SetXY(24, 78);
$pdf->Write(5, $row['patronymic']);
$pdf->SetFontSize(8);
$pdf->SetXY(34, 81.5);
$pdf->Write(5, $row['faculty']);
$pdf->SetXY(7, 89);
$pdf->Write(5, str_replace($row['faculty'], "", $row['training']));
$pdf->SetXY(7, 96);
示例13: foreach
foreach ($reports as $id => $report) {
$teacherName = $report['classInfo']['first_name'] . " " . $report['classInfo']['last_name'];
$rcv = 0;
/** used for row shading **/
$pdf->AddPage('P');
$pdf->SetMargins($lm, $tm);
//$pdf->SetTitle($className."_".$termName."_".$sname."_ProgressReport.pdf");
/** START BUILDING THE PAGE **/
/** First the heading **/
$y_coord = $tm;
$x_coord = $lm;
$pdf->SetFillColor(255, 255, 255);
/** Page Title **/
$pdf->SetTextColor(51, 102, 102);
$pdf->SetFont('Times', 'B', $titlefs);
$pdf->SetXY($x_coord, $y_coord);
$title = $pdf->Cell($headingw, $titleh, 'Questar III Student Progress Report', 0, 1, 'C', 0);
$y_coord += $titleh;
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', $colheadingfs);
$pdf->SetXY($x_coord, $y_coord);
$pdf->Cell($headingw, 0.4, $report['studentName'], 0, 2, 'L', 0);
$pdf->Cell($headingw, 0.4, $report['classInfo']['course_name'] . ' ~ ' . $teacherName, 0, 2, 'L', 0);
$pdf->Cell($headingw, 0.4, "School Year " . $schoolYear . " ~ " . $report['classInfo']['term_name'], 0, 2, 'L', 0);
$pdf->Cell($headingw, 0.4, "Printed on " . $currentDate, 0, 2, 'L', 0);
/** SUMMARY SECTION **/
$y_coord = $tm + $titleh;
$x_coord = $lm + $headingw;
$pdf->SetFont('Times', 'B', $colheadingfs + 1);
$pdf->SetXY($x_coord, $y_coord);
$pdf->SetFillColor(192, 192, 192);
示例14: fee_month
public function fee_month()
{
$date_from = $this->input->get("date_from");
$date_to = $this->input->get("date_to");
$event = $this->input->get("event");
require_once "../assets/fpdf/fpdf.php";
$pdf = new FPDF();
$pdf->AliasNbPages();
$pdf->AddPage('L', 'A4');
//title
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(0, 10, 'Report Absensi Moderasi HM Sampoerna', 0, 0, 'C');
$pdf->Ln(10);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 5, 'Periode Tanggal : ' . $date_from . ' s/d ' . $date_to, 0, 0, 'C');
$pdf->Ln(5);
$pdf->Cell(0, 5, 'Event : ' . $this->event_model->get_event_name($this->input->get("event")), 0, 0, 'L');
$pdf->Ln(10);
//header
$pdf->SetFont('Arial', 'B', 8);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->Cell(10, 14, 'No', 1, 0, 'C');
$pdf->Cell(40, 14, 'Moderator', 1, 0, 'C');
$from = date_create(format_ymd($date_from));
$to = date_create(format_ymd($date_to));
$j = 0;
while ($from <= $to) {
$pdf->SetXY(60 + $j, 35);
$pdf->Cell(6, 7, date_format($from, "d"), 1, 0, 'C');
$pdf->SetXY(60 + $j, 42);
$pdf->Cell(6, 7, date_format($from, "m"), 1, 0, 'C');
date_add($from, date_interval_create_from_date_string('1 days'));
$j += 6;
}
$pdf->SetXY($j + 60, 35);
$pdf->Cell(0, 14, 'Jumlah', 1, 0, 'C');
$pdf->Ln(14);
//rows
$pdf->SetFont('Arial', '', 8);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$result = $this->user_event_model->get_user_month()->result();
$total = 0;
$i = 1;
$j = 0;
foreach ($result as $r) {
$pdf->Cell(10, 7, $i++, 1, 0, 'C');
$pdf->Cell(40, 7, $r->user, 1, 0, 'L');
$from = date_create(format_ymd($date_from));
$to = date_create(format_ymd($date_to));
$j = 0;
$jum = 0;
while ($from <= $to) {
$jumlah = $this->absent_model->check_exist_month($r->user_kode, $event, date_format($from, 'Y-m-d'));
$pdf->Cell(6, 7, number_format($jumlah), 1, 0, 'C');
$jum += $jumlah;
date_add($from, date_interval_create_from_date_string('1 days'));
$j++;
}
$pdf->Cell(0, 7, number_format($jum), 1, 0, 'C');
$total += $jum;
$pdf->Ln(7);
}
$pdf->SetFillColor(240, 240, 240);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(50 + 6 * $j, 7, 'Total : ', 1, 0, 'R', true);
$pdf->Cell(0, 7, number_format($total), 1, 0, 'C', true);
$pdf->SetFont('Arial', '', 10);
$this->_footer($pdf);
$pdf->Output("Fee Moderasi HM Sampoerna", "I");
}
示例15: Round
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
}
if (isset($_GET['sonuc'])) {
$readerUTime = $_GET['readerUTime'];
$pdf = new FPDF('L', 'mm', 'A4');
$tabanhesabi = null;
AddPage($readerUTime);
$pdf->SetXY(15, 120);
$pdf->Cell(200, 5, "Genel baþarý seviyesi deðerlendirmesidir.", 0, 0, 'L');
$tabanhesabi = 0;
AddPage($readerUTime);
$pdf->SetXY(15, 120);
$pdf->Cell(200, 5, "Sadece \" {$tabanhesabi} \" baþarý seviyesinden büyük olanlarýn deðerlendirmesidir.", 0, 0, 'L');
$tabanhesabi = 50;
AddPage($readerUTime);
$pdf->SetXY(15, 120);
$pdf->Cell(200, 5, "Sadece \" {$tabanhesabi} \" baþarý seviyesinden büyük olanlarýn deðerlendirmesidir.", 0, 0, 'L');
$pdf->SetCompression(true);
$pdf->Output();
} else {
?>
<html>
<head><title>OMR</title>