Search code examples
phphtmlfpdf

How to render HTML tag to php using fpdf


How to render html on my FPDF file? the content always showing strings with HTML tags for example if I input like this

View picture for sample

the output will be like this

view picture for sample

I tried strip_tags() like below to output the content without tags but the HTML shows no effect/rendering.

strip_tags($item['output'])

What can you suggest me to use?


Solution

  • You should use WriteHTML() method.

    See http://www.fpdf.org/en/script/script42.php