本文整理汇总了PHP中FPDF::addFont方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::addFont方法的具体用法?PHP FPDF::addFont怎么用?PHP FPDF::addFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::addFont方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
//require ("fpdf/fpdf.php");
$uid = $this->session->userdata('uid');
if (!$uid) {
die("You must login to do that.");
}
$sid = $this->db->query("SELECT `store` FROM `employees` WHERE `uniq_id` = (SELECT `employee_id` FROM `warnings` WHERE `warning_id` = {$warning_id} LIMIT 0,1)");
$sid = $sid->first_row();
$verified = $this->cpm_functions->verify_access($uid, $sid->store);
if ($verified) {
$pdf = new FPDF();
$pdf->addFont("barCode39fHR", "", "bar39fh.php");
$pdf->SetRightMargin(160);
$pdf->SetTopMargin(118);
$pdf->SetAutoPageBreak(TRUE, 62);
$pdf->AddPage();
$pdf->addFont("BarCode39fHR", "", "bar39fh.php");
$bottom = $this->cpm_pdflayouts->warning_bottom($warning_id);
$information = $this->cpm_pdflayouts->warning_info($warning_id);
if ($information !== FALSE && $bottom !== FALSE) {
foreach ($information as $val) {
switch ($val["type"]) {
case "SetRightMargin":
$pdf->SetRightMargin($val[0]);
break;
case "SetTopMargin":
$pdf->SetTopMargin($val[0]);
break;
case "MultiCell":
$pdf->MultiCell($val[0], $val[1], $val[2], $val[3], $val[4]);
示例2: FPDF
<?php
define('FPDF_FONTPATH', '.');
require '../../fpdf.php';
$pdf = new FPDF();
$pdf->addFont('Calligrapher', '', 'calligra.php');
$pdf->addPage();
$pdf->setFont('Calligrapher', '', 35);
$pdf->cell(0, 10, 'Enjoy new fonts with FPDF!');
$pdf->output();
示例3: ucwords
<?php
//require ('fpdf/fpdf.php');
$term = $this->db->query("SELECT `reason_desc`,`termination_details`,`no_rehire_desc`,`employee_id`,`users`.`first_name` AS `mfname`,`users`.`last_name` AS `mlname`,`employees`.`first_name` AS `efname`,`employees`.`last_name` AS `elname`,`manager_id`,`termination_date`,`last_day_worked`,`separation`,`reason`,`rehire`,`reference_warning`,`scanned`,`status`,`terminations`.`store` FROM\n\t`terminations` JOIN `employees` ON `employee_id` = `uniq_id` JOIN `users` ON `user_id` = `manager_id` JOIN `termination_descriptions` ON `terminations`.`termination_id` = `termination_descriptions`.`termination_id` JOIN `termination_definitions` ON `reason` = `reason_code` WHERE `terminations`.`termination_id` = {$tid}");
$term = $term->first_row();
$sName = $this->db->query("SELECT `store_name` FROM `stores` WHERE `store_id` = {$term->store}")->first_row()->store_name;
$employee_name = ucwords(strtolower("{$term->efname} {$term->elname}"));
$manager_name = ucwords(strtolower("{$term->mfname} {$term->mlname}"));
$rehire = "No";
if ($term->rehire == 1) {
$rehire = "Yes";
} elseif ($term->rehire == 2) {
$rehire = "Conditionally";
}
$pdf = new FPDF();
$pdf->addFont('barCode39fHR', '', 'bar39fh.php');
$pdf->SetRightMargin(160);
$pdf->SetTopMargin(118);
$pdf->SetAutoPageBreak(TRUE, 62);
$pdf->AddPage();
$pdf->setFont('barCode39fHR', '', 24);
$pdf->Text(10, 20, "*4-{$tid}*");
$pdf->setFont('Arial', 'B', 18);
$pdf->Text(15, 35, 'Voluntary Termination');
$pdf->setFont('Arial', '', 10);
$pdf->Text(15, 40, "Employee: {$employee_name} ({$term->employee_id})");
$pdf->Text(15, 45, "Issued by: {$manager_name} ({$term->manager_id}) / {$sName}");
$pdf->Text(15, 55, "Termination Date:\t{$term->termination_date}");
$pdf->Text(15, 60, "Last Day: \t\t\t{$term->last_day_worked}");
$pdf->Text(15, 65, "Reason: {$term->reason_desc}");
$pdf->Text(100, 40, "Would you rehire? {$rehire}");