コード例 #1
0
ファイル: class_pdf.php プロジェクト: eistr2n/lansuite
 /**
  * Funktionen um PDF-Dateien zu erzeugen
  * aufrufen.
  *
  */
 function _make_page()
 {
     global $db;
     $page_data = $db->qry_first("SELECT * FROM %prefix%pdf_data WHERE template_id= %int% AND type = 'config' ORDER BY sort ASC", $this->templ_id);
     define('FPDF_FONTPATH', 'ext_inc/pdf_fonts/');
     if ($page_data['visible'] == 1) {
         $orientation = 'l';
     } else {
         $orientation = 'p';
     }
     $this->pdf = new FPDF($orientation, 'mm', $page_data['text']);
     $this->start_x = $page_data['pos_x'];
     $this->start_y = $page_data['pos_y'];
     $this->pdf->AddPage();
     if ($page_data['visible'] == 1) {
         $this->total_x = $this->pdf->fh;
         $this->total_y = $this->pdf->fw;
     } else {
         $this->total_x = $this->pdf->fw;
         $this->total_y = $this->pdf->fh;
     }
 }
コード例 #2
0
ファイル: fpdfTpl.php プロジェクト: richardfullmer/fpdf
 /**
  * See FPDF-Documentation ;-)
  *
  * AddPage is not available when you're "in" a template.
  */
 function AddPage($orientation='') {
     if ($this->intpl)
         $this->Error('Adding pages in templates isn\'t possible!');
     parent::AddPage($orientation);
 }
コード例 #3
0
ファイル: export_pdf.php プロジェクト: apmuthu/phpMyOLAP
include "../functions.php";
include "utility.php";
$cubename_sel = $_POST["cubename"];
$colonna = $_POST["ordinamento_col"];
$ordinamento = $_POST["ordinamento_type"];
$slice = $_POST["slice"];
$levels = unserialize(stripslashes($_POST['levels']));
$level_ser = implode("-", $levels);
$query = SQLgenerator2($cubename_sel, $level_ser, $slice, $colonna, $ordinamento);
$result = exec_query($query);
$ncols = mysql_num_fields($result);
define('FPDF_FONTPATH', '../fpdf/font/');
require '../fpdf/fpdf.php';
$p = new fpdf();
$p->Open();
$p->AddPage();
$p->SetTextColor(0);
$p->SetFont('Arial', '', 8);
$w = 10;
$h = 10;
$off_h = 5;
$off_w = 40;
//***************************Heading
for ($i = 0; $i < $ncols; $i++) {
    $colname = mysql_fetch_field($result);
    $nome = $colname->name;
    $tabella = $colname->table;
    if ($tabella == "") {
        $field = "{$nome}";
    } else {
        $field = "{$tabella}.{$nome}";
コード例 #4
0
ファイル: pdf.php プロジェクト: elliotjr/resumeBuilder
<?php

session_start();
// User Inputs
$name = $_POST['firstname'] . " " . $_POST['lastname'];
$email = $_POST['email'];
require "fpdf/fpdf.php";
//$pdf = new fpdf();
$pdf = new fpdf('P', 'mm', 'A4');
$pdf->SetMargins(5, 0, 0);
$pdf->AddPage();
//$pdf->cMargin = 0;
$pdf->Image('template/template.png', '', '', '210', '297', 'PNG');
$pdf->SetFont("Arial", "", "60");
$pdf->Cell(0, 40, $name, 1, 1, "L");
/*
  $pdf->SetFont("Arial", "U", "22");
  $pdf->Cell(0, 10, $name, 1, 1, "C");

  $pdf->SetFont("Arial", "I", "14");
  $pdf->Cell(0, 10, $email, 1, 1, "C");

  $pdf->SetFont("Arial", "I", "14");
  $pdf->Cell(0, 10, 'test', 1, 1, "C");*/
$pdf->Output();