Jump to content

PDF question plus php-how to make size of column dynamic


fansa

Recommended Posts

I got some problem to make dynamic the column of data..

once the data long..the display at pdf will ugly..

my coading is like this(focut at column specification)

for($i=0;$i<$sizeArr;$i++)

{

$amunt=$price[$i]*$qty_db[$i];

$pdf->Cell($wide_item,$row_height,$i+1,1,0,'C',0);

$pdf->Cell($wide_acc_cd,$row_height,$account_codedb[$i],1,0,'C',0);

$pdf->Cell($wide_specification,$row_height,$spec_db[$i],1,0,'L',0);

                                  $pdf->Cell($wide_unit,$row_height,$unit_db[$i],1,0,'C',0);

$pdf->Cell($wide_quantity,$row_height,$qty_db[$i],1,0,'C',0);

$pdf->Cell($wide_unit_price,$row_height,number_format($price[$i],2,".",","),1,0,'C',0);

$pdf->Cell($wide_unit_price2,$row_height,number_format($amunt,2,".",","),1,0,'C',0);

$totalamaunt=$totalamaunt+$amunt;

//$y_axis_initial = 100;

$pdf->SetY($y_axis_initial);

$row_height2 =10;

$y_axis_initial = $y_axis_initial + $row_height2;

$pdf->setXY(15,$y_axis_initial);

Next_Page($pdf);

 

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.