// 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); // --------------------------------------------------------- // set font $pdf->SetFont('freesans', '', 8); // column titles $table = '<table cellpadding="2" cellspacing="2" border="0" class="table table-striped" id="table-example">'; $table .= '<thead><tr>'; $table .= '<th><b>' . _t('Course Section') . '</b></th>'; $table .= '<th style="width:125px;"><b>' . _t('Title') . '</b></th>'; $table .= '<th><b>' . _t('Instructor') . '</b></th>'; $table .= '<th><b>' . _t('Credits') . '</b></th>'; $table .= '<th><b>' . _t('Days') . '</b></th>'; $table .= '<th><b>' . _t('Time') . '</b></th>'; $table .= '<th><b>' . _t('Location') . '</b></th>';