Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDF text justification on 4.13.1
01-24-2017, 10:39 AM
Post: #1
PDF text justification on 4.13.1
Hi all:

Since 4.13.1 all PDF changed the way some texts were justified. It used to be flush left but now it's justified to both margins.
I think it should be reverted to previous flush left as now it is quite difficult to read most of the texts.
Please check attached file (an image is worth a thousand words).


Attached File(s) Thumbnail(s)
   

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
01-24-2017, 06:46 PM
Post: #2
RE: PDF text justification on 4.13.1
I think it was this commit

https://sourceforge.net/p/web-erp/code/7631/

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
01-24-2017, 06:57 PM
Post: #3
RE: PDF text justification on 4.13.1
Thanks Tim.

Exson (and all other developers): Is it OK if I roll back this commit, or you need to keep it?

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
01-25-2017, 06:37 AM
Post: #4
RE: PDF text justification on 4.13.1
Agreed - that looks like a mistake to me ... I think so!

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
02-06-2017, 05:28 PM
Post: #5
RE: PDF text justification on 4.13.1
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
Find all posts by this user
Quote this message in a reply
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!
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');
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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