Leonard Rosenthol wrote:

Are you saying that it is indeed possible to have the same kind of formatting in a flattened field?


Sure. Just treat the field as a "placeholder rectangle" of where you are you to place your formatted data.

Yesterday I posted some code to retrieve the coordinates of a button:
float[] barcodebutton = form.getFieldPositions("barcode");
Rectangle rect = new Rectangle(barcodebutton[1], barcodebutton[2],
 barcodebutton[3], barcodebutton[4]);
PdfContentByte cb = stamper.getOverContent((int)photograph[0]);

Index 0 gives you a page number; index 1, 2, 3 and 4 give you the coordinates.
See http://article.gmane.org/gmane.comp.java.lib.itext.general/22086

Then just draw it like you would anything else and get rid of the field when done.

Note that you can't just paste some RTF. Typically, you'd create a
ColumnText object, add all kinds of objects (Paragraph, List,...),
define the coordinates and go().
br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to