Welcome Guest, Not a member yet? Register   Sign In
Problem tcpdf Code Ignited with css

I need help,
how to make pdf from html files on the fly to support css?,
i try tcpdf, but i found problem in css/style
my code like this

(<td style=\"border:#ff0000 solid 1px\">)
cant show/display border...
help me... with your solution to create pdf from html



$this->load->plugin( 'tcpdf' );

$pdf = tcpdf();

// set document information


$pdf->SetAuthor("Nicola Asuni");

$pdf->SetTitle("TCPDF Example 002");

$pdf->SetSubject("TCPDF Tutorial");

$pdf->SetKeywords("TCPDF, PDF, example, test, guide");

// set default header data


// set header and footer fonts

$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));

$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));

//set margins


//set auto page breaks

$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);

//set image scale factor


//initialize document


// add a page


// ---------------------------------------------------------

// set font

$pdf->SetFont("dejavusans", "BI", 20);

// print a line using Cell()

//$pdf->Cell(0,10,"Example 002",1,1,'C');



<td style=\"border:#ff0000 solid 1px\">

<table border=1>";


$html.=" <tr>

<td style=\"border:#ff0000 solid 1px\">








$html.=" <tr>









$pdf->writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='');

// ---------------------------------------------------------

//Close and output PDF document

$pdf->Output("example_002.pdf", "I");


Messages In This Thread
Problem tcpdf Code Ignited with css - by El Forum - 02-15-2010, 08:20 PM

Theme © iAndrew 2016 - Forum software by © MyBB