Exemplo n.º 1
0
 protected void CreateNewCell(PdfPTable table, ArrayList cellData, PdfAlignType align)
 {
     iTextSharp.text.Font oFont = new Font(bfMs, 9.3f, Font.BOLD);
     foreach (var data in cellData)
     {
         PdfPCell oCell = new PdfPCell(new Phrase(data.ToString(), oFont));
         oCell.HorizontalAlignment = Convert.ToInt32(align);
         oCell.BorderColor         = new BaseColor(255, 255, 255);
         table.AddCell(oCell);
     }
 }
Exemplo n.º 2
0
        protected void CreateNewCell(PdfPTable table, ArrayList cellData, PdfAlignType align)
        {
            iTextSharp.text.Font oFont = new Font(bfMs, 9f, Font.BOLD);
            int counter = 0;

            foreach (var data in cellData)
            {
                string Value = data.ToString();
                if (counter == 5)
                {
                    if (int.Parse(Value) < 10)
                    {
                        Value = string.Format("  {0}", data.ToString());
                    }
                }

                PdfPCell oCell = new PdfPCell(new Phrase(Value, oFont));
                oCell.HorizontalAlignment = Convert.ToInt32(align);
                oCell.BorderColor         = new BaseColor(255, 255, 255);
                table.AddCell(oCell);
                counter++;
            }
        }