(02-06-2017, 05:28 PM)Exsonqu_Qu Wrote: Hi, Richard,
It's a fix (infer by the text described). But I've overlooked that lots of the scripts based on this wrong function.
It's ok to roll it back. But we have to find other way to implement text justification.
Sorry for the late reply.
Best regards!
Exson
We are finding many problems throughout the scripts with respect to text alignment. We have made a small change to line 83 in /includes/class.pdf.php:
function addTextWrap($XPos, $YPos, $Width, $Height, $Text, $Align='left', $border=0, $fill=0) {
Making 'left' be the default justification.
We are finding that there are a lot of scripts where the alignment is incorrect. We are making changes as we find the errors. The above change corrected the majority.
We just made changes in /includes/PDFStockTransferHeader.inc to reasonably position the column headers starting at line 35 changing 'centre' to 'left':
$LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize, _('Item Number'), 'left');
$LeftOvers = $pdf->addTextWrap($Xpos+75,$YPos,300-$Left_Margin,$FontSize, _('Description'), 'left');
$LeftOvers = $pdf->addTextWrap($Xpos+250,$YPos,300-$Left_Margin,$FontSize, _('Transfer From'), 'left');
$LeftOvers = $pdf->addTextWrap($Xpos+350,$YPos,300-$Left_Margin,$FontSize, _('Transfer To'), 'left');
$LeftOvers = $pdf->addTextWrap($Xpos+450,$YPos,300-$Left_Margin,$FontSize, _('Quantity'), 'left');