Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add copyright symbol in FPDF?

Tags:

php

fpdf

I want to add a cell in a generated PDF with a copyright symbol .But adding the cell output shows some unwanted symbol at the beginning. Need a solution on this.

function Footer {
$this->SetTextColor(96,96,96);
$this->SetFont('Times','B',12);
$this->Cell(0,5,'abc Limited',0,2,'C',0);
$this->Cell(50,5,'',0,2,'C',0);
$this->Cell(0,5,'this is address',0,2,'C',0);
$this->Cell(188,5,'','B',1,'c',0);  
$this->Cell(50,5,'',0,2,'C',0); 
$this->Cell(0,5,  '©All rights reserved abc Ltd',0,1,'C',0);
}
like image 474
rahman_akon18 Avatar asked Sep 14 '25 18:09

rahman_akon18


1 Answers

I tried the "&#169" suggestion and all it showed was literally "&#169", so I tried some other options. Just simple chr worked fine...

$this->Cell(0, 5, chr(169) . ' All rights reserved, etc', 0, 1, 'C', 0);
like image 86
xtempore Avatar answered Sep 16 '25 11:09

xtempore