看了下帮助文件 自定义设计了一个标签 代码如下 现在有几个问题
1.如何加入条码
2.自定义了纸张 为什么生成以后的页面 内容不是铺满整个页面 而是偏右下呢
Dim doc As New PrintDoc
doc.PageSetting.Width = 60
doc.PageSetting.Height = 40
doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Dim ra As New prt.RenderArea
Dim rt As prt.RenderText
ra.Width = 50
ra.Height = 30
ra.Style.Spacing.All = 1
ra.Style.Borders.All = New prt.Linedef(0.3, Color.black)
ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never
ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never
Doc.Body.ChildRen.Add(ra)
rt = New prt.RenderText
rt.Text = "名称:" & "海尔冰箱"
rt.X = 2
rt.Y = 2
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "单位" & "台"
rt.X = 2
rt.Y = "Prev.Bottom + 2"
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "条码:" & "5690058765423"
rt.X = 2
rt.Y = "Prev.Bottom + 2"
ra.Children.Add(rt)
Doc.Preview()