Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDF text justification on 4.13.1
02-09-2017, 03:36 AM, (This post was last modified: 02-09-2017, 03:47 AM by BobThomas.)
#6
RE: PDF text justification on 4.13.1
(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');


Reply


Messages In This Thread
PDF text justification on 4.13.1 - by PakRicard - 01-24-2017, 10:39 AM
RE: PDF text justification on 4.13.1 - by phil - 01-25-2017, 06:37 AM
RE: PDF text justification on 4.13.1 - by BobThomas - 02-09-2017, 03:36 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)