Suneel Kumar Suneel Kumar - 1 year ago 68
CSS Question

how to generate pdf from ckeditor content along with data?

I am trying to generate pdf using TCPDF I have to parse dynamic data in pdf html table working fine.

App::import('Vendor', 'tcpdf');
$tcpdf = new TCPDF();
//$tcpdf->SetHeaderData($header_logo, $header_logo_width, $header_title,
$textfont = 'freesans';
$tcpdf->SetFont('dejavusans', '', 10, '', true);
$test = '
<table cellpadding="0" cellspacing="0" border="0">
<td style="height:20px"></td>
<td style="text-align:center;">Test Report</td>
<td height="1">&nbsp;</td>
$test.="--- Dynamic Data----";

$html = <<<EOF
$tcpdf->writeHTML($html, true, false, true, false, '');
$tcpdf->Output($filename, 'D');

The above code is working good, But When I parse CKEditor content along with dynamic content it's collapse. I have generate pdf with dynamic data with table format. There is one cell having CKEditor data (any data contents with html) When I was trying to generate pdf the Pdf design was collapse.
Is there any way to generate good format to generate pdf.

Answer Source

try to use MDFP which is a php class who generate pdf et see this video :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download