Ejemplo n.º 1
0
        $pdf->SetKeywords($keywords = $formatter->pi['#keywords']);
    }
    // load default font
    $pdf->AddFont($conf['default_unifont']);
    $pdf->SetFont($conf['default_font']);
    // set header and footer fonts
    // $pdf->setHeaderFont(Array($conf['default_unifont'], '', PDF_FONT_SIZE_MAIN));
    $pdf->setHeaderFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    //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 some language-dependent strings
    $pdf->setLanguageArray($l);
    //set image scale factor
    //$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    # initialize document
    $pdf->AliasNbPages();
    # add a page
    $pdf->AddPage();
    $pdf->Bookmark($formatter->page->name, 0, 0);
    #
    $pdf->writeHTML($html, true, 0, false, false);
    # output
    $pdf->output(date("Ymd", time()) . '.pdf', 'I');
    return;
}
// vim:et:sts=4: