mPDF in CodeIgniter Seitenausrichtung nicht tun Landschaft

Ich bin mit mPDF in CodeIgniter.

hier ist mein lib (pdf.php)

class pdf {
    function pdf()
    {
        $CI = & get_instance();
        log_message('Debug', 'mPDF class is loaded.');
    }

    function load($param=NULL)
    {
        include_once APPPATH.'/third_party/mpdf/mpdf.php';
        if ($params == NULL)
        {
            $param = '"en-GB-x","A4","","",10,10,10,10,6,3,"L"';
        }
        return new mPDF($param);
    }
}

dies ist mein controller

$filename = 'qwerty';
//...
//As PDF creation takes a bit of memory, we're saving the created file in /downloads/reports/
$pdfFilePath = FCPATH."reports\\"   . $filename . ".pdf";
//$data['page_title'] = 'Hello world'; //pass data to the view
for($i=0;$i>=0;$i++)
{
    if(file_exists($pdfFilePath) == TRUE)
    {
        $pdfFilePath = FCPATH."reports\\"   . $filename . $i . ".pdf";
    } else {
        break 1;
    }
}
ini_set('memory_limit','32M');
$html = $this->load->view('certificate/certificate', $isi,TRUE); //render the view into HTML
$this->load->library('pdf');
$pdf = $this->pdf->load($param);
\$pdf = $this->pdf->load();
$pdf->SetFooter($_SERVER['HTTP_HOST'].'|{PAGENO}|'.date(DATE_RFC822));
$pdf->WriteHTML($html);
$pdf->Output($pdfFilePath, 'F'); //save to file because we can

sogar mit, dass config ($param), ist das Ergebnis immer noch mir portrait-Datei, so, CSS ist innen ziemlich versaut.

Was soll ich tun?

InformationsquelleAutor HenryJahja | 2013-07-30

Schreibe einen Kommentar