fansa Posted October 28, 2009 Share Posted October 28, 2009 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); } Link to comment https://forums.phpfreaks.com/topic/179299-pdf-question-plus-php-how-to-make-size-of-column-dynamic/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.