How about adding a Chunk to the end of a positive number that contains a ")"
character and make the font.color = color.white?

 

That way the "padding" at the end would always be exactly the same as the
"}" that shows for the negative numbers.

 

If you are putting these numbers in a PdfPTable, you could use two different
PdfPCell's with different padding for the right to offset a positive number.

 

Rick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Newman,
Reece
Sent: Thursday, January 11, 2007 5:36 PM
To: [email protected]
Subject: [iText-questions] FW: How can one format negative numbers
byenclosing them in parentheses instead of preceding them witha minus sign?

 

Please see question below.

 

  _____  

From: Newman, Reece 
Sent: Thursday, January 11, 2007 3:43 PM
To: '[email protected]'
Subject: How can one format negative numbers by enclosing them in
parentheses instead of preceding them with a minus sign?

 

Bruno or Paulo:

 

How can one format negative numbers by enclosing them in parentheses instead
of preceding them with a minus sign?  I am using iText to generate Financial
Reports and the decimal points of both positive and negative numbers must
line up when they are displayed in the same column.  How can I format
negative numbers with parentheses and still have their decimal points line
up with those of positive numbers in the same columns?  I have tried adding
a space (" ") to the end of positive numbers, but it seems to get stripped
from the pdf document.  Any ideas?

 

Regards,

 

Reece Newman

Manager - Development

ADP Lightspeed

Salt Lake City, UT

USA

  _____  

This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by e-mail
and delete the message and any attachments from your system. 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to