예제 #1
4
 /**
  * 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);
     }
 }
예제 #2
1
 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');
 }
예제 #3
1
파일: viewpref.php 프로젝트: rohmad-st/fpdf
 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('>>');
     }
 }
 /**
  * Constructor of the Class
  *
  * @author Jonathan Sandoval <*****@*****.**>
  * @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);
 }
예제 #5
1
 function SetTextColor($r, $g = -1, $b = -1)
 {
     if (is_string($r)) {
         $this->HTML2RGB($r, $r, $g, $b);
     }
     parent::SetTextColor($r, $g, $b);
 }
 function __construct($data = array(), $data2 = array(), $options = array())
 {
     parent::__construct();
     $this->data = $data;
     $this->data2 = $data2;
     $this->options = $options;
 }
 function __construct()
 {
     parent::__construct('P', 'pt', 'A4');
     $this->setAuthor('Galaxy Swiss');
     $this->addPage();
     $this->nl = false;
 }
예제 #8
0
 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");
 }
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();
}
예제 #10
0
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();
}
예제 #11
0
 public function __construct()
 {
     require_once APPPATH . 'fpdf\\fpdf.php';
     $pdf = new FPDF();
     $pdf->AddPage();
     $CI =& get_instance();
     $CI->fpdf = $pdf;
 }
 public function actionHelloWorld()
 {
     $pdf = new FPDF();
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Cell(40, 10, 'Hello World!');
     $pdf->Output();
 }
 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;
 }
예제 #14
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');
 }
예제 #15
0
파일: pdf.php 프로젝트: shannara/banshee
 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();
 }
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();
}
 public function __construct($id_pessoa, $mes, $ano)
 {
     $this->id_pessoa = $id_pessoa;
     $this->mes = $mes;
     $this->ano = $ano;
     parent::__construct();
 }
예제 #18
0
 /**
  * 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';
 }
 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');
 }
예제 #20
0
 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');
 }
예제 #21
0
 public function Output($name = 'mescontacts.pdf', $dest = 'I')
 {
     Header('Pragma: public');
     error_reporting(0);
     parent::Output($name, $dest);
     error_reporting($this->report);
 }
예제 #22
0
파일: toc.php 프로젝트: rohmad-st/fpdf
 function AddPage($orientation = '', $format = '')
 {
     parent::AddPage($orientation, $format);
     if ($this->_numbering) {
         $this->_numPageNum++;
     }
 }
 public function __construct($month, $year)
 {
     parent::__construct();
     $this->year = $year;
     $this->month = $month;
     $this->daysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);
 }
예제 #24
0
파일: pdf_js.php 프로젝트: rohmad-st/fpdf
 function _putcatalog()
 {
     parent::_putcatalog();
     if (!empty($this->javascript)) {
         $this->_out('/Names <</JavaScript ' . $this->n_js . ' 0 R>>');
     }
 }
예제 #25
0
파일: PDF.php 프로젝트: Lazaro-Gallo/psmn
 public function __construct($devolutiveRow, $pathToSave, $tipoPDF = null)
 {
     parent::__construct('P', 'cm', 'A4');
     $this->AliasNbPages();
     $this->SetTopMargin(4);
     $this->SetAutoPageBreak(true, 3.5);
     $this->devolutiveRow = $devolutiveRow;
     $this->pathToSave = $pathToSave;
     $this->tipoPDF = $tipoPDF;
     new Report_Devolutive_Cover($this, $tipoPDF);
     if ($tipoPDF != 4) {
         new Report_Devolutive_Introduction($this, $devolutiveRow);
     }
     if ($tipoPDF == 4) {
         new Report_Devolutive_IntroducaoVerificador($this, $devolutiveRow);
     }
     new Report_Devolutive_Enterprise($this, $devolutiveRow);
     new Report_Devolutive_President($this, $devolutiveRow);
     if ($tipoPDF == 4) {
         new Report_Devolutive_Score($this, $devolutiveRow, true);
     } else {
         new Report_Devolutive_Score($this, $devolutiveRow);
     }
     if ($tipoPDF == 4) {
         new Report_Devolutive_QuestionarioNegocio($this, $devolutiveRow);
     }
     if ($tipoPDF != 4) {
         new Report_Devolutive_Courses($this, $devolutiveRow);
         new Report_Devolutive_NextSteps($this, $devolutiveRow);
     }
 }
예제 #26
0
 function __construct()
 {
     //Llama al constructor de su clase Padre.
     //Modificar aka segun la forma del papel del reporte
     parent::__construct('P', 'mm', 'A4');
     //parent::__construct('P','mm','Letter');
 }
예제 #27
0
 function _endpage()
 {
     parent::_endpage();
     if ($this->compress) {
         $this->pages[$this->page] = gzcompress($this->pages[$this->page]);
     }
 }
예제 #28
0
 function _endpage()
 {
     if ($this->angle != 0) {
         $this->angle = 0;
         $this->_out('Q');
     }
     parent::_endpage();
 }
예제 #29
0
 function _putcatalog()
 {
     parent::_putcatalog();
     if (count($this->outlines) > 0) {
         $this->_out('/Outlines ' . $this->OutlineRoot . ' 0 R');
         $this->_out('/PageMode /UseOutlines');
     }
 }
예제 #30
-2
 public function imprimir()
 {
     $segmento = $this->uri->segment(3);
     if ($segmento) {
         $data = $this->pedidos_model->obtener_detalle_pedido($segmento);
         //$this->output->set_content_type('application/json')->set_output(json_encode($data->result()[0]));
         $pdf = new FPDF();
         $pdf->AddPage();
         $pdf->SetFont('Arial', 'B', 10);
         $pdf->Cell(30, 5, 'DETALLE DEL PEDIDO No.' . $data->result()[0]->idPedidos, 0, 1);
         $pdf->Output();
     }
 }