Пример #1
1
 function exportarPdf($param)
 {
     /* Abre um arquivo na pasta padrão do projeto, com o nome "resultados.pdf"      */
     $destino = dirname(__FILE__) . "/../../archives/resultados.pdf";
     /* Novo arquivo PDF.                                                            */
     $pdf = new tFPDF('P', 'mm', 'A4');
     /* Nova página em formato de retrato, e define tamanho das tabelas.				*/
     $pdf->AddPage('L');
     $pdf->SetWidths(array(52, 40, 20, 23, 27, 27, 30, 30, 28));
     /* Cabeçalho do PDF, que só vai na primeira página, devidamente formatado.      */
     $pdf->SetFont('Times', 'b', 24);
     $pdf->Cell(40, 10, 'ProDown');
     $pdf->SetTextColor(128, 128, 128);
     $pdf->SetFont('Times', '', 16);
     $pdf->Cell(0, 10, utf8_decode('Sistema de Gestão de Informações'));
     /* Prepara a formatação das tabelas                                             */
     $pdf->SetTextColor(0, 0, 0);
     $pdf->ln();
     $pdf->ln();
     $pdf = $this->geraCabecalho($pdf);
     /* Coloca os resultados obtidos relacionados aos quintis.                       */
     if (is_array($param)) {
         $i = 0;
         foreach ($param as $teste) {
             $pdf->Row(array(utf8_decode($teste['nome']), utf8_decode($teste['turma']), $teste['dt_ocorrencia'], $teste['abdominal'], $teste['agilidade'], $teste['flexibilidade'], $teste['forca_explosiva_inferir'], $teste['forca_explosiva_superior'], $teste['velocidade']));
         }
     }
     /* Quebra de linha com inserção da data e hora em que o PDF foi gerado         */
     $pdf->ln();
     $pdf->Cell(0, 10, utf8_decode(date("d/m/Y - H:i:s")));
     /* Retorna o PDF pra controller, e ela que se vire.                            */
     $pdf->output($destino);
     return ARQUIVO . "resultados.pdf";
 }
Пример #2
0
 /**
  * Constructs a single line
  *
  * @param \tFPDF $pdf
  * @param $text
  * @param int|null $margin
  * @param $fontSize
  * @param bool $useBoldFont
  * @internal param string $fontWeight
  * @return $this
  */
 private function makeLine(&$pdf, $text, $fontSize, $margin = null, $useBoldFont = false)
 {
     $fontFamily = $useBoldFont ? 'arialbd' : 'arial';
     $pdf->SetFont($fontFamily, '', $fontSize);
     $pdf->Ln($margin);
     $pdf->Cell(0, 0, $text, 0, 1, 'C');
     return $this;
 }
Пример #3
0
	function __construct()
	{
		parent::__construct();
		$this->column = false;
		$this->row = false;
		$test = preg_match("~^test\\.~i",$_SERVER["HTTP_HOST"]);
		$this->fname = DIR_UPLOADS.($test?"test_":"")."bg_".$_SESSION["c_id"].".jpg";
	}
Пример #4
0
 public function Output($name = '', $dest = '')
 {
     // invalid symbols: "%*:<>?| and \x00-\x1F\x7F and \x80-\xFF
     $name = preg_replace('/[\\x00-\\x1F\\x22\\x25\\x2A\\x3A\\x3C\\x3E\\x3F\\x7C\\x7F-\\xFF]+/', '', $name);
     $name = str_replace('\\', '/', $name);
     if (in_array($dest, array('I', 'D'))) {
         $name = basename($name);
     }
     return parent::Output($name, $dest);
 }
Пример #5
0
 public function AddPage($orientation = '', $size = '')
 {
     parent::AddPage($orientation, $size);
     $this->setSourceFile('dash-template-no-icons.pdf');
     $template = $this->ImportPage(1);
     $this->useTemplate($template);
     if (isset($_COOKIE["grid"]) && $_COOKIE["grid"] == 1) {
         $this->drawGrid();
     }
     $this->Header();
 }
