Post Reply 
Thread Rating:
  • 0 Votes - 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.)
Post: #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!

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/ 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');
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: PDF text justification on 4.13.1 - BobThomas - 02-09-2017 03:36 AM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)