本文整理汇总了PHP中FPDF类的典型用法代码示例。如果您正苦于以下问题:PHP FPDF类的具体用法?PHP FPDF怎么用?PHP FPDF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FPDF类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: out
/**
* Outputs the PDF indirect object to PDF file.
*
* To pervent infinite loop on circular references, this method checks
* if current object have been already written to the file.
*
* Note that, in general, nested objects should be written to PDF file
* here too; this task is accomplished by calling _out_nested method,
* which should be overridden by children classes.
*
* @param FPDF $handler PDF file wrapper (FPDF object)
*
* @final
*
* @see FPDF::is_object_written
* @see PDFIndirectObject::_out_nested
*/
function out(&$handler)
{
if (!$handler->is_object_written($this->get_object_id())) {
$handler->offsets[$this->get_object_id()] = strlen($handler->buffer);
$handler->_out($handler->_indirect_object($this));
$this->_out_nested($handler);
}
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:25,代码来源:fpdf.php
示例2: geraEtiquetasPDF
function geraEtiquetasPDF($qrcode, $qnt, $nome)
{
$pdf = new FPDF("P", "pt", "A4");
$pdf->AddPage();
$posY = 3;
$posX = 5;
$controle = 0;
$qntElementos = 1;
for ($k = 1; $k <= 80; $k += 4) {
// linha
for ($j = 1; $j <= 5; $j++) {
// coluna
$pdf->Image("../etiquetas/{$qrcode[$controle]}.png", $posX, $posY, 114, 38);
$controle++;
$posX += 119;
if ($qntElementos == $qnt) {
$k = 80;
$j = 5;
}
$qntElementos++;
}
if ($posY < 748) {
$posY += 45;
}
$posX = 3;
}
$pdf->Output("../relatorios/etiquetas/{$nome}.pdf", "F");
}
开发者ID:RTPorfirio,项目名称:SCJ,代码行数:28,代码来源:relatorioEtiquetas.php
示例3: CetakLaporan
function CetakLaporan($prevtahun, $tahun, $gel)
{
include_once "../fpdf.php";
$lbr = 190;
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->SetTitle("Ratio Presenter PMB - {$prevtahun}/{$tahun}");
$pdf->AddPage('P');
$arrStatusAplikan = array();
$s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
$r = _query($s);
while ($w = _fetch_array($r)) {
$arrStatusAplikan[] = $w['StatusAplikanID'];
}
// Buat Table 1
BuatHeaderLap($prevtahun, $tahun, 0, $pdf);
$arrPresenterID = array();
GetArrayPresenterSortByRatio($arrPresenterID, $tahun);
TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrPresenterID, 0, $pdf);
$pdf->Ln(10);
BuatHeaderLap($prevtahun, $tahun, 1, $pdf);
$arrPresenterID = array();
GetArrayPresenterSortByReg($arrPresenterID, $tahun);
$arrStat = TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrPresenterID, 1, $pdf);
$pdf->Ln(10);
TampilkanStatistik($arrStat, $tahun, $pdf);
$pdf->Output();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:27,代码来源:pmblap.ratiopresenter.php
示例4: CetakLaporan
function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
include_once "../fpdf.php";
require_once "../phplot.php";
$lbr = 190;
$arrStatusAplikan = array();
$s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
$r = _query($s);
while ($w = _fetch_array($r)) {
$arrStatusAplikan[] = $w['StatusAplikanID'];
}
$arrGelombang = array();
getArrayGelombang($arrGelombang, $tahun);
// Buat Graph dan dimasukkan ke file dulu
$piepath = '../tmp/data_fakta_pmb_pie_graph.png';
$barpath = '../tmp/data_fakta_pmb_bar_graph.png';
BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
BuatBarGraph($barpath, $prevtahun, $tahun, $arrStatusAplikan, $urutan, $gel);
// *** Cetak ***
$pdf = new FPDF('L', 'mm', 'A4');
$pdf->SetAutoPageBreak(true, 5);
$pdf->SetTitle("DATA & FAKTA PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
$pdf->AddPage('L');
BuatHeaderLap($prevtahun, $tahun, $pdf);
TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrGelombang, $pdf);
TampilkanGraph($piepath, 30, 75, 96, 64, $pdf);
TampilkanGraph($barpath, 185, 75, 96, 64, $pdf);
TampilkanSumberInformasi(60, 145, $prevtahun, $tahun, $urutan, $gel, $pdf);
TampilkanRatioPresenter(185, 145, $arrStatusAplikan, $tahun, $urutan, $gel, $pdf);
$pdf->Output();
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:31,代码来源:pmblap.faktapmb.php
示例5: __construct
public function __construct()
{
require_once APPPATH . 'third_party/fpdf/fpdf-1.7.php';
$pdf = new FPDF();
$pdf->AddPage('P', 'A4');
$CI =& get_instance();
$CI->fpdf = $pdf;
}
开发者ID:kpeet,项目名称:Brotec_system_repo,代码行数:8,代码来源:fpdf_informe_turno.php
示例6: actionHelloWorld
public function actionHelloWorld()
{
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 10, 'Hello World!');
$pdf->Output();
}
开发者ID:kit9,项目名称:ERP_Accounting_Indonesia,代码行数:8,代码来源:SReportController.php
示例7: __construct
public function __construct()
{
require_once APPPATH . 'fpdf\\fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$CI =& get_instance();
$CI->fpdf = $pdf;
}
开发者ID:emonoel10,项目名称:System,代码行数:8,代码来源:fpdf_gen.php
示例8: drawPDF
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');
}
开发者ID:phpsmith,项目名称:IS4C,代码行数:55,代码来源:Signage4UpL.php
示例9: makePdfFile
public static function makePdfFile($filename, $content)
{
if (PdfUtils::$imported == FALSE) {
require_once 'libs/fpdf/fpdf.php';
}
PdfUtils::$imported = true;
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
//$pdf->Cell(40,10,'Hello World!');
$pdf->Write(5, $content);
$pdf->Output($filename, 'F');
}
开发者ID:alex2stf,项目名称:phpquick,代码行数:13,代码来源:PdfUtils.php
示例10: execute
public function execute()
{
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("helvetica", "B", 16);
$pdf->Cell(0, 10, "Hello world!", 0, 1);
$pdf->Ln();
$pdf->SetFont("helvetica", "", 12);
$pdf->SetFillColor(192, 192, 192);
$pdf->Cell(40, 10, "Back", 1, 0, "C", 1);
$pdf->Link(10, 30, 40, 10, "/demos");
$pdf->Output();
$this->output->disable();
}
开发者ID:shannara,项目名称:banshee,代码行数:14,代码来源:pdf.php
示例11: CetakLaporan
function CetakLaporan($prevtahun, $tahun, $gel)
{
include_once "../fpdf.php";
$lbr = 190;
$pdf = new FPDF('L', 'mm', 'A4');
$pdf->SetTitle("Ratio Presenter PMB - {$prevtahun}/{$tahun}");
$pdf->AddPage('L');
$arrGelombang = array();
getArrayGelombang($arrGelombang, $tahun);
$arrPejabatID = array();
GetArrayPejabat($arrPejabatID, $tahun);
// Buat Table 1
BuatHeaderLap($prevtahun, $tahun, $pdf);
TampilkanIsinya($prevtahun, $tahun, $arrGelombang, $arrPejabatID, $pdf);
$pdf->Output();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:16,代码来源:pmblap.rekappanitia.php
示例12: __construct
/**
* Constructor of the Class
*
* @author Jonathan Sandoval <[email protected]>
* @param integer $idUser idUser
* @param integer $idChurch idChurch
* @param boolean $full full document
*/
function __construct($idUser = 0, $idChurch = 0)
{
//Define the constructor
parent::FPDF('L', 'mm', 'Letter');
$this->church = ChurchManager::getSingleChurch('id', $idChurch);
$this->user = SessionManager::getSingleUser('id', $idUser);
}
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:15,代码来源:EnvelopeChurch.php
示例13: array
function __construct($data = array(), $data2 = array(), $options = array())
{
parent::__construct();
$this->data = $data;
$this->data2 = $data2;
$this->options = $options;
}
开发者ID:lillongcillong,项目名称:TA-LabMS-LSKK-STEI-ITB,代码行数:7,代码来源:generate_pdf.php
示例14:
function __construct()
{
parent::__construct('P', 'pt', 'A4');
$this->setAuthor('Galaxy Swiss');
$this->addPage();
$this->nl = false;
}
开发者ID:SmashingQuasar,项目名称:galaxy-swiss,代码行数:7,代码来源:class.reportpdf.inc.php
示例15: __construct
public function __construct($id_pessoa, $mes, $ano)
{
$this->id_pessoa = $id_pessoa;
$this->mes = $mes;
$this->ano = $ano;
parent::__construct();
}
开发者ID:landim32,项目名称:escola-bem-me-quer,代码行数:7,代码来源:movimento-pdf.inc.php
示例16: dirname
function __construct($orientation, $unit, $format)
{
parent::__construct($orientation, $unit, $format);
$this->temp_filename = dirname(__FILE__) . '/temppdf/' . TT();
$this->html = html_colors();
$this->timestamp = date('Y-m-d H:i:s');
}
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:7,代码来源:run_report_pdf_v2.php
示例17: __construct
/**
* Class constructor
* @param str $orientation Paper orientation
* @param str $unit The unit that is used
* @param str $format The aper size
*/
public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4')
{
parent::__construct($orientation, $unit, $format);
$this->SetCreator(utf8_decode('Websailors'));
$this->linker = sh_linker::getInstance();
$this->i18nClassName = 'sh_pdf';
}
开发者ID:briceparent,项目名称:Shopsailors,代码行数:13,代码来源:sh_pdf.cls.php
示例18: SetTextColor
function SetTextColor($r, $g = -1, $b = -1)
{
if (is_string($r)) {
$this->HTML2RGB($r, $r, $g, $b);
}
parent::SetTextColor($r, $g, $b);
}
开发者ID:rohmad-st,项目名称:fpdf,代码行数:7,代码来源:htmlcolor.php
示例19:
function _putcatalog()
{
parent::_putcatalog();
if (is_int(strpos($this->DisplayPreferences, 'FullScreen'))) {
$this->_out('/PageMode /FullScreen');
}
if ($this->DisplayPreferences) {
$this->_out('/ViewerPreferences<<');
if (is_int(strpos($this->DisplayPreferences, 'HideMenubar'))) {
$this->_out('/HideMenubar true');
}
if (is_int(strpos($this->DisplayPreferences, 'HideToolbar'))) {
$this->_out('/HideToolbar true');
}
if (is_int(strpos($this->DisplayPreferences, 'HideWindowUI'))) {
$this->_out('/HideWindowUI true');
}
if (is_int(strpos($this->DisplayPreferences, 'DisplayDocTitle'))) {
$this->_out('/DisplayDocTitle true');
}
if (is_int(strpos($this->DisplayPreferences, 'CenterWindow'))) {
$this->_out('/CenterWindow true');
}
if (is_int(strpos($this->DisplayPreferences, 'FitWindow'))) {
$this->_out('/FitWindow true');
}
$this->_out('>>');
}
}
开发者ID:rohmad-st,项目名称:fpdf,代码行数:29,代码来源:viewpref.php
示例20:
function __construct()
{
//Llama al constructor de su clase Padre.
//Modificar aka segun la forma del papel del reporte (P= VERTICAL, L=HORIZONTAL)
parent::__construct('L', 'mm', 'A4');
//parent::__construct('P','mm','Letter');
}
开发者ID:aiyellweb,项目名称:arenera,代码行数:7,代码来源:informe4.php
注:本文中的FPDF类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论