Пример #6
0
 function __construct($orientation = 'P', $unit = 'mm', $format = 'A4')
 {
     @setlocale(LC_NUMERIC, 'C');
     parent::__construct($orientation, $unit, $format);
     //ajout de la police DejaVu
     $this->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $this->AddFont('DejaVu', 'B', 'DejaVuSansCondensed-Bold.ttf', true);
     $this->AddFont('DejaVu', 'I', 'DejaVuSansCondensed-Oblique.ttf', true);
     $this->AddFont('DejaVu', 'BI', 'DejaVuSansCondensed-BoldOblique.ttf', true);
     $this->setFont('DejaVu');
 }
 /**
 MakeChart:
 @mod: reference to module object
 @bdata: reference to array of bracket-table data
 @chartfile: path/name of file to be created or replaced
 @stylefile optional name of .css file to use instead of logged data
 @titles optional, mode enum for type of titles to include in boxes:
  0 for(printer-ready) no labels in unplayed matches
  	 1 for normal labels in all boxes (default)
  2 for including match numbers in 'plan' mode
 Returns: TRUE on success, or lang-key for error message if: bad no. of teams, css parsing failed
 */
 public function MakeChart(&$mod, &$bdata, $chartfile, $stylefile = FALSE, $titles = 1)
 {
     $db = cmsms()->GetDb();
     $sql = 'SELECT COUNT(1) AS count FROM ' . cms_db_prefix() . 'module_tmt_teams WHERE bracket_id=? AND flags!=2';
     $teamscount = (int) $db->GetOne($sql, array($bdata['bracket_id']));
     if ($teamscount == 0) {
         return 'info_nomatch';
     }
     //if no team, then no match
     list($minteams, $maxteams) = $mod->GetLimits($bdata['type']);
     if ($teamscount > $maxteams || $teamscount < $minteams) {
         return 'err_value';
     }
     $css = new tmtStyler();
     if (!$stylefile && $bdata['chartcss']) {
         $stylefile = $bdata['chartcss'];
     }
     if ($stylefile) {
         $config = cmsms()->GetConfig();
         $csspath = cms_join_path($config['uploads_path'], $mod->GetPreference('uploads_dir'), $stylefile);
         if (file_exists($csspath)) {
             if (!$css->Parse($csspath)) {
                 return 'err_styles';
             }
         }
     }
     $this->mod = $mod;
     $this->layout = array();
     $this->ldata = array();
     $this->dashes = array(3, 3);
     $this->dots = array(0.2, 4);
     //high-use variables sent downstream in array,for extraction there
     $params = array();
     $params['teamscount'] = $teamscount;
     //inter-box gaps
     $lw = $css->pxsize($css->GetWithDefault('.line', 'width', '2px'));
     //line width
     $bhm = $css->pxsize($css->GetSide('.box', 'margin', 'right'));
     //horz margin
     $gw = $css->pxsize($css->GetWithDefault('.chart', 'gapwidth', '20px'));
     //gap width
     $gw = max($lw + 4, $bhm * 2 + $gw);
     $params['gw'] = $gw;
     //includes box margins, if any
     $bvm = $css->pxsize($css->GetSide('.box', 'margin', 'top'));
     //vert margin
     $params['gh'] = max(2, $bvm * 2);
     //includes box margins, if any
     //chart margins
     $tp = $css->pxsize($css->GetSide('.chart', 'padding', 'top'));
     if ($tp < 2) {
         $tp = 2;
     }
     if ($titles == 0 && $tp < 40) {
         $tp = 40;
     }
     $th = $css->pxsize($css->GetWithDefault('.chart', 'font-size', '12pt'));
     //space for title string
     $params['tm'] = $tp + $th;
     //top
     $p = $css->pxsize($css->GetSide('.chart', 'padding', 'right'));
     $rm = $bhm + $p >= 5 ? $p : 5;
     if ($titles == 0 && $rm < 40) {
         $rm = 40;
     }
     $params['rm'] = $rm;
     //right
     $p = $css->pxsize($css->GetSide('.chart', 'padding', 'bottom'));
     $bm = $bvm + $p >= 5 ? $p : 5;
     if ($titles == 0 && $bm < 40) {
         $bm = 40;
     }
     $params['bm'] = $bm;
     //bottom
     $p = $css->pxsize($css->GetSide('.chart', 'padding', 'left'));
     $lm = $bhm + $p >= 5 ? $p : 5;
     if ($titles == 0 && $lm < 40) {
         $lm = 40;
     }
     $params['lm'] = $lm;
     //left
     //box parameters
     $bh = $css->pxsize($css->GetWithDefault('.box', 'height', '40px'));
     $params['bh'] = $bh;
     //content-height
     $params['bw'] = $css->pxsize($css->GetWithDefault('.box', 'width', '100px'));
     //content-width
     $bp = $css->pxsize($css->GetWithDefault('.box', 'padding', '0'));
     $params['bp'] = $bp;
     //all-sides' padding
     $blw = $css->pxsize($css->GetWithDefault('.box', 'border-width', '1px'));
     $params['blw'] = $blw;
     //all sides' border-width
     $params['bhm'] = $bhm;
     //l/r margin
     $params['bvm'] = $bvm;
     //t/b margin
     $this->Layout($params, $db, $bdata['bracket_id']);
     //setup boxes' size, position and chart size
     $this->Boxes($bdata, $db, $titles);
     //setup boxes' text and style
     if ($titles == 0) {
         //print-chart min size
         $min = $css->pxsize($css->GetWithDefault('.chart', 'minwidth', '770pt'));
         if ($this->ldata['width'] < $min) {
             $this->ldata['width'] = $min;
         }
         $min = $css->pxsize($css->GetWithDefault('.chart', 'minheight', '526pt'));
         if ($this->ldata['height'] < $min) {
             $this->ldata['height'] = $min;
         }
     }
     $cw = $this->ldata['width'];
     $ch = $this->ldata['height'];
     //check for custom .ttf files
     $config = cmsms()->GetConfig();
     $rel = $mod->GetPreference('uploads_dir');
     $custom = cms_join_path($config['uploads_path'], $rel);
     if (is_dir($custom)) {
         $pat = cms_join_path($custom, '*.ttf');
         //tPDF recognises only lower-case filenames
         if (glob($pat, GLOB_NOSORT)) {
             define('_SYSTEM_TTFONTS', $ttfpath);
         }
     }
     $enc = $mod->GetPreference('export_encoding', 'UTF-8');
     $utf = strcasecmp($enc, 'UTF-8') == 0;
     $pdf = new tFPDF($cw > $ch ? 'L' : 'P', 'px', array($cw, $ch), $utf);
     $pdf->SetAutoPageBreak(FALSE);
     $pdf->AddPage();
     if ($titles > 0) {
         $back = $css->hex2rgb($css->GetWithDefault('.chart', 'background-color', FALSE));
         //TODO support image-background
         if ($back) {
             $pdf->SetFillColor($back[0], $back[1], $back[2]);
             $pdf->Rect(0, 0, $cw, $ch, 'F');
             //no chart border
         }
     }
     //display title
     $class = '.chart';
     $title = $bdata['name'] ? $bdata['name'] : $mod->MissingName();
     $ft = $css->GetWithDefault($class, 'font-family', 'sans');
     $style = $css->GetWithDefault($class, 'font-weight', 'normal');
     $attr = $style != 'bold' ? '' : 'b';
     $style = $css->GetWithDefault($class, 'font-style', 'normal');
     if (strpos($style, 'italic') !== FALSE || strpos($style, 'oblique') !== FALSE) {
         $attr .= 'i';
     }
     $style = $css->GetWithDefault($class, 'text-decoration', 'none');
     if (strpos($style, 'underline') !== FALSE) {
         $attr .= 'u';
     }
     $pdf->AddFont($ft, $attr);
     $pdf->SetFont($ft, $attr, (int) ($th * 72 / 96 - 0.01) + 1);
     //tFPDF needs font size as pts
     if ($titles > 0) {
         $c = $css->hex2rgb($css->GetWithDefault($class, 'color', '#000'));
         $pdf->SetTextColor($c[0], $c[1], $c[2]);
     }
     $pdf->SetXY($lm, $tp);
     $pdf->Cell($this->ldata['width'] - $lm - $rm, $th, $title, 0, 0, 'C');
     $params = array();
     $params['pdf'] =& $pdf;
     $params['gw'] = $gw;
     $params['lw'] = $lw;
     if ($titles > 0) {
         $lc = $css->hex2rgb($css->GetWithDefault('.line', 'color', '#000'));
     } else {
         $lc = FALSE;
     }
     $params['lc'] = $lc;
     $params['ls'] = $css->GetWithDefault('.line', 'style', 'solid');
     $params['blw'] = $blw;
     $params['bp'] = $bp;
     $params['boxstyles'] = array();
     foreach (array('deflt' => '', 'nonf' => ':nonfirm', 'firm' => ':firm', 'done' => ':played', 'final' => ':winner') as $type => $suffix) {
         $class = '.box' . $suffix;
         $ft = $css->GetWithDefault($class, 'font-family', 'sans');
         $style = $css->GetWithDefault($class, 'font-weight', 'normal');
         $attr = $style != 'bold' ? '' : 'b';
         $style = $css->GetWithDefault($class, 'font-style', 'normal');
         if (strpos($style, 'italic') !== FALSE || strpos($style, 'oblique') !== FALSE) {
             $attr .= 'i';
         }
         $style = $css->GetWithDefault($class, 'text-decoration', 'none');
         if (strpos($style, 'underline') !== FALSE) {
             $attr .= 'u';
         }
         $pdf->AddFont($ft, $attr);
         $size = $css->pxsize($css->GetWithDefault($class, 'font-size', $bh / 4));
         if ($titles > 0) {
             $bc = $css->hex2rgb($css->GetWithDefault($class, 'border-color', $lc));
             $fc = $css->hex2rgb($css->GetWithDefault($class, 'background-color', $back));
             //TODO support image/url
             $tc = $css->hex2rgb($css->GetWithDefault($class, 'color', $lc));
         } else {
             $bc = FALSE;
             $fc = FALSE;
             $tc = FALSE;
         }
         $params['boxstyles'][$type] = array('bw' => $css->pxsize($css->GetWithDefault($class, 'border-width', $lw)), 'bc' => $bc, 'bs' => $css->GetWithDefault($class, 'border-style', 'solid'), 'fill' => $fc, 'font' => $ft, 'color' => $tc, 'size' => (int) ($size * 72 / 96 - 0.01) + 1, 'attr' => $attr);
     }
     $this->Draw($params);
     if ($bdata['name']) {
         $pdf->SetTitle($bdata['name'], TRUE);
     }
     $pdf->Output($chartfile, 'F');
     return TRUE;
 }
