Inheritance: extends TCPDF
Example #1
0
                        $this->pageHeader($alunno, $num_ritardi, $somma_ritardi);
                    }
                    $this->SetY($this->y_position);
                    $this->SetFont('', '', 9);
                    $this->SetX(30.0);
                    $this->Cell(20, 5, utf8_encode($giorno_str), 0, 0);
                    $this->Cell(20, 5, format_date($day['data'], SQL_DATE_STYLE, IT_DATE_STYLE, "/"), 0, 0);
                    $this->Cell(20, 5, " ore " . substr($day['ingresso'], 0, 5), 0, 0);
                }
            }
            $x++;
        }
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($author);
$pdf->SetTitle("Elenco ritardi di " . $alunno['cognome'] . " " . $alunno['nome']);
// set default header data
$pdf->SetHeaderData("", 0, "Scuola Media Statale \"Arborea - Lamarmora\" - secondaria di primo grado", "Via Isonzo, 5 - Iglesias (CI)");
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', 8.0));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', 8.0));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
            $this->MultiCell(25, 4, number_format($Valor, 0), '', 'R', 1, 1, $x + 65, $y + 73.5, true, 0, false, true, 40, 'T');
            $this->SetFont('helveticaB', '', 9);
            //Tamaño y tipo de Fuente
            //CUPON DERECHA
            $InfoCodigoBarrasUno = "- Pago oportuno: {$FechaOportuno} - Valor a pagar: " . number_format($Valor, 0);
            $InfoCodigoBarrasDos = "- Pago extemporaneo: {$FechaExtemporaneo} - Valor a pagar: " . number_format($ValorCodigoBarras2, 0);
            $this->MultiCell(100, 5, $Nombre, 0, 'L', 1, 1, $x + 105, $y + 22, true, 0, false, true, 40, 'T');
            $this->MultiCell(100, 5, $NumeroIdentificacion, 0, 'L', 1, 1, $x + 105, $y + 26, true, 0, false, true, 40, 'T');
            $this->MultiCell(100, 5, $Grado, 0, 'L', 1, 1, $x + 195, $y + 22, true, 0, false, true, 40, 'T');
            $this->MultiCell(100, 5, $Ano, 0, 'L', 1, 1, $x + 195, $y + 26, true, 0, false, true, 40, 'T');
            $this->MultiCell(100, 5, $InfoCodigoBarrasUno, 0, 'L', 1, 1, $x + 95, $y + 32, true, 0, false, true, 40, 'T');
            $this->MultiCell(100, 5, $InfoCodigoBarrasDos, 0, 'L', 1, 1, $x + 95, $y + 54, true, 0, false, true, 40, 'T');
            $CodigoBarras1 = "http://localhost/portalconciliacion/barcodephp/html/image.php?filetype=PNG&dpi=300&scale=1&rotation=0&font_family=Arial.ttf&font_size=8&text=%28415%297701234001001~F1%288020%29{$Matricula}~F1%28390y%29{$Valor}~F1%2896{$FechaCodigoBarras1}&thickness=45&start=C&code=BCGgs1128";
            $CodigoBarras2 = "http://localhost/portalconciliacion/barcodephp/html/image.php?filetype=PNG&dpi=300&scale=1&rotation=0&font_family=Arial.ttf&font_size=8&text=%28415%297701234001001~F1%288020%29{$Matricula}~F1%28390y%29{$ValorCodigoBarras2}~F1%2896{$FechaCodigoBarras2}&thickness=45&start=C&code=BCGgs1128";
            $this->Image($CodigoBarras1, $x + '100', $y + '38', 0, 0, '', '', 'T', false, 300, '', false, false, 0, false, false, false);
            $this->Image($CodigoBarras2, $x + '100', $y + '60', 0, 0, '', '', 'T', false, 300, '', false, false, 0, false, false, false);
            $this->MultiCell(100, 10, 'No. ' . $Numero, 0, 'C', 1, 1, $x + 145, $y + 11, true, 0, false, true, 40, 'T');
            $this->MultiCell(205, 10, 'Referencia. ' . $Matricula, 0, 'R', 1, 1, $x + 5, $y + 17, true, 0, false, true, 40, 'T');
            $this->MultiCell(85, 10, 'Referencia. ' . $Matricula, 0, 'R', 1, 1, $x + 5, $y + 82, true, 0, false, true, 40, 'T');
            $y = $y + 90;
        }
        $this->Ln(4);
        ob_clean();
        $fecha = date("d-m-Y", time());
        $this->Output("cupon.pdf", "I");
    }
}
// create new PDF document
$id = $_GET["id"];
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->pintarPdf($id);
function pdfGen($group_name, $mode = NULL, $start_date, $end_date, $stats, $l, $title, $path_www)
{
    global $centreon_path;
    // create new PDF document
    $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator("PDF Reports Module");
    $pdf->SetAuthor(getGeneralOptInfo("pdfreports_report_author"));
    //$pdf->SetAuthor('Fully Automated Nagios');
    $pdfTitle = $title . " " . $group_name;
    //$pdfTitle = "Rapport de supervision du hostgroup ".$group_name;
    $pdf->SetTitle($pdfTitle);
    //$pdf->SetSubject('TCPDF Tutorial');
    //$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
    // define default header data
    $header = $title . " " . $group_name;
    //$header = "Rapport de supervision du hostgroup ".$group_name;
    //$ip = $_SERVER['HOSTNAME'];
    $startDate = date("d/m/Y", $start_date);
    $time = time();
    $endDate = date("d/m/Y", $time);
    $string = _("From") . " " . strftime("%A", $start_date) . " " . $startDate . " " . _("to") . " " . strftime("%A", $time) . " " . $endDate . "\n";
    // set default header data
    $pdf->SetHeaderData('../../../img/headers/' . getGeneralOptInfo("pdfreports_report_header_logo"), PDF_HEADER_LOGO_WIDTH, $header, $string);
    // set header and footer fonts
    $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    // set default monospaced font
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    //set margins
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    //set auto page breaks
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    //set image scale factor
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    //set some language-dependent strings
    $pdf->setLanguageArray($l);
    // ---------------------------------------------------------
    // set font
    $pdf->SetFont('helvetica', '', 12);
    // add a page
    $pdf->AddPage();
    //Column titles
    $header = array('Status', 'Time', 'Total Time', 'Mean Time', 'Alert');
    // Pie chart Generation
    $piechart_img = pieGen($stats, $mode);
    //Data loading
    $data = $pdf->LoadData($stats);
    // print colored table
    //$pdf->ColoredTable($header, $data,$chart_img);
    if ($mode == "hgs") {
        // Hostgroup
        $pdf->ColoredTable($header, $data, $piechart_img, $path_www);
    } else {
        if ($mode == "sgs") {
            // Servicegroup
            $pdf->ServicesColoredTable($header, $data, $piechart_img, $path_www);
        }
    }
    // ---------------------------------------------------------
    //génération d'un nom de pdf
    $endDay = date("d", $time);
    $endYear = date("Y", $time);
    $endMonth = date("m", $time);
    $pdfDirName = getGeneralOptInfo("pdfreports_path_gen") . $endYear . $endMonth . $endDay . "/";
    $pdfFileName = $pdfDirName . $endYear . "-" . $endMonth . "-" . $endDay . "_" . $group_name . ".pdf";
    if (!is_dir($pdfDirName)) {
        mkdir($pdfDirName);
    }
    //Close and output PDF document
    $pdf->Output($pdfFileName, 'F');
    return $pdfFileName;
}
Example #4
0
{
    public function Header()
    {
        $this->SetFont('Helvetica', 'B', 8);
        $this->SetLineWidth(0.5);
        $this->Line(12, 280, 195, 280);
        $this->Ln(0.5);
        // Logo
        $image_file = K_PATH_IMAGES . 'gem_hztl.jpg';
        $this->Image($image_file, 10, 5, 50, '', 'JPG', '', 'L', false, 300, '', false, false, 0, false, false, false);
        $image_file = K_PATH_IMAGES . 'logo_GEM_hztl.jpg';
        $this->Image($image_file, 150, 5, 50, '', 'JPG', '', 'L', false, 300, '', false, false, 0, false, false, false);
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
//$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
Example #5
0
        $this->SetFont('');
        // Data
        $fill = 0;
        foreach ($data as $row) {
            $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
            $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
            $this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill);
            $this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 011');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 011', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
Example #6
0
    public function Header()
    {
        //get the current page break margin
        $bMargin = $this->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $this->AutoPageBreak;
        // disable auto-page-break
        $this->SetAutoPageBreak(false, 0);
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $this->setPageMark();
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
//SET DOCUMENT INFORMATION
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Recaudacion');
$pdf->SetTitle('Programa de Servicio de Salud');
$pdf->SetSubject('Detalle programa paciente');
$pdf->SetKeywords('Paciente, PSS, Programa');
//$pdf->SetHeaderData('../../img/logo.jpg', PDF_HEADER_LOGO_WIDTH,'SERVICIO DE SALUD ARICA ','HOSPITAL REGIONAL DE ARICA Y PARINACOTA');
$pdf->setHeaderFont(array('helvetica', '', 6));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_MARGIN_LEFT, 8, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
Example #7
0
     {
         //To make the function Footer() work properly
         $this->AliasNbPages();
         if (!isset($this->original_lMargin)) {
             $this->original_lMargin = $this->lMargin;
         }
         if (!isset($this->original_rMargin)) {
             $this->original_rMargin = $this->rMargin;
         }
         include "modules/SalesOrder/pdf_templates/footer.php";
     }
 }
 $page_num = '1';
 // create new PDF document
 //$pdf = new PDF( 'P', 'mm', 'A4' );
 $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
 // set font
 $pdf->SetFont($default_font, " ", $default_font_size);
 $pdf->setPrintHeader(0);
 //header switched off permanently
 // auto break on
 //$pdf->SetAutoPageBreak(true);
 // set footer fonts
 //$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
 //set margins
 $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
 // set pdf information
 $pdf->SetTitle($pdf_strings['FACTURE'] . ": " . $account_name);
 $pdf->SetAuthor($owner_firstname . " " . $owner_lastname . ", " . $org_name);
        $this->MultiCell(250, 6, 'Importe Prestamo', 0, 'C', false, 1, 80, 30, true, 0, true, true, 0, 'M', false);
        $this->MultiCell(300, 6, 'Monto Redocumentación', 0, 'C', false, 1, 100, 30, true, 0, true, true, 0, 'M', false);
        $this->MultiCell(420, 6, 'Sindicato', 0, 'C', false, 1, 80, 30, true, 0, true, true, 0, 'M', false);
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $this->setPageMark();
    }
    public function Footer()
    {
        //$image_file = "img/pie.jpg";
        //$this->Image($image_file, 7, 250, 198, 23, 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
    }
}
// create new PDF document
$pdf = new MYPDF();
//set document information
$pdf->SetAuthor('DIRECCION DE PENSIONES');
$pdf->SetTitle('DEL MUNICIPIO DE OAXACA DE JUÁREZ OAX');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(0, PDF_MARGIN_TOP, 0);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$resolution = array(216, 355);
$consultaTram = "SELECT idContrato, fecha, titular, nombre, importePrestamo, MontoRedocumentacion,sindicato,idSindicato FROM repAltasRedocumenta ORDER BY idSindicato ASC";
$consulta = mysql_query($consultaTram);
$pdf->AddPage('L', $resolution);
$pdf->SetFont('helvetica', '', 10);
Example #9
0
 function generatePdfReport($pdfData, $mode, $params, $fileName)
 {
     $countries = CJFunctions::get_country_names();
     $responses = array();
     $include_email_in_reports = $params->get('include_email_in_reports', 0);
     foreach ($pdfData->responses as $response) {
         $responses[$response->id] = new stdClass();
         $responses[$response->id]->created_by = $response->created_by;
         $responses[$response->id]->created = $response->created;
         $responses[$response->id]->username = $response->username;
         $responses[$response->id]->name = $response->name;
         if ($include_email_in_reports == 1) {
             $responses[$response->id]->email = $response->email;
         }
         $responses[$response->id]->questions = array();
         foreach ($pdfData->questions as $question) {
             $responses[$response->id]->questions[$question->id] = new stdClass();
             $responses[$response->id]->questions[$question->id]->answer = '';
             $responses[$response->id]->questions[$question->id]->question_type = $question->question_type;
         }
     }
     if (!empty($pdfData->entries)) {
         foreach ($pdfData->entries as $entry) {
             if (isset($responses[$entry->response_id]) && isset($responses[$entry->response_id]->questions[$entry->question_id])) {
                 if (!empty($entry->answer)) {
                     if (empty($responses[$entry->response_id]->questions[$entry->question_id]->answer)) {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer = $entry->answer;
                     } else {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $entry->answer;
                     }
                     if (!empty($entry->answer_image) && JFile::exists(S_IMAGES_UPLOAD_DIR . '/' . $entry->answer_image)) {
                         //$image = JHtml::image(JURI::root(true).'/media/communitysurveys/images/'.$entry->answer_image, $entry->answer);
                         $image = '<img src="' . JURI::root(true) . '/media/communitysurveys/images/' . $entry->answer_image . '">';
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $image;
                     }
                 }
                 if (!empty($entry->answer2)) {
                     if (empty($responses[$entry->response_id]->questions[$entry->question_id]->answer)) {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer = $entry->answer2;
                     } else {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $entry->answer2;
                     }
                 }
                 if (!empty($entry->free_text)) {
                     // do special types formatting //
                     if ($responses[$entry->response_id]->questions[$entry->question_id]->question_type == S_SPECIAL_NAME) {
                         $names = explode('|', $entry->free_text);
                         if (!empty($names)) {
                             $entry->free_text = $names[0] . '. ' . $names[1] . ' ' . $names[2];
                         } else {
                             $entry->free_text = '';
                         }
                     } else {
                         if ($responses[$entry->response_id]->questions[$entry->question_id]->question_type == S_SPECIAL_ADDRESS) {
                             $parts = explode('|||', $entry->free_text);
                             if (count($parts) == 7) {
                                 $entry->free_text = '<address><strong>' . CJFunctions::escape($parts[0]) . '</strong><br>';
                                 $entry->free_text .= CJFunctions::escape($parts[1]) . '<br>';
                                 if (!empty($parts[2])) {
                                     $entry->free_text .= CJFunctions::escape($parts[2]) . '<br>';
                                 }
                                 $entry->free_text .= CJFunctions::escape($parts[3]) . ', ' . CJFunctions::escape($parts[4]) . ', ' . CJFunctions::escape($parts[6]) . '<br>';
                                 $entry->free_text .= !empty($countries[$parts[5]]) ? $countries[$parts[5]]->country_name : CJFunctions::escape($parts[5]);
                             } else {
                                 $entry->free_text = '';
                             }
                         }
                     }
                     // do special types formatting //
                     if (empty($responses[$entry->response_id]->questions[$entry->question_id]->answer)) {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer = $entry->free_text;
                     } else {
                         $responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $entry->free_text;
                     }
                 }
             }
         }
     }
     $response_rows = array();
     foreach ($responses as $id => $response) {
         $string = '<table class="table table-striped" width="100%">';
         $string = $string . '<tr><th width="30%"><strong>Response ID:</strong></th><td width="70%">' . $id . '</td></tr>';
         $string = $string . '<tr><th><strong>Response Date:</strong></th><td>' . $response->created . '</td></tr>';
         $string = $string . '<tr><th><strong>User ID:</strong></th><td>' . $response->created_by . '</td></tr>';
         $string = $string . '<tr><th><strong>Username:</strong></th><td>' . $response->username . '</td></tr>';
         $string = $string . '<tr><th><strong>User Display Name:</strong></th><td>' . $response->name . '</td></tr>';
         if ($include_email_in_reports == 1) {
             $string = $string . '<tr><td><strong>Email:</strong></td><td>' . $response->email . '</td></tr>';
         }
         foreach ($pdfData->questions as $question) {
             $string = $string . '<tr><td colspan="2">&nbsp;<hr></td></tr>';
             $string = $string . '<tr><th colspan="2"><h3>' . $question->title . '</h3></th></tr>';
             if (!empty($question->description)) {
                 $string = $string . '<tr><td colspan="2">' . $question->description . '</td></tr>';
             }
             $string = $string . '<tr><td colspan="2">&nbsp;</td></tr>';
             $string = $string . '<tr><td colspan="2">' . $response->questions[$question->id]->answer . '</td></tr>';
         }
         $string = $string . '</table>';
         array_push($response_rows, $string);
     }
     // create new PDF document
     require_once JPATH_COMPONENT_SITE . '/helpers/tcpdf.php';
     $pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     // set default header data
     $pdf->SetHeaderData('logo.png', PDF_HEADER_LOGO_WIDTH, $pdfData->title, '');
     // set document information
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('corejoomla.com');
     $pdf->SetTitle('Survey Report');
     $pdf->SetSubject('Survey Responses Report');
     $pdf->SetKeywords('survey, report');
     // set header and footer fonts
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     // set default monospaced font
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     //set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     //set auto page breaks
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     //set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     // ---------------------------------------------------------
     // set font
     $pdf->SetFont('freesans');
     foreach ($response_rows as $i => $response) {
         $pdf->AddPage();
         $pdf->writeHTML($response, true, false, true, false, '');
         $pdf->lastPage();
     }
     $pdf->Output($fileName, $mode);
 }
