I have generated a pdf using fpdf library. The datas are exported to pdf document i want to set the width of the indivijual column cells how to do that
i know some thing has to be done here in this function to increase the width
function CalcWidths($width,$align)
{
//Compute the widths of the columns
$TableWidth=0;
foreach($this->aCols as $i=>$col)
{
$w=$col['w'];
if($w==-1)
$w=$width/count($this->aCols);
elseif(substr($w,-1)=='%')
$w=$w/100*$width;
$this->aCols[$i]['w']=$w;
$TableWidth+=$w;
}
if($align=='C')
$this->TableX=max(($this->w-$TableWidth)/2,0);
elseif($align=='R')
$this->TableX=max($this->w-$this->rMargin-$TableWidth,0);
else
$this->TableX=$this->lMargin;
}
what has to be changed
I have generated a pdf using fpdf library. The datas are exported to pdf
Share
Width can be assigned the fpdf like this,
But the field values extends then width also increases. Then use like this