<commit_before><?php
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {

    public function setSchemeName($header,$logo) {
	$this->header = $header;
	$this->logo = $logo;
    }
    
    //Page header
    public function Header() {
        // Logo
        if(trim($this->logo)!="" && file_exists(UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo'. DIRECTORY_SEPARATOR.$this->logo)){
	    $image_file = UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo'. DIRECTORY_SEPARATOR.$this->logo;
	    $this->Image($image_file, 12,3,20, '', 'PNG', '', 'T', false, 300, 'L', false, false, 0, false, false, false);
	}
        // Set font
        $this->SetFont('helvetica', 'B', 12);
        // Title
        $this->writeHTMLCell(0,'',33,10,$this->header,0,1,false,true,'C',true);
        $this->writeHTMLCell(180,'',15,20,'<br/><br/><br/>',0,1,false,true,'C',true);
    }

    // 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);

$pdf->setSchemeName(ucwords($configData['header']),$configData['logo']);

// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('<NAME>');
$pdf->SetTitle('SPI-RT Checklist');
$pdf->SetSubject('SPI-RT 3.0 Checklist');

// 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);

// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
    require_once(dirname(__FILE__).'/lang/eng.php');
    $pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

// set font
$pdf->SetFont('times', '', 10);

// add a page

$pdf->AddPage('L');

if($argument['dateRange']==''){
}if($argument['auditRndNo']==''){
    $argument['auditRndNo'] = "All";
}if($argument['level']==''){
    $argument['level'] = "All";
}if($argument['affiliation']==''){
    $argument['affiliation'] = "All";
}if($argument['province']==''){
    $argument['province'] = "All";
}if($argument['scoreLevel']==''){
    $argument['scoreLevel'] = "All";
}if($argument['testPoint']==''){
    $argument['testPoint'] = "All";
}
$filter = '';
$filter.= "<tr><td><b>Date Range </b></td><td>&nbsp;&nbsp;".$argument['dateRange']."</td><td><b>Audit Round No. </b></td><td>&nbsp;&nbsp;".$argument['auditRndNo']."</td><td><b>Level </b></td><td>&nbsp;&nbsp;".$argument['level']."</td><td><b>Affiliation </b></td><td>&nbsp;&nbsp;".$argument['affiliation']."</td></tr>";
$filter.= "<tr><td><b>Province </b></td><td>&nbsp;&nbsp;".implode(',',$argument['province'])."</td><td><b>Score Level </b></td><td>&nbsp;&nbsp;".$argument['scoreLevel']."</td><td><b>Type Of Testing Point </b></td><td>&nbsp;&nbsp;".$argument['testPoint']."</td></tr>";
$partA = '';
$partA.='<table border="1" style="line-height:22px;width:97%;" >'.$filter.'</table>';
$pdf->writeHTML($partA, true, 0, true, 0);
$h = $pdf->getY();

if($h<52)
{
    $style1 = "height:450px;width:500px;";
    $style2 = "height:440px;width:450px;";
}else{
    $diff = $h-52;
    $h1 = 450-($diff*3.5);
    $h2 = 440-($diff*3.5);
    $style1 = "height:".$h1."px;width:500px;";
    $style2 = "height:".$h2."px;width:450px;";
}
$pdfContent = '';
$pdfContent .= '<table style="background-color:#fff;margin-bottom:20px;width:100%;">';
    $pdfContent .= '<tr>';
        $pdfContent .='<td><img style="'.$style1.'" src="'.$this->basePath('temporary/radar.png').'" alt="PDF" /></td>';
        $pdfContent .='<td><img style="'.$style2.'" src="'.$this->basePath('temporary/piechart.png').'" alt="PDF" /></td>';
    $pdfContent .= '</tr>';
$pdfContent .= '</table>';
<commit_msg>increasedlitle bit height in spiv3 form.<commit_after><?php
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {

    public function setSchemeName($header,$logo) {
	$this->header = $header;
	$this->logo = $logo;
    }
    
    //Page header
    public function Header() {
        // Logo
        if(trim($this->logo)!="" && file_exists(UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo'. DIRECTORY_SEPARATOR.$this->logo)){
	    $image_file = UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo'. DIRECTORY_SEPARATOR.$this->logo;
	    $this->Image($image_file, 12,3,20, '', 'PNG', '', 'T', false, 300, 'L', false, false, 0, false, false, false);
	}
        // Set font
        $this->SetFont('helvetica', 'B', 12);
        // Title
        $this->writeHTMLCell(0,'',33,10,$this->header,0,1,false,true,'C',true);
        $this->writeHTMLCell(180,'',15,20,'<br/><br/><br/>',0,1,false,true,'C',true);
    }

    // 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);

$pdf->setSchemeName(ucwords($configData['header']),$configData['logo']);

// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('<NAME>');
$pdf->SetTitle('SPI-RT Checklist');
$pdf->SetSubject('SPI-RT 3.0 Checklist');

// 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);

// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
    require_once(dirname(__FILE__).'/lang/eng.php');
    $pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

// set font
$pdf->SetFont('times', '', 10);

// add a page

$pdf->AddPage('L');

if($argument['dateRange']==''){
}if($argument['auditRndNo']==''){
    $argument['auditRndNo'] = "All";
}if($argument['level']==''){
    $argument['level'] = "All";
}if($argument['affiliation']==''){
    $argument['affiliation'] = "All";
}if($argument['province']==''){
    $argument['province'] = "All";
}if($argument['scoreLevel']==''){
    $argument['scoreLevel'] = "All";
}if($argument['testPoint']==''){
    $argument['testPoint'] = "All";
}
$filter = '';
$filter.= "<tr><td><b>Date Range </b></td><td>&nbsp;&nbsp;".$argument['dateRange']."</td><td><b>Audit Round No. </b></td><td>&nbsp;&nbsp;".$argument['auditRndNo']."</td><td><b>Level </b></td><td>&nbsp;&nbsp;".$argument['level']."</td><td><b>Affiliation </b></td><td>&nbsp;&nbsp;".$argument['affiliation']."</td></tr>";
$filter.= "<tr><td><b>Province </b></td><td>&nbsp;&nbsp;".implode(',',$argument['province'])."</td><td><b>Score Level </b></td><td>&nbsp;&nbsp;".$argument['scoreLevel']."</td><td><b>Type Of Testing Point </b></td><td>&nbsp;&nbsp;".$argument['testPoint']."</td></tr>";
$partA = '';
$partA.='<table border="1" style="line-height:22px;width:97%;" >'.$filter.'</table>';
$pdf->writeHTML($partA, true, 0, true, 0);
$h = $pdf->getY();

if($h<52)
{
    $style1 = "height:470px;width:500px;";
    $style2 = "height:460px;width:450px;";
}else{
    $diff = $h-52;
    $h1 = 450-($diff*3.5);
    $h2 = 440-($diff*3.5);
    $style1 = "height:".$h1."px;width:500px;";
    $style2 = "height:".$h2."px;width:450px;";
}
$pdfContent = '';
$pdfContent .= '<table style="background-color:#fff;margin-bottom:20px;width:100%;">';
    $pdfContent .= '<tr>';
        $pdfContent .='<td><img style="'.$style1.'" src="'.$this->basePath('temporary/radar.png').'" alt="PDF" /></td>';
        $pdfContent .='<td><img style="'.$style2.'" src="'.$this->basePath('temporary/piechart.png').'" alt="PDF" /></td>';
    $pdfContent .= '</tr>';
$pdfContent .= '</table>';

{'fraction_non_alphanumeric': 0.255396077572039, 'fraction_numerical': 0.021365180234469157, 'mean_word_length': 4.469143199520671, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 199, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3401395', 'n_tokens_mistral': 3492, 'n_tokens_neox': 3320, 'n_words': 521}