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', );
Thank you. OSexplorer

In reply to Re^2: Dynamic text (amount in decimal) not aligned on PDF by osexplorer
in thread Dynamic text (amount in decimal) not aligned on PDF by osexplorer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.