void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     if (args.RowIndex == 1)
     {
         PdfImage image = PdfImage.FromFile("../../../../../../Data/E-iceblueLogo.png");
         args.MinimalHeight = image.PhysicalDimension.Height + 4;
     }
 }
        private void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            //Set the color of table cell border
            PdfCellStyle cellStyle = new PdfCellStyle();

            cellStyle.BorderPen = new PdfPen(Color.LightBlue, 0.9f);
            args.CellStyle      = cellStyle;
        }
示例#3
0
        //在自定义事件中设置单元格字体和文本对齐方式
        private static void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            PdfCellStyle cellstyle = new PdfCellStyle();

            cellstyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Center);
            cellstyle.Font         = new PdfTrueTypeFont(new Font("Arial Unicode MS", 9f), true);
            args.CellStyle         = cellstyle;
        }
示例#4
0
        private static void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            PdfCellStyle cs = new PdfCellStyle();

            cs.BorderPen   = new PdfPen(Color.Transparent);
            cs.Font        = pageFont;
            args.CellStyle = cs;
        }
示例#5
0
        private void BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            PdfCellStyle cellstyle = new PdfCellStyle();

            cellstyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Center);
            cellstyle.Font         = new PdfTrueTypeFont(new Font("Arial", 8f), true);
            args.CellStyle         = cellstyle;

            PdfPageSettings ps = new PdfPageSettings();

            ps.Orientation = PdfPageOrientation.Landscape;
        }
 void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     if (args.RowIndex < 0)
     {
         //header
         return;
     }
     if (args.RowIndex % 3 == 0)
     {
         args.CellStyle.BackgroundBrush = PdfBrushes.LightYellow;
     }
     else
     {
         args.CellStyle.BackgroundBrush = PdfBrushes.SkyBlue;
     }
 }
        void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            if (args.RowIndex < 0)
            {
                //Header
                return;
            }
            DataTable dataTable = (sender as PdfTable).DataSource as DataTable;

            byte[] imageData = dataTable.Rows[args.RowIndex][6] as byte[];
            using (MemoryStream stream = new MemoryStream(imageData))
            {
                PdfImage image = PdfImage.FromStream(stream);
                args.MinimalHeight = 4 + image.PhysicalDimension.Height;
                dataTable.Rows[args.RowIndex][7] = image;
            }
        }
示例#8
0
        static void LinesTable_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            PdfFont helv11 = new PdfFont(PdfFontFamily.Helvetica, 11f);
            PdfFont helv12Bold = new PdfFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
            PdfStringFormat centered = new PdfStringFormat(PdfTextAlignment.Center);
            PdfBrush gray = new PdfSolidBrush(Color.LightGray);
            PdfBrush clear = new PdfSolidBrush(Color.Transparent);

            args.CellStyle.BorderPen = new PdfPen(Color.Transparent);
            args.CellStyle.BackgroundBrush = clear;

            if(args.RowIndex == 0)
            {
                //header
                args.CellStyle.Font = helv12Bold;

            }
            else
                args.CellStyle.Font = helv11;

            if(args.RowIndex % 2 != 0)
            {
                args.CellStyle.BackgroundBrush = gray;
            }
        }
示例#9
0
        static void addressTable_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
        {
            PdfFont helv12 = new PdfFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
            PdfFont helv11 = new PdfFont(PdfFontFamily.Helvetica, 11f);
            PdfStringFormat centered = new PdfStringFormat(PdfTextAlignment.Center);

            if (args.RowIndex == 0)
            {
                //header
                args.CellStyle.Font = helv12;
                args.CellStyle.StringFormat = centered;
                args.CellStyle.BackgroundBrush = PdfBrushes.LightGray;
            }
            else
            {
                args.CellStyle.Font = helv11;
                args.CellStyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Left);
                args.CellStyle.BackgroundBrush = PdfBrushes.White;
            }
        }
示例#10
0
 void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     if (args.RowIndex < 0)
     {
         //header
         return;
     }
     if (args.RowIndex % 3 == 0)
     {
         args.CellStyle.BackgroundBrush = PdfBrushes.LightYellow;
     }
     else
     {
         args.CellStyle.BackgroundBrush = PdfBrushes.SkyBlue;
     }
 }
示例#11
0
 void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     if (args.RowIndex < 0)
     {
         //header
         return;
     }
     DataTable dataTable = (sender as PdfTable).DataSource as DataTable;
     byte[] imageData = dataTable.Rows[args.RowIndex][6] as byte[];
     using (MemoryStream stream = new MemoryStream(imageData))
     {
         PdfImage image = PdfImage.FromStream(stream);
         args.MinimalHeight = 4 + image.PhysicalDimension.Height;
         dataTable.Rows[args.RowIndex][7] = image;
     }            
 }
示例#12
0
 private static void Table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     args.MinimalHeight = 15f;
 }
 void table_BeginRowLayout(object sender, BeginRowLayoutEventArgs args)
 {
     args.MinimalHeight = 50f;
 }