SetAutoPageBreak() public method

public SetAutoPageBreak ( $auto, $margin )
Esempio n. 1
0
 /**
  * Creates content that should be printed
  *
  * @param Collection $collection
  * @return string
  */
 public function renderCollectionContent($collection)
 {
     $pdf = new \tFPDF('P', 'mm', [72, 80]);
     $pdf->SetMargins(0, 2);
     // Запретим автоматический разрыв страниц
     $pdf->SetAutoPageBreak(false, 0);
     $pdf->AddPage();
     $pdf->AddFont('arial', '', 'arial.ttf', true);
     $pdf->AddFont('arialbd', '', 'arialbd.ttf', true);
     $this->makeLine($pdf, Settings::get()->terminalName(), 10, 5)->makeLine($pdf, date('H:i:s d.m.Y', time()), 10, 5)->makeLine($pdf, $collection->sum . ' руб.', 16, 15, true)->makeLine($pdf, 'Инкассация:', 10, 10)->makeLine($pdf, (string) $collection->id, 12, 5)->makeLine($pdf, Settings::get()->contactInfo(), 8, 15)->makeLine($pdf, 'Сохраняйте чек', 8, 4);
     $fileName = __DIR__ . '/../runtime/pdf/collection_ticket.pdf';
     $pdf->Output($fileName, 'F');
     return $fileName;
 }
 /**
  * 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');
 }
 /**
 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;
 }
 /**
  * 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
 }
Esempio n. 5
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");
while ($rowEvt=cased_mysql_fetch_array($events))
Esempio n. 6
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();
    }