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

Reply via email to