Exemplo n.º 1
0
/**
 * PDF Catalog View
 *  
 * @license GPLv3
 * 
 * @since       4.0.1
 * @package     eduTrac SIS
 * @author      Joshua Parker <*****@*****.**>
 */
$app = \Liten\Liten::getInstance();
$app->view->extend('_layouts/blank');
$app->view->block('blank');
// create new PDF document
$pdf = new \app\src\tcpdf\Tcpdf('landscape', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetTitle($catalog[0]['termCode'] . ' Course Catalog');
// set default header data
$pdf->SetHeaderData("", "", $catalog[0]['termCode'] . ' Course Catalog', "");
// set header and footer fonts
$pdf->setHeaderFont(array('freesans', '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array('freesans', '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, "20", PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin("12");
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// ---------------------------------------------------------