居中啊
Dim doc As New PrintDoc '定义一个报表
Dim rt As New prt.RenderTable() '定义一个表格对象
'Dim rm As New prt.RenderImage() '定义一个图片对象
Dim rm As New prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code39
bar.Code = "12345678"
rm = new prt.RenderGraphics
bar.DrawOnCanvas(rm.Graphics,0,0,1)
rm.Style.ImageAlign.AlignHorz = prt.ImageAlignHorzEnum.Center '图片水平居中
rm.Style.ImageAlign.AlignVert = prt.ImageAlignVertEnum.Center '图片垂直居中
rm.Style.ImageAlign.StretchHorz = False '禁止水平方向扩展图片
rm.Style.ImageAlign.StretchVert = False '禁止垂直方向扩展图片
doc.Body.Children.Add(rt) '将表格对象加入到报表中
rt.Style.GridLines.All = New prt.Linedef(Color.DarkGray) '将表格的颜色设为深灰色
rt.Rows.Count = 3 '设置行数
rt.Cols.Count = 3 '设置列数
rt.Width = 200 '设置表格的宽度
rt.Height = 60 '设置表格的高度
rt.Cells(1,1).RenderObject = rm '将单元格内容设置为图片对象rm
Doc.Preview() '预览报表