Thank you RonW and poj! I forgot to mention in my post that am new to Perl (and have started loving it!), so please excuse me for stupid questions. I apologize for posting my complete code, but I want to make sure Monks are able to understand what I intend to do.
RonW I tried using fixed width font but it didn't work. I don't know if I did something wrong.
POJ, I think I partially understood your demo code, and have a question - the advancewidth method would help me in setting the x position of the data field or the width of it?
The code below is the amount field which I want to align right and should get placed under the amount field above it. The text_block method already has -align argument (set to justify) and changing this to right, places the entire text to the right of the page.
The amount fields on my PDF looks like this (a grid)- 400.00 has to right align with 10000.00:
Item Amount |
10000.00 |
Date Deposit |
11/17/2014 |
Amount Delayed |
400.00 |
Amount Delayed |
10.00 |
my $v_pos1 = 140 + $len_item_amt;
print $v_pos1."\n\n";
print "len item amt : ".$len_item_amt."\n\n";
print "len amt delayed1: ".$len_amt_delayed1."\n\n";
print "x position: $v_pos1-$len_amt_delayed1";
$left_column_text = $page->text;
$left_column_text->font( $font{'Arial'}{'Roman'}, 10 / pt );
$left_column_text->fillcolor('black');
( $endw, $ypos, $paragraph ) = text_block
(
$left_column_text,
$amt_delayed1,#'Amount Delayed data:',
-x => $v_pos1 - $len_amt_delayed1,#140 ,
-y => 405,#306,(This is last perfect position)
-w => 460,#441.5,
-h => 110,
-lead => 10 / pt,
-parspace => 0 / pt,
-align => 'justify',
);
|