Dear gurus,

I have trouble printing invoice, I manage to print the list of goods in PDF, but the alignemnt kinda mess

//qty goods

$ContPosY1=62;

$qty_prod = [qtybrg];

$arr_qty_prod = explode(".",$qty_prod);

foreach($arr_qty_prod as $typeName){

$pdf->SetXY(30, $ContPosY1);

$pdf->Write(0, $typeName, ‘’, 0, ‘R’, true, 0, false, false, 0);

$ContPosY1+=4;

}

//price goods

$ContPosY2=62;

$price_prod = [pricebrg];

$arr_price_prod = explode(".",$price_prod);

foreach($arr_price_prod as $typeName2){

$pdf->SetXY(20, $ContPosY2);

$pdf->Write(0, $typeName2, ‘’, 0, ‘R’, true, 0, false, false, 0);

$ContPosY2+=4;

}

//price*qty

$ContPosY3=62;

$tot_prod = [totprice];

$arr_tot_prod = explode(".",$tot_prod);

foreach($arr_tot_prod as $typeName3){

$pdf->SetXY(30, $ContPosY3);

$pdf->Write(0, $typeName3, ‘’, 0, ‘R’, true, 0, false, false, 0);

$ContPosY3+=4;

}

Now the price, qty and subtotal align to right alltogether. how can I do align right for each row as normal

thanks