Dim Doc As New PrintDoc
Doc.PageSetting.PaperKind = 11 '设定为A5纸
Doc.PageSetting.LeftMargin = 5 '设置左边距
Doc.PageSetting.RightMargin = 5 '设置右边距
Doc.PageSetting.BottomMargin = 5 '设置上边距
Doc.PageSetting.BottomMargin = 5 '设置下边距
Doc.AutoRotate = False '禁止自动旋转打印内容
Doc.Style.F
Doc.Style.FontSize = 11
Doc.Style.FontBold = True
Dim rt As prt.RenderText
Dim x As Integer = 0 '定义水平偏移参数
Dim y As Integer = 0 '定义垂直偏移参数
Dim i,j As Integer
i = 30
j = 7
rt = new prt.RenderText
rt.Text = "中华人民共和国传染病报告卡"
rt.y = 15 + y
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Style.FontSize = 14
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "卡片编号: "
rt.x = 20 + x
rt.y = i + j*0 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "报卡类别: "
rt.x = 90 + x
rt.y = i + j*0 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "患者姓名: "
rt.x = 20 + x
rt.y = i + j*1 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "身份证号码: "
rt.x = 20 + x
rt.y = i + j*2 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "性别: "
rt.x = 20 + x
rt.y = i + j*3 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "出生日期: "
rt.x = 45 + x
rt.y = i + j*3 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "实足年龄: "
rt.x = 100 + x
rt.y = i + j*3 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "工作单位: "
rt.x = 20 + x
rt.y = i + j*4 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "联系电话: "
rt.x = 20 + x
rt.y = i + j*5 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "病人属于: "
rt.x = 20 + x
rt.y = i + j*6 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "现住址: "
rt.x = 20 + x
rt.y = i + j*7 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "户籍地址: "
rt.x = 20 + x
rt.y = i + j*8 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "患者职业: "
rt.x = 20 + x
rt.y = i + j*9 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "病例分类: "
rt.x = 20 + x
rt.y = i + j*10 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "发病日期: "
rt.x = 20 + x
rt.y = i + j*11 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "诊断日期: "
rt.x = 20 + x
rt.y = i + j*12 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "死亡日期: "
rt.x = 20 + x
rt.y = i + j*13 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "乙类传染病: "
rt.x = 20 + x
rt.y = i + j*14 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "订正病名: "
rt.x = 20 + x
rt.y = i + j*15 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "报告医生: "
rt.x = 20 + x
rt.y = i + j*16 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "填卡日期: "
rt.x = 20 + x
rt.y = i + j*17 + y
doc.body.Children.Add(rt)
rt = new prt.RenderText
rt.Text = "备注: "
rt.x = 20 + x
rt.y = i + j*18 + y
doc.body.Children.Add(rt)
Doc.Preview()
' Doc.print()