Example #10
0
        // set the new row position by case
        if (max($page_end_1, $page_end_2) == $page_start) {
            $ynew = max($y_end_1, $y_end_2);
        } elseif ($page_end_1 == $page_end_2) {
            $ynew = max($y_end_1, $y_end_2);
        } elseif ($page_end_1 > $page_end_2) {
            $ynew = $y_end_1;
        } else {
            $ynew = $y_end_2;
        }
        $this->setPage(max($page_end_1, $page_end_2));
        $this->SetXY($this->GetX(), $ynew);
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor("Nicola Asuni");
$pdf->SetTitle("TCPDF Example 020");
$pdf->SetSubject("TCPDF Tutorial");
$pdf->SetKeywords("TCPDF, PDF, example, test, guide");
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$LocationVATRate = $row[16];
$AgencyVATRate = $row[17];
$AgencyRate = $row[18];
$BookingAddress = $row[19];
$BookingStreet = $row[20];
$BookingTown = $row[21];
$BookingCounty = $row[22];
$BookingPostcode = $row[23];
$BookingCountry = $row[24];
$BookingTel = $row[25];
$BookingMobile = $row[26];
$WorkingTitle = $row[27];
$ProjectType = $row[28];
mysqli_free_result($result);
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('UKFilmLocation.com');
$pdf->SetTitle('Booking Form for Ref : J' . $JobRef . '-' . $BookingID);
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//$pdf->setPrintHeader(false);
//$pdf->setPrintFooter(false);
$pdf->setAutoPageBreak(false, 0);
//$pdf->SetFooterMargin(18);
Example #12
0
$begin = isset($_GET['tanggal_so_begin']) ? strval($_GET['tanggal_so_begin']) : "";
$end = isset($_GET['tanggal_so_end']) ? strval($_GET['tanggal_so_end']) : "";
$stmt = "select penjualan.no_so, penjualan.tanggal_so, penjualan.no_seri_produk, penjualan.quantity, penjualan.no_nis_sales, penjualan.nama_customer, penjualan.telp_customer, produk.nama_produk, sales.nama_sales from penjualan, produk, sales where produk.no_seri = penjualan.no_seri_produk AND sales.nis = penjualan.no_nis_sales AND penjualan.cabang = '{$cabang}' AND status = 'approve' AND penjualan.tanggal_so BETWEEN '{$begin}' AND '{$end}' order by penjualan.no_nis_sales asc";
$stmt1 = "select * from cabang where kode = '{$cabang}'";
foreach (tampilData($stmt1) as $dataCabang) {
}
class MYPDF extends TCPDF
{
    public function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('L', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(30, 70, 20);
$pdf->setPrintHeader(false);
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
$image_file = K_PATH_IMAGES . 'luxindo.jpg';
$pdf->Image($image_file, 5, 0, 40, '', 'JPG', '', 'M', false, 300, '', false, false, 0, false, false, false);
$pdf->SetFont('helvetica', 'B', 17);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 13, 'PT. Luxindo Raya', 0, 2, 'L', 0, '', '', 'D', 'B');
$pdf->SetFont('helvetica', 'B', 10);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 0, 'LAPORAN PENJUALAN', 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', '', 9);
Example #13
0
			// Position at 15 mm from bottom
			$this->SetY(-20);
			// Set font
			//$this->SetFont('helvetica', 'I', 8);
			$image_file = base_url.'images/footer-new.jpg';
			$this->Image($image_file, 15, '', '180', '20', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
			// Page number
			$this->SetFont('helvetica', 'B', 20);
			//$this->Cell(0, 10, 'All Rights Reserved', 0, false, 'C', 0, '', 0, false, 'T', 'M');
			}
		}
	}
	
	// create new PDF document
	$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
	
	// set document information
	$pdf->SetCreator(PDF_CREATOR);
	$pdf->SetAuthor('EziFuneral');
	$pdf->SetTitle('TCPDF Example 003');
	$pdf->SetSubject('At Need Plan');
	$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
	
	// set default header data
	$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
	//$pdf->SetFooterData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
	
	// set header and footer fonts
	$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
	$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
