Beispiel #1
0
function init_pdf($pagesize, $orientation, $title)
{
    global $layout;
    $pdf = new LMSTCPDF($orientation, PDF_UNIT, $pagesize, true, 'UTF-8', false, false);
    $pdf->invoice_type = ConfigHelper::getConfig('invoices.template_file');
    $pdf->SetProducer('LMS Developers');
    $pdf->SetSubject($title);
    $pdf->SetCreator('LMS ' . $layout['lmsv']);
    $pdf->SetDisplayMode('fullwidth', 'SinglePage', 'UseNone');
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    $pdf->setLanguageArray($l);
    /* disable font subsetting to improve performance */
    $pdf->setFontSubsetting(false);
    $pdf->AddPage();
    return $pdf;
}