improve the pdf exportation format

skala
Juan Carlos Raña 17 years ago
parent 4d1f853437
commit eb7846865f
  1. 17
      main/wiki/export_html2pdf.php

@ -36,6 +36,19 @@ $contentPDF=stripslashes(api_html_entity_decode($_POST['contentPDF'], ENT_QUOTES
$titlePDF=stripslashes(api_html_entity_decode($_POST['titlePDF'], ENT_QUOTES, $charset));
ob_start();//activate Output -Buffer
///////////////////////
?>
<page backtop="10mm" backbottom="10mm" footer="page">
<page_header>
<?php echo $titlePDF.'<br/><hr/>'?>
</page_header>
<page_footer>
<?php echo '<hr/>'; ?>
</page_footer>
</page>
<?php
/////////////////////
echo $contentPDF;
$htmlbuffer=ob_get_contents();// Store Output-Buffer in one variable
ob_end_clean();// delete Output-Buffer
@ -77,9 +90,7 @@ ob_end_clean();// delete Output-Buffer
//app.alert('Hello '+rep);
//";
$html2pdf = new HTML2PDF('P','A4',$langhtml2pdf, array(30,25,30,25));//array (margin left, margin top, margin right, margin bottom)
$html2pdf->pdf->SetMyFooter( 'page','','','' );//page, date, time, form
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf = new HTML2PDF('P','A4',$langhtml2pdf, array(30,10,30,10));//array (margin left, margin top, margin right, margin bottom)
//$html2pdf->pdf->IncludeJS($script);
//$html2pdf->pdf->IncludeJS("print(true);");
//$html2pdf->pdf->IncludeJS("app.alert('Generated by Dokeos to PDF');");

Loading…
Cancel
Save