Foxtable(狐表)用户栏目专家坐堂 → [求助]如何高速打印?


  共有2568人关注过本帖平板打印复制链接

主题:[求助]如何高速打印?

帅哥哟,离线,有人找我吗?
zto001
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1465 积分:10403 威望:0 精华:0 注册:2018/10/16 11:42:00
[求助]如何高速打印?  发帖心情 Post By:2020/1/2 21:26:00 [只看该作者]


Dim doc As New PrintDoc '定义一个报表

doc.PageSetting.Width =74 '纸张宽度为100毫米
doc.PageSetting.Height =129 '纸张高度为120毫米

Dim rt As New prt.RenderTable() '定义一个表格对象
Doc.PageSetting.LeftMargin = 1 '设置左边距
Doc.PageSetting.RightMargin = 1 '设置右边距
Doc.PageSetting.TopMargin = 2 '设置上边距
Doc.PageSetting.BottomMargin = 1 '设置下边距
rt.Width = "Parent.Width" '对象宽度等于页面宽度
rt.Height = "Parent.Height" '对象高度等于页面高度
'指定行数?列数?列宽?行高
rt.Rows.Count = 10 '设置总行数
rt.Cols.Count = 4 '设置总列数
.......

'设置表格样式
rt.CellStyle.Spacing.All = 1 '单元格内容缩进1毫米
rt.Style.GridLines.All = New prt.Linedef '设置网格线
rt.Style.GridLines.All = new Prt.LineDef(Color.RosyBrown) '设置网格颜色
rt.Style.TextAlignVert =  prt.AlignVertEnum.Top '内容靠上对齐
'''下面很简单,指定每一个单元格的内容
rt.Cells(0,1).Style.BackColor = Color.Black
Dim rx As New prt.RenderText '定义一个文本对象
rx.Text = 打印(2) ' 打印(20)  '退件标识
rx.Style.Font = New Font("微软雅黑", 16, FontStyle.Bold)
rx.Style.TextColor = Color.white
......
Dim rg As New prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code128
bar.Code = 当前行("运单编号")    '条形码
rg = new prt.RenderGraphics
bar.DrawOnCanvas(rg.Graphics,0,0,1)
rt.Cells(2,0).RenderObject = rg  '将单元格内容设置为图片对象rm
.......

Dim rt0 As prt.RenderText '定义一个文本对象
rt0 = New prt.RenderText '设置文本对象的内容
.......
rt0.Style.TextColor = Color.DarkSlateGray '文本颜色为灰色
Doc.WaterMark = rt0 '作为水印使用

Doc.PrinterName = Args(1)
Doc.Print() '预览报表


我需要动态生成打印内容,需要如何才能高速打印?》这样打印太慢了

 回到顶部