i am creating an invoice application and using fpdf and https://github.com/farjadtahir/pdf-invoicr pdf-invoicr class. Its working fine but now i have multi line content in database like address, when i am saving the textarea content from form it will save with br tag,
nl2br(htmlentities($address, ENT_QUOTES, 'UTF-8'));
When it passes to fpdf cell attribute it displaying with br tag, the i use
str_ireplace('<br />', "\r\n", $address);
Even after it not displaying in new line, just replacing br with space. Is there any way to print value in multi line inside cell
foreach($this->items as $item)
{
$cHeight = $cellHeight;
$this->SetFont($this->font,'b',8);
$this->SetTextColor(50,50,50);
$cbgcolor = explode(",",$item['cbgcolor']);
$this->SetFillColor($cbgcolor[0],$cbgcolor[1],$cbgcolor[2]);
$this->Cell(1,$cHeight,'',0,0,'L',1);
$x = $this->GetX();
$this->Cell($this->firstColumnWidth,$cHeight,iconv("UTF-8", "ISO-8859-1",$item['item']),0,0,'L',1);
$this->SetTextColor(50,50,50);
$this->SetFont($this->font,'',8);
$this->Cell($this->columnSpacing,$cHeight,'',0,0,'L',0);
$this->Cell($this->secondColumnWidth,$cHeight,$item['quantity'],0,0,'L',1);
$this->Cell($this->columnSpacing,$cHeight,'',0,0,'L',0);
$this->Cell($this->priceColumnWidth,$cHeight,iconv('UTF-8', 'windows-1252', $this->currency.' '.number_format($item['price'],2,$this->referenceformat[0],$this->referenceformat[1])),0,0,'C',1);
$this->Cell($this->columnSpacing,$cHeight,'',0,0,'L',0);
$this->Cell($this->priceColumnWidth,$cHeight,iconv('UTF-8', 'windows-1252', $this->currency.' '.number_format($item['total'],2,$this->referenceformat[0],$this->referenceformat[1])),0,0,'C',1);
$this->Ln();
$this->Ln($this->columnSpacing);
}
This is my body..for $item['quantity'] have multi line content. where i am printing values as a table.so when i use multicell in one column the layout is changing and not look good.