How do I get the color of a font used to create a phrase?
// in the statement decorator
Phrase footer = new Phrase(String.format(FOOTER, phone, email),
Fonts.RED);
statement.addPhrase(footer, 130, 275f);
// in the statement class
public void addPhrase(Phrase phrase, float x, float y) {
String text = phrase.getContent();
canvas.saveState();
canvas.setColorStroke(Colors.BLACK);
// fails - canvas.setColorStroke(phrase.getFont().getColor());
// phrase.getFont().getColor() returns null
canvas.beginText();
canvas.moveText(x, y);
canvas.setFontAndSize(phrase.getFont().getBaseFont(),
phrase.getFont().getSize());
canvas.showText(text);
canvas.endText();
canvas.restoreState();
}
***This is a transmission from Purdue Employees Federal Credit
Union (PEFCU) and is intended solely for its authorized
recipient(s), and may contain information that is confidential
and or legally privileged. If you are not an addressee, or the
employee or agent responsible for delivering it to an addressee,
you are hereby notified that any use, dissemination,
distribution, publication or copying of the information
contained
in this email is strictly prohibited. If you have received this
transmission in error, please notify us by telephoning (765)
497-3328 or returning the email. You are then instructed to
delete the information from your computer. Thank you for your
cooperation.***
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/