Hello,
Cell's
HorizontalAlignment does not work/has no
effect in the latest iTextSharp for the added elements. (It was working file in
previous versions)
using
(var pdfDoc = new Document(PageSize.A4))
{
var pdfWriter =
PdfWriter.GetInstance(pdfDoc, new FileStream("Test.pdf",
FileMode.Create));
pdfDoc.Open();
var text = new
Phrase("Test");
var paragraph = new
Paragraph();
paragraph.Add(text);
var mainTable = new
PdfPTable(1)
{
WidthPercentage = 100
};
var cell = new PdfPCell
{
Border = 0,
HorizontalAlignment = Element.ALIGN_CENTER // **** it's not
working anymore. ****
};
cell.AddElement(paragraph);
mainTable.AddCell(cell);
pdfDoc.Add(mainTable);
}
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php