Dan Adams wrote: > Okay, so I'm trying to produce a PDF of a greeting card that will be > sent to a printer. What I have is the dimensions of the card, what text > to put on the card, and then the exact coordinates of the area on the > card in which to put the text. So I need to create an area on the pdf at > the exact position specified and then take the text and center it > horizontally and vertically within that area. Anyone have any > suggestions on the best way to do this and how to get started? Thanks.
Put the text inside a ColumnText object. Then define the area and pretend to add the object (simulate = true). The ColumnText will give you info on the current Y position. Create the ColumnText anew, but use the Y position retrieved earlier to know what offset to use. Then add the ColumnText for real (simulate = false) br, Bruno ------------------------------------------------------------------------- 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
