参考代码,要善用ra容器,把整体的布局放在一个个容器里面。
Dim FSDoc As New PrintDoc
'纸张类型和页面设置
FSDoc.PageSetting.PaperKind = 9
FSDoc.PageSetting.LeftMargin = 5
FSDoc.PageSetting.rightMargin = 5
FSDoc.PageSetting.TopMargin = 5
FSDoc.PageSetting.BottomMargin = 5
Dim ra As new prt.RenderArea
'加载表头(LOGO,型号,随件单号,随件单条码,打印日期和设计者)
Dim Logo As New prt.RenderImage
logo.Image = GetImage("d:\test.jpg")
logo.Style.Borders.All = New prt.Linedef(0, Color.White)
logo.Style.TextAlignHorz = prt.AlignHorzEnum.Left
logo.Width = 25
logo.x = 30
logo.y = 0
ra.children.add(logo)
Dim ProDe As New prt.RenderText
ProDe.Text = "productdescription"
ProDe.Style.Font = new font("Aril", 26)
ProDe.X = 33
ProDe.Y = 11
ra.children.add(prode)
fsdoc.PageHeader = ra
Fsdoc.Preview()