Пример #8
0
                         $pw = decrypt($reccord['pw'], mysql_real_escape_string(stripslashes($_POST['salt_key'])));
                     } else {
                         $pw = decrypt($reccord['pw']);
                     }
                     $full_listing[$reccord['id']] = array('id' => $reccord['id'], 'label' => $reccord['label'], 'pw' => substr(addslashes($pw), strlen($reccord['rand_key'])), 'login' => $reccord['login']);
                 }
             }
             $id_managed = $reccord['id'];
         }
     }
 }
 //Build PDF
 if (!empty($full_listing)) {
     //Prepare the PDF file
     include '../includes/libraries/tfpdf/tfpdf.php';
     $pdf = new tFPDF();
     //Add font for utf-8
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('DejaVu', '', 16);
     $pdf->Cell(0, 10, $txt['print_out_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 12);
     $pdf->Cell(0, 10, $txt['pdf_del_date'] . " " . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"))) . ' ' . $txt['by'] . ' ' . $_SESSION['login'], 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(65, 6, $txt['label'], 1, 0, "C", 1);
     $pdf->cell(55, 6, $txt['login'], 1, 0, "C", 1);
     $pdf->cell(70, 6, $txt['pw'], 1, 1, "C", 1);
     $pdf->SetFont('DejaVu', '', 9);
     foreach ($full_listing as $item) {
Пример #9
0
 public function create_pdf_oferte($title, $desc, $products)
 {
     $CI =& get_instance();
     $CI->load->helper('tfpdf');
     $CI->load->helper('data_helper');
     $CI->load->model('mysql');
     $CI->load->library('session');
     $pdf = new tFPDF('P', 'mm', 'A4');
     $pdf->AddPage();
     //titlu oferta
     // Add a Unicode font (uses UTF-8)
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $pdf->SetFont('DejaVu', '', 14);
     //$pdf->AddFont('TimesNewRomanPSMT','','times.php');
     //$pdf->SetFont('TimesNewRomanPSMT','');
     // $pdf->AddFont('TimesNewRomanPSMT','','times.php');
     // $pdf->SetFont('TimesNewRomanPSMT','',12);
     // $pdf->SetFont('Arial','B',16);
     $pdf->Cell(0, 0, $title);
     $pdf->Ln(5);
     // rind nou
     //descrire oferta
     $pdf->MultiCell(0, 5, $desc);
     $pdf->Ln(5);
     $i = 0;
     foreach ($products as $item) {
         $i++;
         //info suprafata
         $pdf->SetFont('Arial', 'B', 11);
         $pdf->Cell(0, 0, 'Info Suprafata publicitara Nr' . $i);
         $pdf->Ln(8);
         // rind nou
         //adresa link
         $pdf->SetTextColor(0, 136, 204);
         $pdf->SetFont('Arial', 'B', 11);
         $pdf->Cell(0, 0, $item['adresa'], '', '', '', false, 'http://www.marplo.net/jocuri');
         $pdf->Ln(5);
         // rind nou
         //numar de inventar
         $pdf->SetFont('Arial', '', 10);
         $pdf->SetTextColor(0, 0, 0);
         $pdf->Cell(0, 0, 'Numarul de inventar: #' . $item['inv']);
         $pdf->Ln(8);
         // rind nou
         //pret
         $pdf->SetFont('Arial', 'B', 12);
         $pdf->Cell(0, 0, 'Pret: ' . $item['price'] . ' euro');
         $pdf->Ln(10);
         // rind nou
         //dimensiunea
         $pdf->SetFont('Arial', 'B', 8);
         $pdf->Cell(0, 0, 'Dimensiuni: ' . $item['format']);
         $pdf->Ln(5);
         // rind nou
         //foto
         if ($item['image'] and file_exists($_SERVER['DOCUMENT_ROOT'] . $item['image'])) {
             $pdf->Cell(0, 0, 'Foto');
             $pdf->Ln(2);
             // rind nou
             $pdf->Image('.' . $item['image']);
             $pdf->Ln(20);
             // rind nou
         } else {
             $pdf->Ln(20);
         }
         // rind nou
     }
     //footer
     $pdf->SetFont('Arial', 'B', 6);
     $pdf->Cell(0, 0, 'Trendseter Copyright 2011', '', '', 'C');
     $pdf->Ln(5);
     // rind nou
     // Tilte pdf
     $page_title = 'Oferta_' . date('d_m_Y_H:i:s');
     $pdf->output('./uploads/offerts/' . $page_title . '.pdf', 'F');
     $CI->mysql->insert('offerts_pdf', array('uid' => $CI->session->userdata('uid'), 'pdf' => './uploads/offerts/' . $page_title . '.pdf'));
     return './uploads/offerts/' . $page_title . '.pdf';
 }
Пример #10
0
 public function Output()
 {
     $file = "temporal/" . basename(tempnam("temporal/", 'tmp'));
     rename($file, $file . '.pdf');
     $file .= '.pdf';
     parent::Output($file, 'F');
     chmod($file, 0555);
     //header('Location: temporal/'.$file);
     return $file;
 }
Пример #11
0
 function Close()
 {
     parent::Close();
     // clean up tmp files
     foreach ($this->tmpFiles as $tmp) {
         @unlink($tmp);
     }
 }
Пример #12
0
             }
         }
         $id_managed = $reccord['id'];
     }
     echo '[{"text" : "' . $texte . '</table>" , "pdf" : "' . $text_pdf . '"}]';
     break;
     #----------------------------------
     #CASE generating the pdf of items to rennew
 #----------------------------------
 #CASE generating the pdf of items to rennew
 case "generate_renewal_pdf":
     require_once "NestedTree.class.php";
     $tree = new NestedTree($pre . 'nested_tree', 'id', 'parent_id', 'title');
     //Prepare the PDF file
     include '../includes/libraries/tfpdf/tfpdf.php';
     $pdf = new tFPDF();
     //Add font for utf-8
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('DejaVu', '', 16);
     $pdf->Cell(0, 10, $txt['renewal_needed_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 12);
     $pdf->Cell(0, 10, $txt['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"))), 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(70, 6, $txt['label'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['creation_date'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['expiration_date'], 1, 0, "C", 1);
     $pdf->cell(45, 6, $txt['group'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $txt['author'], 1, 1, "C", 1);
Пример #13
0
<?php

// Optionally define the filesystem path to your system fonts
// otherwise tFPDF will use [path to tFPDF]/font/unifont/ directory
// define("_SYSTEM_TTFONTS", "C:/Windows/Fonts/");
require 'tfpdf.php';
$pdf = new tFPDF();
$pdf->AddPage();
// Add a Unicode font (uses UTF-8)
$pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
$pdf->SetFont('DejaVu', '', 14);
// Load a UTF-8 string from a file and print it
$txt = file_get_contents('HelloWorld.txt');
$pdf->Write(8, $txt);
// Select a standard font (uses windows-1252)
$pdf->SetFont('Arial', '', 14);
$pdf->Ln(10);
$pdf->Write(5, 'The file size of this PDF is only 12 KB.');
$pdf->Output();
Пример #14
0
<?php

// Définition facultative du répertoire des polices systèmes
// Sinon tFPDF utilise le répertoire [chemin vers tFPDF]/font/unifont/
// define("_SYSTEM_TTFONTS", "C:/Windows/Fonts/");
require 'tfpdf.php';
$pdf = new tFPDF();
$pdf->AddPage();
// Ajoute une police Unicode (utilise UTF-8)
$pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
$pdf->SetFont('DejaVu', '', 14);
// Charge une chaîne UTF-8 à partir d'un fichier
$txt = file_get_contents('HelloWorld.txt');
$pdf->Write(8, $txt);
// Sélectionne une police standard (utilise windows-1252)
$pdf->SetFont('Arial', '', 14);
$pdf->Ln(10);
$pdf->Write(5, "La taille de ce PDF n'est que de 12 ko.");
$pdf->Output();
 /**
  * Generate and save or stream a PDF file
  *
  * @access public
  * @since 1.0.0
  * @param string $path optional absolute path to the directory, if
  *        not supplied the PDF will be streamed as a downloadable file (used
  *        for admin previewing of the PDF)
  *
  * @return mixed nothing if a $path is supplied, otherwise a PDF download
  */
 public function generate_pdf($path = '')
 {
     global $current_user, $post;
     // include the pdf library
     $root_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
     require_once $root_dir . '/../lib/tfpdf/tfpdf.php';
     $image = wp_get_attachment_metadata($this->get_image_id());
     // determine orientation: landscape or portrait
     if ($image['width'] > $image['height']) {
         $orientation = 'L';
     } else {
         $orientation = "P";
     }
     // End If Statement
     // Create the pdf
     // TODO: we're assuming a standard DPI here of where 1 point = 1/72 inch = 1 pixel
     // When writing text to a Cell, the text is vertically-aligned in the middle
     $fpdf = new tFPDF($orientation, 'pt', array($image['width'], $image['height']));
     $fpdf->AddPage();
     $fpdf->SetAutoPageBreak(false);
     // Add custom font
     $custom_font = apply_filters('sensei_certificates_custom_font', false);
     if ($custom_font) {
         if (isset($custom_font['family']) && isset($custom_font['file'])) {
             $fpdf->AddFont($custom_font['family'], '', $custom_font['file'], true);
         }
     } else {
         // Add multibyte font
         $fpdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     }
     // set the certificate image
     $upload_dir = wp_upload_dir();
     $fpdf->Image($upload_dir['basedir'] . '/' . $image['file'], 0, 0, $image['width'], $image['height']);
     // this is useful for displaying the text cell borders when debugging the PDF layout,
     //  though keep in mind that we translate the box position to align the text to bottom
     //  edge of what the user selected, so if you want to see the originally selected box,
     //  display that prior to the translation
     $show_border = 0;
     // Get Student Data
     get_currentuserinfo();
     $fname = $current_user->first_name;
     $lname = $current_user->last_name;
     $student_name = $current_user->display_name;
     if ('' != $fname && '' != $lname) {
         $student_name = $fname . ' ' . $lname;
     }
     // Get Course Data
     $course = array();
     $course['post_title'] = __('Course Title', 'sensei-certificates');
     $course_end_date = date('Y-m-d');
     // Get the certificate template
     $certificate_template_custom_fields = get_post_custom($post->ID);
     // Define the data we're going to load: Key => Default value
     $load_data = array('certificate_font_style' => array(), 'certificate_font_color' => array(), 'certificate_font_size' => array(), 'certificate_font_family' => array(), 'image_ids' => array(), 'certificate_template_fields' => array());
     // Load the data from the custom fields
     foreach ($load_data as $key => $default) {
         // set value from db (unserialized if needed) or use default
         $this->{$key} = isset($certificate_template_custom_fields['_' . $key][0]) && '' !== $certificate_template_custom_fields['_' . $key][0] ? is_array($default) ? maybe_unserialize($certificate_template_custom_fields['_' . $key][0]) : $certificate_template_custom_fields['_' . $key][0] : $default;
     }
     // End For Loop
     // Set default fonts
     setlocale(LC_TIME, get_locale());
     if (false !== strpos(get_locale(), 'en')) {
         $date_format = apply_filters('sensei_certificate_date_format', 'jS F Y');
         $date = date($date_format, strtotime($course_end_date));
     } else {
         $date_format = apply_filters('sensei_certificate_date_format', '%Y %B %e');
         $date = strftime($date_format, strtotime($course_end_date));
     }
     $certificate_heading = __('Certificate of Completion', 'sensei-certificates');
     // Certificate of Completion
     if (isset($this->certificate_template_fields['certificate_heading']['text']) && '' != $this->certificate_template_fields['certificate_heading']['text']) {
         $certificate_heading = $this->certificate_template_fields['certificate_heading']['text'];
         $certificate_heading = str_replace(array('{{learner}}', '{{course_title}}', '{{completion_date}}', '{{course_place}}'), array($student_name, $course['post_title'], $date, get_bloginfo('name')), $certificate_heading);
     }
     // End If Statement
     $certificate_message = __('This is to certify that', 'sensei-certificates') . " \r\n\r\n" . $student_name . " \r\n\r\n" . __('has completed the course', 'sensei-certificates');
     // This is to certify that {{learner}} has completed the course
     if (isset($this->certificate_template_fields['certificate_message']['text']) && '' != $this->certificate_template_fields['certificate_message']['text']) {
         $certificate_message = $this->certificate_template_fields['certificate_message']['text'];
         $certificate_message = str_replace(array('{{learner}}', '{{course_title}}', '{{completion_date}}', '{{course_place}}'), array($student_name, $course['post_title'], $date, get_bloginfo('name')), $certificate_message);
     }
     // End If Statement
     $certificate_course = $course['post_title'];
     // {{course_title}}
     if (isset($this->certificate_template_fields['certificate_course']['text']) && '' != $this->certificate_template_fields['certificate_course']['text']) {
         $certificate_course = $this->certificate_template_fields['certificate_course']['text'];
         $certificate_course = str_replace(array('{{learner}}', '{{course_title}}', '{{completion_date}}', '{{course_place}}'), array($student_name, $course['post_title'], $date, get_bloginfo('name')), $certificate_course);
     }
     // End If Statement
     $certificate_completion = $date;
     // {{completion_date}}
     if (isset($this->certificate_template_fields['certificate_completion']['text']) && '' != $this->certificate_template_fields['certificate_completion']['text']) {
         $certificate_completion = $this->certificate_template_fields['certificate_completion']['text'];
         $certificate_completion = str_replace(array('{{learner}}', '{{course_title}}', '{{completion_date}}', '{{course_place}}'), array($student_name, $course['post_title'], $date, get_bloginfo('name')), $certificate_completion);
     }
     // End If Statement
     $certificate_place = sprintf(__('At %s', 'sensei-certificates'), get_bloginfo('name'));
     // At {{course_place}}
     if (isset($this->certificate_template_fields['certificate_place']['text']) && '' != $this->certificate_template_fields['certificate_place']['text']) {
         $certificate_place = $this->certificate_template_fields['certificate_place']['text'];
         $certificate_place = str_replace(array('{{learner}}', '{{course_title}}', '{{completion_date}}', '{{course_place}}'), array($student_name, $course['post_title'], $date, get_bloginfo('name')), $certificate_place);
     }
     // End If Statement
     $output_fields = array('certificate_heading' => 'text_field', 'certificate_message' => 'textarea_field', 'certificate_course' => 'text_field', 'certificate_completion' => 'text_field', 'certificate_place' => 'text_field');
     foreach ($output_fields as $meta_key => $function_name) {
         // Check if the field has a set position
         if (isset($this->certificate_template_fields[$meta_key]['position']['x1'])) {
             $font_settings = $this->get_certificate_font_settings($meta_key);
             call_user_func_array(array($this, $function_name), array($fpdf, ${$meta_key}, $show_border, array($this->certificate_template_fields[$meta_key]['position']['x1'], $this->certificate_template_fields[$meta_key]['position']['y1'], $this->certificate_template_fields[$meta_key]['position']['width'], $this->certificate_template_fields[$meta_key]['position']['height']), $font_settings));
         }
         // End If Statement
     }
     // End For Loop
     // download file
     $fpdf->Output('certificate-preview-' . $post->ID . '.pdf', 'I');
 }
Пример #16
0
	}
}

function romance($st)
{
	return preg_replace("/\(.*\)/","",$st);
}

IF(!isset($CERTIFICATES))
{	
	if (substr($_SERVER["REQUEST_URI"],0,6)=="/beta/")
		require_once "../".DIR_FPDF;
	else
		require_once DIR_FPDF;
	
	$pdf = new tFPDF();
	$pdf->SetAutoPageBreak(true,10);
	$pdf->AddFont('DejaVu','','DejaVuSans.ttf',true);
	$pdf->AddFont('DejaVu','B','DejaVuSans-Bold.ttf',true);
	
	$pdf->AddPage();
	$pdf->SetFont('DejaVu','B',16);
	$pdf->Write(5,$_SESSION["c_name"]);
	$pdf->Ln();
	$pdf->SetFont('','',14);
	$pdf->Write(5,"Podiums");
	$pdf->Line(11,21,286.5,21);
	$pdf->Ln(10);
}

$events = strict_query("SELECT $eventstable.*, name, timetype FROM $eventstable JOIN categories ON categories.id=$eventstable.id ORDER BY $eventstable.id");
Пример #17
0
 /**
  * Private Method
  */
 function _out($s)
 {
     if ($this->state == 2 && $this->_intpl) {
         $this->tpls[$this->tpl]['buffer'] .= $s . "\n";
     } else {
         parent::_out($s);
     }
 }
Пример #18
0
 /**
  * 
  * Static ! not sure why!?
  * 
  */
 static function construct($svg, $data = array())
 {
     if (is_object($data)) {
         $data = (array) $data;
     }
     $t = new XML_SvgToPDF();
     $t->language = @$data['language'];
     /*
     $x = new XML_Tree_Morph( 
                 $svg,
                 array(
                    'debug' => 0,
                    'filter' => array(
                        'svg'    => array(&$t, 'buildObject'),
                        'image'    => array(&$t, 'buildObject'),
                        'text'    => array(&$t, 'buildObject'),
                        'tspan'   => array(&$t, 'buildObject'),
                        'rect'   => array(&$t, 'buildObject'),
                        'g'   =>  array(&$t, 'buildObject'),
                        'path'   =>  array(&$t, 'buildObject'),
                        'sodipodi:namedview' =>  array(&$t, 'buildNull'),
                        'defs' =>  array(&$t, 'buildNull'),
                     )
                 )
              );
     
     $tree = $x->getTreeFromFile();
           
     $tree = $t->buildobject($tree);
     */
     //echo "<PRE>";
     $tree = $t->parseSvg($svg);
     //echo "<PRE>";print_r($tree);exit;
     //echo "<PRE>";print_r($tree);exit;
     $orientation = preg_replace('/[^0-9.]+/', '', $tree->width) * 1 > preg_replace('/[^0-9.]+/', '', $tree->height) * 1 ? 'L' : 'P';
     //var_dump($orientation);exit;
     $GLOBALS['_XML_SVGTOPDF']['options']['file'] = $svg;
     if (@$data['language'] == 'big5') {
         //die("trying chinese");
         require_once 'Fpdf/tFPDF.php';
         $pdf = new tFPDF($orientation, 'mm', 'A4');
         // we originally used ARIALUNI.ttf'
         $font = '/usr/share/fonts/truetype/msttcorefonts/Arial.ttf';
         if (!file_exists('/usr/share/fonts/truetype/msttcorefonts/Arial.ttf')) {
             die("install msttcorefonts package");
         }
         //$pdf->AddFont('ARIALUNI','',$font,true);
         $pdf->AddFont('ARIALUNI', '', '/usr/share/fonts/truetype/msttcorefonts/Arial.ttf', true);
         $pdf->AddFont('ARIALUNI', 'B', '/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf', true);
         //            $pdf->SetFont('ARIALUNI','',14);
         //            require_once 'Fpdf/Chinese-unicode.php';
         //
         //            $pdf=new PDF_Unicode($orientation ,'mm','A4');
         ////            $pdf->AddGBFont();
         ////            $pdf->AddBig5Font();
         //            $pdf->AddUniCNSFont('Uni');
         //$pdf->AddUniCNSFont('Uni');
         //AddUniCNShwFont
         $pdf->open();
     } else {
         $pdf = new tFPDF($orientation, 'mm', 'A4');
         $pdf->open();
     }
     $pdf->setAutoPageBreak(false);
     $pdf->AliasNbPages();
     // convert data to array.
     if (is_object($data)) {
         $data = (array) $data;
     }
     // assoc. array of key => no of fields per page.
     $perPage = $tree->calcPerPage();
     //list($var,$perpage) = $tree->calcPerPage();
     //if (empty($data) || !@$var || !@count($data[$var])) {
     //         print_r("<PRE>");
     //          print_r($data['transactions'][0]);
     //          $data['transactions'][0]->desc = 'abcdefghijklmnopqrstuvwxyz Z';
     //           print_r($data['transactions'][0]->desc);
     // no dynamic blocks:
     if (!$perPage || empty($data)) {
         $pdf->addPage();
         $tree->writePDF($pdf, $data);
         $t->debug($tree);
         return $pdf;
     }
     // build blocks of data for each page.
     $haveData = true;
     $page = 0;
     //    $originalData = $data;
     //$alldata = $data[$var];
     //  while (count($alldata))  {
     //print_r($perPage);exit;
     while (true == $haveData) {
         $page_data = $data;
         $haveData = false;
         //print_r($perPage);
         // replaces the properties that have 'page data'
         foreach ($perPage as $k => $v) {
             if (empty($data[$k])) {
                 $page_data[$k] = array();
                 continue;
             }
             $haveData = true;
             $page_data[$k] = self::fetchRows($data, $k, $v);
             //$page_data[$k] = array_splice ( $data[$k], 0,$v);
         }
         if ($page && !$haveData) {
             break;
         }
         $page++;
         $t->debug("<B>PAGE {$page}<B>");
         $pdf->addPage();
         $tree->writePDF($pdf, $page_data);
         //$tree->writePDF($pdf,$data);
     }
     $t->debug($tree);
     return $pdf;
 }
Пример #19
0
<?php

require 'tfpdf.php';
require "../librairies/user.php";
$recupform = new QUESTION();
$pdf = new tFPDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
$score = 0;
$scoreMax = 0;
$scoreTempQuestion = 0;
$classScore = 1;
//recuperation id max dans la bdd questions
$stmt = $recupform->runQuery("SELECT id FROM questions ORDER BY id DESC LIMIT 1");
$stmt->execute();
$liste = $stmt->fetch();
$idmax = $liste[0];
extract($_POST);
$answerClasse = $_POST["secteur"];
$stmt = $recupform->runQuery("SELECT question FROM questions WHERE id = 1");
$stmt->execute();
$liste = $stmt->fetch();
$question = $liste[0];
$stmt2 = $recupform->runQuery("SELECT reponse FROM answers WHERE id={$answerClasse}");
$stmt2->execute();
$liste2 = $stmt2->fetch();
$reponse = $liste2[0];
$pdf->SetPoliceQuestion();
$pdf->Write(5, $question);
$pdf->Ln();
Пример #20
0
 /**
  * Set fill color
  *
  * @param mixed $r     Could be string or int. If string, it must be HTML code
  * @param int   $g     Green value (optional)
  * @param int   $b     Blue value (optional)
  * @param int   $black Black value (optional)
  *
  * @return void
  */
 public function setFillColor($r, $g = -1, $b = -1, $black = -1)
 {
     if (is_string($r)) {
         $this->html2rgb($r, $r, $g, $b);
     }
     parent::SetFillColor($r, $g, $b);
 }
Пример #21
0
 function _puttrailer()
 {
     parent::_puttrailer();
     if ($this->encrypted) {
         $this->_out('/Encrypt ' . $this->enc_obj_id . ' 0 R');
         $this->_out('/ID [()()]');
     }
 }
Пример #22
0
             }
         }
         $idManaged = $reccord['id'];
     }
     echo '[{"text" : "' . $texte . '</table>" , "pdf" : "' . $textPdf . '"}]';
     break;
     /**
      * CASE generating the pdf of items to rennew
      */
 /**
  * CASE generating the pdf of items to rennew
  */
 case "generate_renewal_pdf":
     //Prepare the PDF file
     include $_SESSION['settings']['cpassman_dir'] . '/includes/libraries/Pdf/Tfpdf/tfpdf.class.php';
     $pdf = new tFPDF();
     //Add font for utf-8
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $pdf->aliasNbPages();
     $pdf->addPage();
     $pdf->SetFont('DejaVu', '', 16);
     $pdf->Cell(0, 10, $LANG['renewal_needed_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 12);
     $pdf->Cell(0, 10, $LANG['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], time()), 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(70, 6, $LANG['label'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['creation_date'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['expiration_date'], 1, 0, "C", 1);
     $pdf->cell(45, 6, $LANG['group'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['author'], 1, 1, "C", 1);
 /**
  * Generate and save or stream a PDF file for this certificate
  *
  * @access public
  * @since 1.0.0
  * @param string $path optional absolute path to the certificate directory, if
  *        not supplied the PDF will be streamed as a downloadable file
  *
  * @return mixed nothing if a $path is supplied, otherwise a PDF download
  */
 public function generate_pdf($path = '')
 {
     // include the pdf library
     $root_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
     require_once $root_dir . '../lib/tfpdf/tfpdf.php';
     do_action('sensei_certificates_set_background_image', $this);
     if (isset($this->bg_image_src) && '' != $this->bg_image_src) {
         $image = $this->bg_image_src;
     } else {
         $image = apply_filters('woothemes_sensei_certificates_background', $GLOBALS['woothemes_sensei_certificates']->plugin_path . 'assets/images/certificate_template.png');
     }
     // End If Statement
     $image_attr = getimagesize($image);
     if ($image_attr[0] > $image_attr[1]) {
         $orientation = 'L';
     } else {
         $orientation = 'P';
     }
     // End If Statement
     // Create the pdf
     // TODO: we're assuming a standard DPI here of where 1 point = 1/72 inch = 1 pixel
     // When writing text to a Cell, the text is vertically-aligned in the middle
     $fpdf = new tFPDF($orientation, 'pt', array($image_attr[0], $image_attr[1]));
     $fpdf->AddPage();
     $fpdf->SetAutoPageBreak(false);
     // Add custom font
     $custom_font = apply_filters('sensei_certificates_custom_font', false);
     if ($custom_font) {
         if (isset($custom_font['family']) && isset($custom_font['file'])) {
             $fpdf->AddFont($custom_font['family'], '', $custom_font['file'], true);
         }
     } else {
         // Add multibyte font
         $fpdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     }
     // Set the border image as the background
     $fpdf->Image($image, 0, 0, $image_attr[0], $image_attr[1]);
     do_action('sensei_certificates_before_pdf_output', $this, $fpdf);
     if ($path) {
         // save the pdf as a file
         $fpdf->Output($path . '/' . $this->get_certificate_template_path() . '/' . $this->get_certificate_filename(), 'F');
     } else {
         // download file
         $fpdf->Output('certificate-preview-' . $this->hash . '.pdf', 'I');
     }
     // End If Statement
 }
function printCertificate($text, $competitor,$position,$event,$score)
{
	global $pdf, $fbgname;
	$pdf->AddPage();
	if (isset($_GET["b"]) && $fbgname)
		$pdf->Image($fbgname,5,5,287,200);
	if (isset($_GET["t"]))
		parseText($text, $competitor,$position,$event,$score);
}

if (substr($_SERVER["REQUEST_URI"],0,6)=="/beta/")
	require_once "../".DIR_FPDF;
else
	require_once DIR_FPDF;

$pdf = new tFPDF("L");
$pdf->SetMargins(50,50,50);
$pdf->AddFont(SERIF,"","DejaVuSerif.ttf",true);
$pdf->AddFont(SERIF,"B","DejaVuSerif-Bold.ttf",true);
$pdf->AddFont(SANS,"","DejaVuSans.ttf", true);
$pdf->AddFont(SANS,"B","DejaVuSans-Bold.ttf", true);

$fname = "tpt_".$_SESSION["c_id"];
$template = readTemplate($fname,$dummy);
if ($template)
	$text = $template->txt;
else
{
	$fname = defaultTemplateLanguage();
	$template = readTemplate($fname,$dummy);
	if (!$template) 
Пример #25
0
    /**
     *	Előregisztráció belépési nyilatkozat visszaadása pdf-ben
     */
    public function belepesi_nyilatkozat()
    {
        // tartalom lekérdezése
        $content = $this->pre_register_model->alldata_query($this->registry->params['id']);
        // Optionally define the filesystem path to your system fonts
        // otherwise tFPDF will use [path to tFPDF]/font/unifont/ directory
        // define("_SYSTEM_TTFONTS", "C:/Windows/Fonts/");
        require LIBS . '/tfpdf/tfpdf.php';
        // require(LIBS . '/tfpdf/grid.php');
        // $pdf = new PDF_Grid();
        // $pdf->grid = true;
        $pdf = new tFPDF();
        $pdf->SetTitle('Belépési nyilatkozat', true);
        $pdf->SetAutoPageBreak(false, 10);
        $pdf->AddPage();
        // Add a Unicode font (uses UTF-8)
        $pdf->AddFont('Arial', '', 'arial.ttf', true);
        $pdf->AddFont('ArialBold', '', 'arialb.ttf', true);
        $pdf->AddFont('ArialItalic', '', 'arial_i.ttf', true);
        //$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
        $sor0 = 3.5;
        //8-es betűméretű sor magassága
        $sor1 = 4;
        //9-es betűméretű sor magassága
        $sor2 = 4.5;
        $beh = 6;
        // sor eleji behúzás
        $pdf->Rect(160, 11, 6, 6);
        $pdf->Rect(166, 11, 6, 6);
        $pdf->Rect(172, 11, 6, 6);
        $pdf->Rect(178, 11, 6, 6);
        $pdf->Rect(184, 11, 6, 6);
        $pdf->SetFont('ArialBold', '', 13);
        $pdf->SetXY(10, 17);
        $pdf->Cell(0, 10, 'Belépési Nyilatkozat', 0, 1, 'C');
        $pdf->Ln(8);
        $pdf->SetFont('Arial', '', 9);
        //$pdf->SetXY(10,50);
        $pdf->Cell($beh);
        //$pdf->Cell(0,0,'Alulírott, a mai napon kijelentem, hogy a MULTI JOB Iskolaszövetkezetbe (Címünk: 1137 Budapest, Szent István krt. 2. I/2.)');
        $pdf->Cell(58, $sor2, 'Alulírott, a mai napon kijelentem, hogy a ', 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 9);
        $pdf->Cell(50, $sor2, 'MULTI JOB Iskolaszövetkezetbe ', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 9);
        $pdf->Cell(0, $sor2, '(Címünk: 1137 Budapest, Szent István krt. 2. I/2.)', 0, 1, 'L');
        $pdf->Cell(0, $sor2, 'tagként kívánok belépni.', 0, 1, 'L');
        //$pdf->Ln(4);
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'Ezen belépési nyilatkozat aláírásával egyidejűleg kijelentem, hogy a Szövetkezet Alapszabályát, Szervezeti Működési', 0, 1, 'L');
        $pdf->Cell(0, $sor2, ' Szabályzatát magamra nézve kötelező érvényűnek elfogadom.', 0, 1, 'L');
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'A szövetkezet feladatainak megvalósításában személyes munkámmal kívánok részt venni.', 0, 1, 'L');
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'A szövetkezet tartozásaiért vagyoni hozzájárulásom (megváltott részjegy) erejéig felelősséget vállalok.', 0, 1, 'L');
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'Vállalom, hogy a jelen nyilatkozatban megjelölt lakcímem megváltozását 5 munkanapon belül a Multi Job Iskolaszövetkezetnek', 0, 1, 'L');
        $pdf->MultiCell(0, $sor2, 'bejelentem. Amennyiben ezt elmulasztom és ezzel az Iskolaszövetkezetnek többletköltséget okozok, azt az én kötelességem viselni.');
        $pdf->MultiCell(0, $sor2, 'Tudomásul veszem, hogy amennyiben a címváltozás bejelentésének elmaradása miatt az év elején az Iskolaszövetkezet által a személyi jövedelemadó bevallásához – igazoltan – elküldött igazolása nem érkezik meg hozzám, azért és a bevallás elmaradásáért a felelősség kizárólag engem terhel.');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 11);
        $pdf->Cell(0, $sor2, 'Büntetőjogi felelősségem tudatában kijelentem, hogy az alábbi adatok megfelelnek a valóságnak.', 0, 1, 'C');
        $pdf->Ln(2);
        $pdf->SetFont('Arial', '', 9);
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'Jelen nyilatkozat aláírásával hozzájárulásomat adom, hogy a személyi adataimat igazoló – a jelen nyilatkozatban feltüntetett –', 0, 1, 'L');
        $pdf->MultiCell(0, $sor2, 'okmányaimat a Multi Job Iskolaszövetkezet lefénymásolja, a fénymásolat és jelen nyilatkozat által rögzített adataimat a munkaviszonyaimmal összefüggő célokra felhasználja és tárolja.' . "\n" . 'Hozzájárulok, hogy adataimat a Multi Job Iskolaszövetkezet személyi azonosításra nem alkalmas módon statisztikai célokra felhasználja, továbbadja.');
        $pdf->Cell($beh);
        $pdf->Cell(0, $sor2, 'Büntetőjogi felelősségem tudatában kijelentem – és aláírásommal megerősítem – azt is, hogy a személyi adataimnál (az 1.', 0, 1, 'L');
        $pdf->MultiCell(0, $sor2, 'pontban) feltüntetett bankszámlaszámot én jelöltem meg, azt legjobb tudásom, gondosságom alapján helyesen adtam meg. A bankszámlaszám hibás megjelöléséből származó minden anyagi kárért a felelősség és az ennek korrigálásával járó adminisztratív feladatok elvégzésével járó minden felelősség kizárólag engem terhel.');
        $pdf->Ln(9);
        $pdf->SetFont('ArialBold', '', 12);
        $pdf->Cell(0, $sor1, '1. Személyi adatok:', 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(12, $sor1, 'Név:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(70, $sor1, $content['name'], 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(41, $sor1, 'Anyja neve (leánykori):', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['mother_name'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(28, $sor1, 'Születési hely:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(53.5, $sor1, $content['birth_place'], 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(25, $sor1, 'Születési idő:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['birth_time'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(40, $sor1, 'Diákigazolvány szám: ', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['student_card_number'], 0, 1, 'L');
        $pdf->SetFont('Arial', '', 8);
        $pdf->Cell(0, $sor1, '(-ha van vonalkód az alatta lévő szám, -újon a kártyaszám, -ideiglenesen az igazolás sorszámát)', 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(20, $sor1, 'TAJ szám:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(62, $sor1, $content['taj_number'], 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(30, $sor1, 'Állampolgárság:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(100, $sor1, $content['nationality'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(33, $sor1, 'Adóazonosító jel:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['tax_id'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(35, $sor1, 'Bankszámla-szám:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['bank_account_number'], 0, 1, 'L');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 11);
        $pdf->Cell(0, $sor1, 'CSAK SAJÁT NÉVRE SZÓLÓ BANKSZÁMLASZÁMOT FOGADUNK EL!', 0, 1, 'C');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(46, $sor1, 'Számlavezető bank neve:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['bank_name'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(30, $sor1, 'Állandó lakcím:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['permanent_address'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(32, $sor1, 'Elérhetőségi cím:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['contact_address'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(22, $sor1, 'E-mail cím:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(60, $sor1, $content['email_address'], 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(23, $sor1, 'Mobil szám:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, $content['telefon_number'], 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->MultiCell(0, $sor1, 'Büntetőjogi felelősségem tudatában kijelentem hogy, nappali tagozatos hallgatója vagyok az alábbi oktatási intézménynek.');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(70, $sor1, 'Eddigi legmagasabb iskolai végzettség:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        if ($content['school_type'] == 1) {
            $school_type = 'Általános iskola';
        } elseif ($content['school_type'] == 2) {
            $school_type = 'Középiskola';
        } elseif ($content['school_type'] == 3) {
            $school_type = 'Főiskola / egyetem';
        }
        $pdf->Cell(0, $sor1, $school_type, 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(70, $sor1 + 1, 'Jelenlegi oktatási intézmény (jelenlegi) neve, pontos címe:', 0, 1, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->MultiCell(0, $sor1, $content['school_data']);
        $pdf->Ln(6);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(63, $sor1, 'Belépés dátuma (a Multi Job ISz-be):', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(44, $sor1, '...................................', 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(30, $sor1, '(Kilépés dátuma:', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(0, $sor1, '...................................)', 0, 1, 'L');
        // Load a UTF-8 string from a file and print it
        //$txt = file_get_contents('HelloWorld.txt');
        //$pdf->Write(8,$txt);
        // második oldal -------------------------
        $pdf->AddPage();
        $pdf->SetFont('ArialBold', '', 12);
        $pdf->Cell(0, $sor1, '2. Vagyoni hozzájárulás:', 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('Arial', '', 9);
        $pdf->MultiCell(0, $sor1, 'Kötelezem magam, hogy a belépést követő első munkabéremből az 1.000.Ft (azaz egyezer forint) értékű részjegyet megváltom. Kilépéskor, kizáráskor a vagyoni hozzájárulást a szövetkezet visszafizeti.');
        $pdf->Cell(0, $sor1, 'Szövetkezettel kötött megállapodást, a mai naptól számítva magamra nézve kötelező érvényűnek tekintem.', 0, 1, 'L');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 9);
        $pdf->MultiCell(0, $sor1, 'Kijelentem, hogy az általam megadott e-mail címre küldött hivatalos leveleket, szerződéseket, bérjegyzéket, M30-as személyi jövedelemadó igazolást, hivatalosan megküldöttnek tekintem, valamint munkáajánlatokat és munkákkal kapcsolatos fontos információkat, egyéb hasznos  tudnivalókat küldhet!');
        $pdf->Ln(2);
        $pdf->MultiCell(0, $sor1, 'Tudomásul veszem, hogy a levont személyi jövedelemadóból alapesetben nem vagyok jogosult családi adókedvezményre vagy súlyos fogyatékos magánszemélyek személyi kedvezményére. ');
        $pdf->Ln(2);
        $pdf->SetFont('ArialItalic', '', 9);
        $pdf->MultiCell(0, $sor1, '(Ha jogosult bármelyikre, igényeljen hozzá nyilatkozatot belépésnél, mert az adóelőleg számításánál csak akkor tudjuk figyelembe venni e kedvezményeket, ha érvényes nyilatkozatot ad le a magánszemély! )');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 9);
        $pdf->MultiCell(0, $sor1, 'A nyilatkozat tartalmát érintő bármely változás esetén, köteles vagyok haladéktalanul új nyilatkozatot tenni, vagy a korábbi nyilatkozatot visszavonni. ');
        $pdf->Ln(2);
        $pdf->SetFont('ArialItalic', '', 9);
        $pdf->MultiCell(0, $sor1, '(Amennyiben a nyilatkozattételkor fennálló körülmények ellenére a személyi – vagy családi kedvezmény érvényesítését jogalap nélkül kéri, aminek következtében az adóbevallása alapján 10 ezer forintot meghaladó befizetési különbözet mutatkozik, a befizetési különbözet 12 százalékát különbözeti-bírságként kell megfizetnie! )');
        $pdf->Ln(8);
        $pdf->SetFont('ArialBold', '', 12);
        $pdf->Cell(21, $sor1, 'Budapest,', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(70, $sor1, '............................................................', 0, 0, 'L');
        $pdf->Line(120, 101, 160, 101);
        $pdf->SetXY(133, 103);
        $pdf->SetFont('ArialBold', '', 11);
        $pdf->Cell(0, $sor1, 'aláírás', 0, 1, 'L');
        $pdf->Ln(5);
        $pdf->SetFont('ArialBold', '', 12);
        $pdf->Cell(0, $sor1, 'Fontos tudnivalók', 0, 1, 'L');
        $pdf->Ln(3);
        $pdf->SetFont('Arial', '', 8);
        $pdf->Cell(6, $sor0, '1.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkavállaló tudomásul veszi, hogy az őt érintő munkaviszonyból eredő munkáltatói jogokat és kötelességeket Szücs Róbert elnök – mint munkáltató gyakorolja, illetve teljesíti. ');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '2.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'Tagsági viszonyt létesítésnek feltételei: iskolalátogatási igazolás, személyi igazolvány szám, belépési nyilatkozat, részjegy, adószám, TAJ-szám (külföldi állampolgárságú diák munkavállalónál: nappalis iskolalátogatási igazolás, a Magyarországon való jogszerű tartózkodást biztosító – magyar hatóság által kiadott - hatósági engedély száma, belépési nyilatkozat, részjegy, belföldi kézbesítési cím vagy kézbesítési megbízott, adószám és ha van TAJ-szám).');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '3.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkaviszony határozott időre jön létre, minden egyes munkához külön munkaszerződést kell kötni. ');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '4.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkavállaló személyi alapbérét, munkakörét és a munkavégzés helyét az aktuális diákmunka szerződés tartalmazza. ');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '5.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkarendet a Multi Job ISz. határozza meg. A napi munkaidő nem haladhatja meg a 12 órát és annak 8 hét átlagában a teljes munkaidőnek meg kell felelnie. Tudomásul veszem, hogy 18 év alatti munkavállalóként nem dolgozhatok napi 8 óránál többet!');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '6.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'Az elvégzett munka után járó munkabért, a tárgyhót követő hónap 10. napjáig, banki átutalással kifizeti a munkaadó. Az egyéb juttatás feltételeit a Szövetkezet anyagi érdekeltségi rendszere határozza meg.
		Az 1997. évi LXXX. tv. (Tbj. tv.) 5. § (1) bekezdés b) pontja alapján a diákbér társadalombiztosítási (azaz nyugdíj- és egészségbiztosítási) járulékalapot NEM képező jövedelem. 
		Az 1999. évi 47. APEH iránymutatás alapján 27%-os mértékű EHO-t NEM kell megfizetni a diákbér után.');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '7.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkavállaló közvetlen szakmai felettese az aktuális projekt vezető.');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '8.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A munkavállaló kötelezettséget vállal arra, hogy a feladatkörébe tartozó munkát lelkiismeretesen elvégzi, a kapott utasításokat teljesíti, betartja a munkavédelmi rendelkezéseket és előírásokat, valamint a munkafegyelemre vonatkozó egyéb szabályokat. Károkozás, vagy munkafegyelem megsértése esetén felelősséggel tartozik.');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 8);
        $pdf->Cell(6, $sor0, '9.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A bérkifizetés feltétele, hogy az ID számmal ellátott teljesítési igazolásokat minden munkavégzést követő 5 munkanapon belül a munkavállaló eljuttassa az aktuális projektvezetőhöz!');
        $pdf->Ln(2);
        $pdf->SetFont('Arial', '', 8);
        $pdf->Cell(6, $sor1, '10.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'Külföldi állampolgárságú munkavállaló esetében 
			  Nyilatkozat:
			  Kijelentem, hogy az adóévben jövedelmeimről adóbevallást nyújtok be. A külszolgálatra, külföldi kiküldetésre tekintve kapott összeg adóköteles részének megállapítására az általános – az átmeneti szabály alkalmazását választom.* A megfelelő szövegrész aláhúzandó. ');
        $pdf->Ln(2);
        $pdf->Cell(6, $sor0, '11.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'Nyilatkozat munkavédelmi és tűzvédelmi oktatásról
		Teljes felelősségem tudatában nyilatkozom, hogy a mai napon megtartott munkavédelmi és tűzvédelmi oktatás teljes körű anyagát munkakörömhöz kapcsolódó általános és speciális ismereteket megkaptam, azokat a munkavégzés során alkalmazom és betartom.');
        $pdf->Ln(2);
        $pdf->SetFont('ArialBold', '', 8);
        $pdf->Cell(6, $sor0, '12.', 0, 0, 'L');
        $pdf->MultiCell(0, $sor0, 'A Felek jelen szerződés aláírásával kifejezetten és egybehangzóan megállapodnak, hogy a Munkáltató jogosult a Munkavállalót a munkaszerződés alapján megillető mindenkori munkabére nettó 1,7 %-át, de bérfizetésenként legalább 300,-Ft (háromszáz forint) összeget, maximum 1000,-Ft (ezer forint) a Kandó Kámán Műszaki Főiskola Multi Job Iskolaszövetkezet működési költéseihez történő tagi hozzájárulásként a munkabér kifizetését megelőzően levonni. Munkavállaló kijelenti, hogy a tagi hozzájárulás felhasználásáról a Munkáltató megfelelően tájékoztatta és ezen megállapodást ennek ismeretében kötötte. ');
        $pdf->Ln(7);
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->Cell(19, $sor1, 'Budapest,', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->Cell(70, $sor1, '...................................................', 0, 0, 'L');
        $pdf->SetXY(120, 262);
        $pdf->Cell(70, $sor1, '...................................................', 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->SetXY(128, 266);
        $pdf->Cell(0, $sor1, '(munkavállaló) diák', 0, 1, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->SetXY(120, 277);
        $pdf->Cell(70, $sor1, '...................................................', 0, 0, 'L');
        $pdf->SetFont('ArialBold', '', 10);
        $pdf->SetXY(135, 281);
        $pdf->Cell(0, $sor1, 'munkaadó', 0, 0, 'L');
        $pdf->SetFont('Arial', '', 10);
        $pdf->SetXY(40, 280);
        $pdf->Cell(0, $sor1, 'p.h.', 0, 0, 'L');
        //$pdf->Output('belepesi_nyilatkozat_' . $content['user_id'] . '.pdf','D');
        $pdf->Output();
    }