Example #14
0
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF
{
    //Page footer
    function Footer()
    {
        // Position at 1.5 cm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Print page number
        $this->Cell(0, 10, 'Page ' . $this->getGroupPageNoFormatted() . '/' . $this->getPageGroupAlias(), 0, 0, 'C');
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor("Nicola Asuni");
$pdf->SetTitle("TCPDF Example 023");
$pdf->SetSubject("TCPDF Tutorial");
$pdf->SetKeywords("TCPDF, PDF, example, test, guide");
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
Example #15
0
        // set the new row position by case
        if (max($page_end_1, $page_end_2) == $page_start) {
            $ynew = max($y_end_1, $y_end_2);
        } elseif ($page_end_1 == $page_end_2) {
            $ynew = max($y_end_1, $y_end_2);
        } elseif ($page_end_1 > $page_end_2) {
            $ynew = $y_end_1;
        } else {
            $ynew = $y_end_2;
        }
        $this->setPage(max($page_end_1, $page_end_2));
        $this->SetXY($this->GetX(), $ynew);
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 020');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
Example #16
0
        $bMargin = $this->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $this->AutoPageBreak;
        // disable auto-page-break
        $this->SetAutoPageBreak(false, 0);
        // set bacground image
        $img_file = K_PATH_IMAGES . 'image_demo.jpg';
        $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $this->setPageMark();
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 051');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(0);
$pdf->SetFooterMargin(0);
// remove default footer
Example #17
0
        $this->SetTextColor(0);
        $this->SetFont('');
        // Data
        $fill = 0;
        foreach ($data as $row) {
            $this->Cell($w[0], 4, $row[0], 'LR', 0, 'L', $fill);
            $this->Cell($w[1], 4, number_format($row[1], 2), 'LR', 0, 'R', $fill);
            $this->Cell($w[2], 4, $row[2], 'LR', 0, 'L', $fill);
            $this->Cell($w[3], 4, number_format($row[3], 2), 'LR', 0, 'R', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_INVOICE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Pharm Sys');
$pdf->SetTitle('Receipt');
$pdf->SetSubject('Payment');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
//$pdf->SetHeaderData(PDF_RECEIPT_LOGO, PDF_RECEIPT_LOGO_WIDTH, PDF_RECEIPT_TITLE, PDF_HEADER_STRING, array(0,0,0), array(0,0,0));
//$pdf->setHeaderFont(Array(PDF_FONT_NAME_RECEIPT, '', PDF_FONT_SIZE_RECEIPT));
//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(PDF_INVOICE_LEFT, PDF_INVOICE_TOP, PDF_INVOICE_RIGHT);
$pdf->SetHeaderMargin(PDF_INVOICE_HEADER);
$pdf->SetFooterMargin(PDF_INVOICE_FOOTER);
$pdf->SetAutoPageBreak(TRUE, PDF_INVOICE_BOTTOM);
Example #18
0
    public function cetak($idquotationsales = null, $idrefstore = null)
    {
        if ($idquotationsales == null) {
            exit('Data Tidak Tersedia');
        }
        $data = $this->orm->quotationsales->where('idquotationsales', $idquotationsales)->fetch();
        if (count($this->orm->quotationsales->where('idquotationsales', $idquotationsales)) == 0) {
            echo "<h3>Data Tidak Tersedia</h3>";
            exit;
        }
        //check from web
        if ($idrefstore == null) {
            $email = $_SESSION['user']['email'];
            $idrefstore = $_SESSION['user']['idrefstore'];
        } else {
            //from mobile
            $email = $this->input->post('email');
        }
        ini_set('memory_limit', '512M');
        $this->load->library('TCPDF');
        // create new PDF document
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'A4', true, 'UTF-8', false);
        // set document information
        $pdf->SetCreator(WEB_TITLE);
        $pdf->SetAuthor($email);
        $pdf->SetTitle("Quotation - " . $data['nomor']);
        $pdf->SetSubject($data['nomor']);
        $pdf->nomor = $data['nomor'];
        $pdf->tanggal = $data['tanggal'];
        $pdf->namaPelanggan = $data->pelanggan['namapelanggan'];
        $pdf->dibuat_oleh = $data['dibuat_oleh'];
        $pdf->oleh = $email;
        $pdf->store = $this->orm->refstore->where('idrefstore', $idrefstore)->fetch();
        // set default monospaced font
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        //set margins
        $pdf->SetMargins(5, 63, 5);
        $pdf->SetHeaderMargin(14);
        $pdf->SetFooterMargin(80);
        //set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, 80);
        //set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, 80);
        //set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        // ---------------------------------------------------------
        // set default font subsetting mode
        $pdf->setFontSubsetting(true);
        // Set font
        // dejavusans is a UTF-8 Unicode font, if you only need to
        // print standard ASCII chars, you can use core fonts like
        // helvetica or times to reduce file size.
        // use the font
        $pdf->SetFont('times', '', 10, '', false);
        // Add a page
        // This method has several options, check the source code documentation for more information.
        $resolution = array(310, 210);
        $pdf->AddPage('L', $resolution);
        // Set some content to print
        $html = '
            
            <style>
            body {
            letter-spacing:5px;
            }      
            </style> 
            	<style type="text/css">
            .rotate-text
             {

            /* Safari */
            -webkit-transform: rotate(-90deg);

            /* Firefox */
            -moz-transform: rotate(-90deg);

            /* IE */
            -ms-transform: rotate(-90deg);

            /* Opera */
            -o-transform: rotate(-90deg);

            /* Internet Explorer */
            filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

            }
            .border-table{
            	border:0.5px solid #000;
            		
            }

            table {
            padding-top:2px;
            }

            </style>
            	
            <body>
              <table border="1">
             <tr><th style="text-align: center;" width="60"> No </th><th width="180" style="text-align: center;"> Nama Barang </th><th style="text-align: center;" width="100"> Jumlah Barang </th><th style="text-align: center;" width="300"> Harga Satuan </th><td style="text-align: center; "width="300"> Keterangan </td></tr>
            ';
        $no = 1;
        foreach ($this->orm->quotationsalesdetail->where('idquotationsales', $idquotationsales) as $row) {
            $html .= "<tr><td>" . $no . "</td><td>" . $row->refbarang['namabarang'] . "</td><td style=\"text-align: right;\">" . $row['jumlahbarang'] . "</td><td style=\"text-align: right;\">" . number_format($row['hargasatuan'], 0, ',', '.') . "</td><td>" . $row['keterangan'] . "</td></tr>";
            $no++;
        }
        $html .= '</table>
</body>';
        //print_r($html); exit;
        // Print text using writeHTMLCell()
        $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
        //$pdf->writeHTML($html, true, 0, true, true);
        // ---------------------------------------------------------
        // Close and output PDF document
        // This method has several options, check the source code documentation for more information.
        $pdf->Output("Quotation - " . $data['nomor'], 'I');
        //============================================================+
        // END OF FILE
        //============================================================+
    }
Example #19
0
        $bMargin = $this->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $this->AutoPageBreak;
        // disable auto-page-break
        $this->SetAutoPageBreak(false, 0);
        // set bacground image
        $img_file = K_PATH_IMAGES . 'tsfondo.jpg';
        $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $this->setPageMark();
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Julian Andres Alvaran Valencia');
$pdf->SetTitle('Cotizacion TS');
$pdf->SetSubject('Cotizacion');
$pdf->SetKeywords('Techno Soluciones, PDF, cotizacion, CCTV, Alarmas, Computadores');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(0);
$pdf->SetFooterMargin(0);
// remove default footer
Example #20
0
 function checkStoreInvoice($orderDetails = 0)
 {
     JRequest::setVar('task', 'checkStoreInvoice');
     $force = true;
     //	@ini_set( 'max_execution_time', 5 );
     $path = VmConfig::get('forSale_path', 0);
     if ($path === 0) {
         vmError('No path set to store invoices');
         return false;
     } else {
         $path .= 'invoices' . DS;
         if (!file_exists($path)) {
             vmError('Path wrong to store invoices, folder invoices does not exist ' . $path);
             return false;
         } else {
             if (!is_writable($path)) {
                 vmError('Cannot store pdf, directory not writeable ' . $path);
                 return false;
             }
         }
     }
     $orderModel = VmModel::getModel('orders');
     $invoiceNumberDate = array();
     if (!$orderModel->createInvoiceNumber($orderDetails['details']['BT'], $invoiceNumberDate)) {
         return 0;
     }
     if (!empty($invoiceNumberDate[0])) {
         $invoiceNumber = $invoiceNumberDate[0];
     } else {
         $invoiceNumber = FALSE;
     }
     if (!$invoiceNumber or empty($invoiceNumber)) {
         vmError('Cant create pdf, createInvoiceNumber failed');
         return 0;
     }
     if (shopFunctions::InvoiceNumberReserved($invoiceNumber)) {
         return 0;
     }
     $path .= 'vminvoice_' . $invoiceNumber . '.pdf';
     if (file_exists($path) and !$force) {
         return $path;
     }
     // 			$app = JFactory::getApplication('site');
     //We come from the be, so we need to load the FE langauge
     $jlang = JFactory::getLanguage();
     $jlang->load('com_virtuemart', JPATH_SITE, 'en-GB', true);
     $jlang->load('com_virtuemart', JPATH_SITE, $jlang->getDefault(), true);
     $jlang->load('com_virtuemart', JPATH_SITE, null, true);
     $this->addViewPath(JPATH_VM_SITE . DS . 'views');
     $format = 'html';
     $viewName = 'invoice';
     $view = $this->getView($viewName, $format);
     $view->addTemplatePath(JPATH_VM_SITE . DS . 'views' . DS . 'invoice' . DS . 'tmpl');
     $view->invoiceNumber = $invoiceNumberDate[0];
     $view->invoiceDate = $invoiceNumberDate[1];
     $view->orderDetails = $orderDetails;
     $view->uselayout = 'invoice';
     ob_start();
     $view->display();
     $html = ob_get_contents();
     ob_end_clean();
     // create new PDF document
     $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     // set document information
     $pdf->SetCreator('Invoice by VirtueMart 2, used library tcpdf');
     $pdf->SetAuthor($view->vendor->vendor_name);
     $pdf->SetTitle(JText::_('COM_VIRTUEMART_INVOICE_TITLE'));
     $pdf->SetSubject(JText::sprintf('COM_VIRTUEMART_INVOICE_SUBJ', $view->vendor->vendor_store_name));
     $pdf->SetKeywords('Invoice by VirtueMart 2');
     //virtuemart.cloudaccess.net/index.php?option=com_virtuemart&view=invoice&layout=details&virtuemart_order_id=18&order_number=6e074d9b&order_pass=p_9cb9e2&task=checkStoreInvoice
     if (empty($view->vendor->images[0])) {
         vmError('Vendor image given path empty ');
     } else {
         if (empty($view->vendor->images[0]->file_url_folder) or empty($view->vendor->images[0]->file_name) or empty($view->vendor->images[0]->file_extension)) {
             vmError('Vendor image given image is not complete ' . $view->vendor->images[0]->file_url_folder . $view->vendor->images[0]->file_name . '.' . $view->vendor->images[0]->file_extension);
             vmdebug('Vendor image given image is not complete, the given media', $view->vendor->images[0]);
         } else {
             if (!empty($view->vendor->images[0]->file_extension) and strtolower($view->vendor->images[0]->file_extension) == 'png') {
                 vmError('Warning extension of the image is a png, tpcdf has problems with that in the header, choose a jpg or gif');
             } else {
                 $imagePath = DS . str_replace('/', DS, $view->vendor->images[0]->file_url_folder . $view->vendor->images[0]->file_name . '.' . $view->vendor->images[0]->file_extension);
                 if (!file_exists(JPATH_ROOT . $imagePath)) {
                     vmError('Vendor image missing ' . $imagePath);
                 } else {
                     $pdf->SetHeaderData($imagePath, 60, $view->vendor->vendor_store_name, $view->vendorAddress);
                 }
             }
         }
     }
     // set header and footer fonts
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 10));
     // set default monospaced font
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     //set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     //set auto page breaks
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     //set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     //TODO include the right file (in libraries/tcpdf/config/lang set some language-dependent strings
     $l = '';
     $pdf->setLanguageArray($l);
     // set default font subsetting mode
     $pdf->setFontSubsetting(true);
     // Set font
     // dejavusans is a UTF-8 Unicode font, if you only need to
     // print standard ASCII chars, you can use core fonts like
     // helvetica or times to reduce file size.
     $pdf->SetFont('helvetica', '', 8, '', true);
     // Add a page
     // This method has several options, check the source code documentation for more information.
     $pdf->AddPage();
     // Set some content to print
     // $html =
     // Print text using writeHTMLCell()
     $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
     // Close and output PDF document
     // This method has several options, check the source code documentation for more information.
     $pdf->Output($path, 'F');
     return $path;
 }
        // Data
        $fill = 0;
        for ($i = 0; $i < $this->ore; $i++) {
            reset($materie);
            $this->Cell($w[0], 6, $this->inizio_ore[$i + 1], 'LR', 0, 'C', $fill);
            $this->Cell($w[1], 6, $materie[$orario_classe->getMateria($classe, "Gio", $i + 1)][0] != "Scegli" ? $materie[$orario_classe->getMateria($classe, "Gio", $i + 1)][0] : "--", 'LR', 0, 'C', $fill);
            $this->Cell($w[2], 6, $materie[$orario_classe->getMateria($classe, "Ven", $i + 1)][0] != "Scegli" ? $materie[$orario_classe->getMateria($classe, "Ven", $i + 1)][0] : "--", 'LR', 0, 'C', $fill);
            $this->Cell($w[3], 6, $materie[$orario_classe->getMateria($classe, "Sab", $i + 1)][0] != "Scegli" ? $materie[$orario_classe->getMateria($classe, "Sab", $i + 1)][0] : "--", 'LR', 0, 'C', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($author);
$pdf->SetTitle($_SESSION['__classe__']->to_string());
// set default header data
$pdf->SetHeaderData("", 0, "Scuola Media Statale \"Arborea - Lamarmora\" - secondaria di primo grado", "Via Isonzo, 5 - Iglesias (CI)");
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', 8.0));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', 8.0));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
Example #22
0
        $logoEmizor = base64_decode('/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wgARCABkABsDAREAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAABgcAAQUIBP/EABsBAAICAwEAAAAAAAAAAAAAAAUGAQIABAcD/9oADAMBAAIQAxAAAAHqiIwdsdu6pGZkrCMbEJjBGYuGmatVFNXPzUaeYAVjq1Uw0opaNOHYVhr0omGhHKBxdgB2KshFtiAxwjQXaBmojmp45c3FxzOhLDMojW3njHAtpXoFqnFIyJh2GYd/VIqFiTcj30RkoJ6QRumphpSTsMwKVmS38mdEWx1bwfcdib+h0Uk9M9nh7y0zJmU//8QAIxAAAgEEAgICAwAAAAAAAAAABAUDAAECBhAREhMUNSAxQf/aAAgBAQABBQLulbmJtj3XfDuwIrLXIvAHgMuLXyNNFkHXVf8ASbac/dqx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AAAAAAAAAAAAAUnNsdFVudEYjUHhsQFIAAAAAAAAAAAAKdmVjdG9yRGF0YWJvb2wBAAAAAFBnUHNlbnVtAAAAAFBnUHMAAAAAUGdQQwAAAABMZWZ0VW50RiNSbHQAAAAAAAAAAAAAAABUb3AgVW50RiNSbHQAAAAAAAAAAAAAAABTY2wgVW50RiNQcmNAWQAAAAAAAAAAABBjcm9wV2hlblByaW50aW5nYm9vbAAAAAAOY3JvcFJlY3RCb3R0b21sb25nAAAAAAAAAAxjcm9wUmVjdExlZnRsb25nAAAAAAAAAA1jcm9wUmVjdFJpZ2h0bG9uZwAAAAAAAAALY3JvcFJlY3RUb3Bsb25nAAAAAAA4QklNA+0AAAAAABAASAAAAAEAAgBIAAAAAQACOEJJTQQmAAAAAAAOAAAAAAAAAAAAAD+AAAA4QklNBA0AAAAAAAQAAAAeOEJJTQQZAAAAAAAEAAAAHjhCSU0D8wAAAAAACQAAAAAAAAAAAQA4QklNJxAAAAAAAAoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAADhCSU0ECAAAAAAAEAAAAAEAAAJAAAACQAAAAAA4QklNBB4AAAAAAAQAAAAAOEJJTQQaAAAAAANpAAAABgAAAAAAAAAAAAAALwAAAC8AAAAaAGwAbwBnAG8ALQBlAG0AaQB6AG8AcgAtAGEAaQByAHAAYQBwAGUAcgBfADAAOABfADAAOAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAALwAAAC8AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAG51bGwAAAACAAAABmJvdW5kc09iamMAAAABAAAAAAAAUmN0MQAAAA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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/uAA5BZG9iZQBkQAAAAAH/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAgICAgICAgICAgMDAwMDAwMDAwM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K9p/ca69r+bY+ZIbVri1NvLDNCGVPFRhqRdZV9GmdInLKCaKVyGIMC/eO9j7L3/APbaXkebcUsdyS+trm2umSSVbeSJ9ErmFJYPH1WktzEscjhPEkSXDxoyq748/Gzqv4x7FpNi9X4FKGLRBLn9xVniqNz7vykUZR8tuLKLFG9TO7MxjhQR0tKrlIIo09Psr579wOZvcXe5N65kvS7VPhRLUQwIT8ESVNABQFjV3wXZjnoTe0Xs1yJ7J8rQcr8j7SsSFVNxcPRrm7lUU8W4lABdiSxVAFiiDFYY0Tt6e9u9CdS7S7BynaG2tk4fC7xy9A9BV1tBCYKVBUSmWtraPFowx2PyWR4WpqII45JlBDE65C6O/wCduaN02G35b3Dd5ZtpjkDhWNWwKKrOe5kTiiMSFNKDtUKc7V7Z8j7HzRe85bRy7Bb7/cRFGdBpXuJLssY/TSSThI6KrOK6j3MWGH2Feh31737r3X//1N/j37r3Xvfuvde9+691737r3Xvfuvde9+691//Z');
        $html = '<hr><table border="0">
			<tr>
			<td align="center">Sistema de facturaci&oacute;n brindado por <a href="www.emizor.com">www.emizor.com</a></td>
			</tr>
			<tr>
			<td width="578" align="center">Pág ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages() . '</td>
			</tr>
			</table>';
        $this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
        $this->Image('@' . $logoEmizor, '7', '128', 4, 12, '', 'www.emizor.com', 'T', false, 300, '', false, false, 0, false, false, false);
        $this->Image('@' . $emizorAvion, '145', '265', 5, 8, '', 'www.emizor.com', 'T', false, 300, '', false, false, 0, false, false, false);
    }
}
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('ipxserver');
$pdf->SetTitle('Nota de Entrega');
$pdf->SetSubject('Primera Nota');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set margins
$pdf->SetMargins(15, 20, 15);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// borra la linea de arriba en el area del header
$pdf->setPrintHeader(false);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set some language-dependent strings (optional)
if (@file_exists('/includes/tcpdf/examples/lang/spa.php')) {
Example #23
0
    {
        //get the current page break margin
        $bMargin = $this->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $this->AutoPageBreak;
        // disable auto-page-break
        $this->SetAutoPageBreak(false, 0);
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $this->setPageMark();
    }
}
// create new PDF document
$custom_layout = array(80, $totalProductos * 8.300000000000001 + 162);
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, $custom_layout, true, 'UTF-8', false);
//SET DOCUMENT INFORMATION
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Recaudacion');
$pdf->SetTitle('Programa de Servicio de Salud');
$pdf->SetSubject('Detalle programa paciente');
$pdf->SetKeywords('Paciente, PSS, Programa');
//$pdf->SetHeaderData('../../img/logo.jpg', PDF_HEADER_LOGO_WIDTH,'SERVICIO DE SALUD ARICA ','HOSPITAL REGIONAL DE ARICA Y PARINACOTA');
$pdf->setHeaderFont(array('helvetica', '', 18));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(4, 5, 5, 1);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(0);
$pdf->SetAutoPageBreak(TRUE, 0);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $this->SetFont('freesans', '', 7);
        $this->MultiCell(160, 0, $fiscalData, $border, 'L', false, 0, $x_padding, 19);
        $this->MultiCell(75, 0, api_text("module-diary_export-title"), $border, 'R', false, 0, 200, 19);
    }
    // footer
    public function Footer()
    {
        $this->setY(-12);
        $this->SetFont('freesans', '', 6, '', true);
        $this->Cell(0, 3, mb_strtoupper(api_text("module-diary_export-page"), 'UTF-8') . " " . $this->getAliasNumPage() . " " . mb_strtoupper(api_text("module-diary_export-pageOf"), 'UTF-8') . " " . $this->getAliasNbPages(), 0, 0, 'L', 0);
        $this->Cell(0, 3, mb_strtoupper(api_text("module-diary_export-footer"), 'UTF-8') . " " . $training->datetraining, 0, 0, 'R', 0);
        //$this->Cell(0,3,mb_strtoupper(api_text("module-diary_export-footer"),'UTF-8')." ".$GLOBALS['module-diary']->number,0,0,'R',0);
    }
}
// create new pdf document
$pdf = new MYPDF('L', 'mm', 'A4', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
//$pdf->SetAuthor(api_account($training->addIdAccount)->name);
$pdf->SetTitle("Dettaglio allenamenti svolti");
//$pdf->SetSubject("Training nr. ".$training->number." - ".api_timestampFormat($request->timestamp,api_text("date")));
// header and footer
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
// set margins
$pdf->SetMargins(10, 30, 10);
$pdf->SetHeaderMargin(30);
$pdf->SetFooterMargin(10);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, 15);
// set font
Example #25
0
$end = isset($_GET['tanggal_so_end']) ? strval($_GET['tanggal_so_end']) : "";
$stmt = "select no_nis_sales as nis, nama_sales as nama, count(*) as total_so, sum(komisi) as komisi from komisi where cabang = '{$cabang}' AND tanggal_so BETWEEN '{$begin}' AND '{$end}' group by no_nis_sales";
$stmt2 = "select sum(komisi) as total from komisi where cabang = '{$cabang}' AND tanggal_so BETWEEN '{$begin}' AND '{$end}'";
$stmt1 = "select * from cabang where kode = '{$cabang}'";
foreach (tampilData($stmt1) as $dataCabang) {
}
class MYPDF extends TCPDF
{
    public function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(15, 10, 15);
$pdf->setPrintHeader(false);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
foreach (tampilData($stmt) as $grid) {
    $pdf->SetFont('helvetica', 'B', 9);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'SLIP KOMISI SALES', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', '', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'PT. LUXINDO RAYA', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', 'B', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->MultiCell(15, 7, "NIS", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'M');
Example #26
0
     public function Footer()
     {
         if ($this->PageNo() > 1) {
             //Position at 1.5 cm from bottom
             $this->SetY(-15);
             //Arial italic 8
             $this->SetFont('DejaVu Sans B', 'I', 8);
             //Text color in gray
             $this->SetTextColor(128);
             //Page number
             $this->Cell(0, 10, 'Stranica ' . $this->PageNo(), 0, 0, 'C');
         }
     }
 }
 // Prva stranica
 $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
 $pdf->AddFont("DejaVuSans", "", "DejaVuSans.php");
 $pdf->AddFont("DejaVuSans", "", "DejaVuSans-Bold.php");
 $pdf->AddPage();
 $pdf->SetY(100);
 $pdf->SetFont('DejaVuSans', '', 30);
 $pdf->Cell(190, 10, $imezad, 0, 0, 'C');
 $pdf->Ln();
 $pdf->SetFont('DejaVuSans', '', 16);
 $pdf->Cell(190, 10, $imepredmeta, 0, 0, 'C');
 $pdf->SetY(-90);
 $pdf->SetFont('DejaVu Sans', '', 12);
 $pdf->Cell(40, 10, 'Student:');
 $pdf->SetFont('DejaVu Sans B', '', 12);
 $pdf->Cell(24, 10, $ime . ' ' . $prezime, 0, 0, 'C');
 $pdf->Ln();
        // Title
        $this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');
    }
    // Page footer
    public function Footer()
    {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 003');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
Example #28
0
        // $this->Cell(30, 0, 'Halbjahr', 0, 0, 'C', 0, '', 0, false, 'C', 'C');
        // $this->Cell(0, 0,  , 0, 1, 'R', 0, '', 0, false, 'C', 'C');
    }
    // Page footer
    public function Footer()
    {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        // $this->Cell(0, 10, 'Seite 1 von 2 ', 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('von-Buelow-Gymnasium');
$pdf->SetTitle('Bemerkungen zur Lernentwicklung');
$pdf->SetSubject('');
$pdf->SetKeywords('');
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set marginsfile:///home/rft/Buelow/webform/auswertung
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, 25);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
    // Page footer
    public function Footer()
    {
        global $FOOTER_IMG;
        $LM = $this->getMargins()['left'];
        $RM = $this->getMargins()['right'];
        $HM = $this->getMargins()['header'];
        $FM = $this->getMargins()['footer'];
        $W = $this->getPageWidth() - $RM - $LM;
        $H = $this->getPageHeight() - $HM - $FM;
        $LEFT = $this->getMargins()['left'];
        $this->Image($FOOTER_IMG, $LEFT, $H, $W, '', 'png', '', 'T', true, 300, '', false, false, 0, true, false, false);
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Rafael Kueng');
$pdf->SetTitle('LISA Symposium 2016 Attendance Letter');
$pdf->SetSubject('LISA Symposium 2016 Attendance Letter');
$pdf->SetKeywords('LISA,Symposium,2016,attendance');
// set header and footer fonts
$pdf->setHeaderFont(array("helvetica", '', "12"));
$pdf->setFooterFont(array("helvetica", '', "12"));
// set default monospaced font
$pdf->SetDefaultMonospacedFont("courier");
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
Example #30
0
        $this->MultiCell(75, 10, $summary, 0, 'L', 0, 1, '', '', true, 0, false, true, 20, 'B');
    }
    // Page footer
    public function Footer()
    {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        $this->MultiCell(0, 5, "Via Angelelli 14/a - 40013 Castel Maggiore (BO) Tel.: +39 051 6325815", 0, 'C', 0, 0, '', '', true, 0, false, true, 0, 'M');
        // Page number
        $this->Cell(0, 5, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Contract by neiroc_');
$pdf->SetTitle('PDF');
$pdf->SetSubject('PDF');
$pdf->SetKeywords('PDF');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING, array(0, 64, 255), array(0, 64, 128));
$pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins