Okay, so I'm really struggling to understand why trying to get a new line from a HTML source to display as a new line in the PDF generated by TCPDF won't work.
Before anyone says that it's because the line breaks are HTML elements, I'm already trying to replace the variable using str_replace.
Here's a snippet from the code:
Code
$needles = array("<br>", "<br />", "<br/>", "
");
$replacement = " ";
$p_long_desc = str_replace($needles, $replacement, $p_long_desc);
An example of $p_long_desc could be something like the below:
"Hello World,
My name is
Joe"
$pdf->SetFont('myriadpro', '', 9);//set font
$pdf->SetTextColor(0, 0, 0); //font colour
$p_long_desc.= " <a href=\"$p_web_address\">Read More</a>";
$pdf->writeHTMLCell(179.334, 16.933, $x+15.167, $y+123.114,$p_long_desc,0,0,false,true,'',true);
($p_web_address is being parsed from an external source)
Why then, when I output my PDF, I don't see the new lines as they should be?