void table_EndCellLayout(object sender, EndCellLayoutEventArgs args)
 {
     if (args.RowIndex == 1 && args.CellIndex == 1)
     {
         PdfImage image = PdfImage.FromFile("../../../../../../Data/E-iceblueLogo.png");
         float    x     = (args.Bounds.Width - image.PhysicalDimension.Width) / 2 + args.Bounds.X;
         float    y     = (args.Bounds.Height - image.PhysicalDimension.Height) / 2 + args.Bounds.Y;
         args.Graphics.DrawImage(image, x, y);
     }
 }
 void table_EndCellLayout(object sender, EndCellLayoutEventArgs args)
 {
     if (args.RowIndex < 0)
     {
         //Header
         return;
     }
     if (args.CellIndex == 1)
     {
         DataTable dataTable = (sender as PdfTable).DataSource as DataTable;
         PdfImage  image     = dataTable.Rows[args.RowIndex][7] as PdfImage;
         float     x         = (args.Bounds.Width - image.PhysicalDimension.Width) / 2 + args.Bounds.X;
         float     y         = (args.Bounds.Height - image.PhysicalDimension.Height) / 2 + args.Bounds.Y;
         args.Graphics.DrawImage(image, x, y);
     }
 }
Beispiel #3
0
 void table_EndCellLayout(object sender, EndCellLayoutEventArgs args)
 {
     if (args.RowIndex < 0)
     {
         //header
         return;
     }
     if (args.CellIndex == 1)
     {
         DataTable dataTable = (sender as PdfTable).DataSource as DataTable;
         PdfImage image = dataTable.Rows[args.RowIndex][7] as PdfImage;
         float x = (args.Bounds.Width - image.PhysicalDimension.Width) / 2 + args.Bounds.X;
         float y = (args.Bounds.Height - image.PhysicalDimension.Height) / 2 + args.Bounds.Y;
         args.Graphics.DrawImage(image, x, y);
     }
 }