Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/wiki/export_html2pdf.php

28 lines
818 B

<?php
//Juan Carlos Raña export to pdf for Dokeos
include("../inc/global.inc.php");
api_block_anonymous_users();
require('../plugin/html2fpdf/html2fpdf.php');
$contentPDF=stripslashes(api_html_entity_decode($_POST['contentPDF'], ENT_QUOTES, $charset));
$titlePDF=stripslashes(api_html_entity_decode($_POST['titlePDF'], ENT_QUOTES, $charset));
//activate Output -Buffer:
ob_start();
////START-OF-PHP code
echo $contentPDF; //original
//END -OF- PHP code
//Output-Buffer in variable:
$htmlbuffer=ob_get_contents();
//// delete Output-Buffer:
ob_end_clean();
$pdf= new HTML2FPDF();
//$pdf->DisplayPreferences('FullScreen');
$pdf->AddPage();
$pdf->SetAuthor('Wiki Dokeos');
$pdf->SetTitle($titlePDF);
$pdf->SetKeywords('Dokeos Wiki');
$pdf->WriteHTML($htmlbuffer);
$pdf->Output();
?>