If you want to place a single line of text with the same font use PdfContentByte.showTextAligned(), it takes care of horizontal alignment. For vertical alignment you'll have to calculate it yourself. For mixed fonts and multiline use ColumnText. Other option is to use a PdfPTable that can take care of all the horizontal and vertical alignments.
Best Regards, Paulo Soares ----- Original Message ----- From: "BAA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 16, 2002 11:51 Subject: [iText-questions] textboxes > Hi y'all. > > I'm quite new at iText (some experience with pdf, alot java) and i have > some questions. > > I'd like to make an application which places pictures, pdf and textboxes > > just like a light dtp-app. > > what i need to write is something like > > int HALIGN_LEFT = 1; > int HALIGN_CENTER = 2; > int HALIGN_RIGHT = 3; > > int VALIGN_TOP = 1; > int VALIGN_MIDDLE = 2; > int VALIGN_BOTTOM = 3; > > putText(float x,float y, float width,float height, int halign, > int > valign, Font font, String content); > > the text (content,font) is then placed and aligned (valign,halign) in a > box on the pdf in a box (x,y,w,h) > > which part should i use, i think i can do this more than one way in > iText but what i'd like to know is which (from your experience) will be > the "cleanest"/easiest way to do this? > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
