Ejemplo n.º 1
0
 $formatter->send_header();
 $formatter->send_page('', array('fixpath' => 1));
 print '</body></html>';
 $html = ob_get_contents();
 ob_end_clean();
 # begin
 $pdf = new XTCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, $DBInfo->charset);
 include_once 'function/toc.php';
 $toc = function_toc($formatter);
 $pdf->toc = $toc;
 $pdf->setFontAlias(array('monospace' => 'courier'));
 #$pdf->setLIsymbol(chr(42));
 #$pdf->setLIsymbol('a');
 // set default header data
 // $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
 $pdf->SetHeaderData($DBInfo->logo_img, 20, $formatter->page->name);
 $pdf->SetTitle($formatter->page->name);
 # $pdf->SetAuthor('Your name');
 $pdf->SetCreator('TCPDF/MoniWiki');
 $pdf->SetSubject($formatter->page->name);
 if (!empty($formatter->pi['#keywords'])) {
     $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