Dim doc As PrintDoc = e.Form.GernatePrintDoc() For Each c As Object In doc.body.children If typeof c Is prt.RenderTable Then For i As Integer = 0 To c.Cols.Count - 1 '逐列设置和填入内容 c.cols(i).Style.TextAlignHorz = prt.AlignHorzEnum.Center c.cols(i).style.TextAlignVert = prt.AlignVertEnum.Center Next End If Next doc.Preview()