Leave it as it is. Any change there would break all the existing code. Best Regards, Paulo Soares
----- Original Message ----- From: "Steve Appling" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, October 11, 2004 21:57 Subject: Re: [iText-questions] Alignment of text in a Paragraph within a Cell > Use code like this with the current version: > Cell cell = new Cell(p); > cell.setHorizontalAlignment(Element.ALIGN_RIGHT); > aTable.addCell(cell); > > It works when set from the cell level, but the paragraph alignment does not apply. I think this > could be considered a bug. > > It is easy to fix in the constructor for Cell(Paragraph), but if you use the default constructor for > Cell or PdfPCell, it is a little messier. > You would need to probably keep another alignment state that works like ALIGN_LEFT, but indicates > that current alignment had been set explicitly. Then Cell.addElement or PdfPCell.addElement would > have to override the default alignment if it hadn't been set explicitly yet. Seems messy. > > Paulo, are you interested in supporting this? I'll add it if you think it should work this way. > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, October 11, 2004 1:07 PM > Subject: [iText-questions] Alignment of text in a Paragraph within a Cell > > > > > > > > > > > > Hi, > > > > I am trying to align the text in a paragraph with a cell using the > > following code. It works fine in RTF. But it is not working in PDF. > > > > In PDF it is displaying all the text as Left aligned. > > > > Please let me know the fix for this. > > > > Document document = new Document(PageSize.A4); > > PdfWriter.getInstance(document, new > > FileOutputStream("c:\\alogs\\Orientation.pdf")); > > document.open(); > > Paragraph p = new Paragraph("Left Alignment"); > > p.setAlignment("left"); > > Table aTable = new Table(2,2); > > aTable.addCell(new Cell(p)); > > p = new Paragraph("Right Alignment"); > > p.setAlignment("right"); > > aTable.addCell(new Cell(p)); > > p = new Paragraph("Center Alignment"); > > p.setAlignment("center"); > > aTable.addCell(new Cell(p)); > > aTable.addCell(new Cell(new Phrase("col22: ", > > IReportConstants.FONT_TABLE_COLUMN))); > > document.add(aTable); > > document.close(); > > > > Thanks > > Srinivasulu Vempuluru > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > > Use IT products in your business? Tell us what you think of them. Give us > > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > > http://productguide.itmanagersjournal.com/guidepromo.tmpl > > _______________________________________________ > > iText-questions mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions