Dim doc As New PrintDoc()
Doc.PageSetting.LeftMargin = 18
Doc.PageSetting.RightMargin = 18
Doc.PageSetting.TopMargin = 25
Doc.PageSetting.BottomMargin = 25
doc.PageSetting.PaperKind = 9
Dim FenMianRx As New prt.RenderText
FenMianRx.Text = "用户信息"
FenMianRx.Style.TextAlignHorz = prt.AlignHorzEnum.Center
FenMianRx.Style.Font = New Font("华文中宋",36,FontStyle.Bold)
Dim FenMianRt As New prt.RenderTable()
FenMianRt.Style.Spacing.Top = 20
FenMianRt.Rows.Count = 3
FenMianRt.Cols.Count = 2
Dim FenMianRx00 As New prt.RenderText
FenMianRx00.Text = "客户姓名:"
FenMianRt.Cells(0,0).RenderObject = FenMianRx00 '放置在单元格中
Dim FenMianRx10 As New prt.RenderText
FenMianRx10.Text = "身份证号:"
FenMianRt.Cells(1,0).RenderObject = FenMianRx10
Dim FenMianRx20 As New prt.RenderText
FenMianRx20.Text = "联系电话:"
FenMianRt.Cells(2,0).RenderObject = FenMianRx20
For i As Integer = 0 To 2
FenMianRt.Rows(i).Height = 12
FenMianRt.Cells(i,1).Style.Borders.Bottom = New prt.Linedef()
Next
FenMianRt.Width = 90
FenMianRt.Cols(0).Width = 25
FenMianRt.Cols(1).Width = 60
FenMianRt.Cols(0).Style.Font = New Font("宋体",12,FontStyle.Bold)
FenMianRt.Cols(0).Style.TextAlignHorz = prt.AlignHorzEnum.Right
FenMianRt.Cols(0).Style.TextAlignVert = prt.AlignVertEnum.Bottom
FenMianRt.Cols(1).Style.Font = New Font("华文楷体",12)
FenMianRt.Cols(1).Style.TextAlignHorz = prt.AlignHorzEnum.Center
FenMianRt.Cols(1).Style.TextAlignVert = prt.AlignVertEnum.Bottom
doc.Body.Children.Add(FenMianRx)
doc.Body.Children.Add(FenMianRt)
doc.Preview()