以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 【已解决】自制条码模糊无法解决。建议使用原生代码生成的条码[求助]这种方式能一次性生成多页标签吗? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=154115) |
-- 作者:zto001 -- 发布时间:2020/9/3 22:42:00 -- 【已解决】自制条码模糊无法解决。建议使用原生代码生成的条码[求助]这种方式能一次性生成多页标签吗? [求助]这种方式能一次性生成多页标签吗?是一次性生成出来慢慢打印,而不是生成一次打印一次(开始打印只出现一次) Dim doc As New PrintDoc \'定义一个报表 [此贴子已经被作者于2020/9/17 9:21:29编辑过]
|
-- 作者:zto001 -- 发布时间:2020/9/3 22:51:00 -- 我好像是要这样的效果 Dim doc As New PrintDoc \'定义一个报表 doc.PageSetting.Width =76 \'纸张宽度 doc.PageSetting.Height =130 \'纸张高度 doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight \'设置排列方式 For i As Integer = 1 To 5 Dim rt As New prt.RenderTable() \'定义一个表格对象 Doc.PageSetting.LeftMargin = 0 \'设置左边距 Doc.PageSetting.RightMargin = 0 \'设置右边距 Doc.PageSetting.TopMargin = 0 \'设置上边距 Doc.PageSetting.BottomMargin = 0 \'设置下边距 rt.Width = "Parent.Width" \'对象宽度等于页面宽度 rt.Height = "Parent.Height" \'对象高度等于页面高度 \'指定行数?列数?列宽?行高 rt.Rows.Count = 10 \'设置总行数 rt.Cols.Count = 4 \'设置总列数 rt.Rows(0).Height = 10 \' rt.Rows(1).Height = 5 \' rt.Rows(2).Height = 12 \' rt.Rows(3).Height = 18 \' rt.Rows(4).Height = 10 \' rt.Rows(5).Height = 7 \' rt.Rows(6).Height = 13 \' rt.Rows(7).Height = 6 \' rt.Rows(8).Height = 6 \' rt.Rows(9).Height = 28 \' rt.Rows(10).Height = 14 \' \'设置列宽度 rt.Cols(0).Width = 8.5 \'设置前四列的宽度,剩余的宽度被分配给5列(显示图片的那列) rt.Cols(1).Width = 29.5 rt.Cols(2).Width = 23 rt.Cols(3).Width = 15 \'设置合并单元格 rt.Cells(0,0).SpanCols =2 \' rt.Cells(1,0).SpanCols = 2 \' rt.Cells(1,2).SpanCols = 2 \' rt.Cells(2,0).SpanCols = 4 \' rt.Cells(3,0).SpanCols = 4 \' rt.Cells(4,0).SpanCols = 2 \' rt.Cells(5,1).SpanCols = 2 \' rt.Cells(5,0).SpanRows = 2 \' rt.Cells(6,1).SpanCols = 2 \' rt.Cells(7,0).SpanRows = 2 \' rt.Cells(7,1).SpanCols = 2 \' rt.Cells(8,1).SpanCols = 2 \' rt.Cells(9,0).SpanCols = 4 \' rt.Cells(10,0).SpanCols = 2 \' rt.Cells(10,2).SpanCols = 2 \' rt.Cells(5,3).SpanRows = 4 \' \'设置表格样式 rt.CellStyle.Spacing.All = 1 \'单元格内容缩进1毫米 rt.Style.GridLines.All = New prt.Linedef \'设置网格线 rt.Style.GridLines.All = new Prt.LineDef(Color.Gainsboro) \'设置网格颜色 rt.Style.TextAlignVert = prt.AlignVertEnum.Center \'内容垂直居中 rt.Rows(9).Style.TextAlignVert = prt.AlignVertEnum.Top \'唯独第7行是备注,内容靠上对齐 \'\'\'下面很简单,指定每一个单元格的内容 rt.Cells(0,0).Text= "zto" rt.Cells(0,0).Style.Font = New Font("微软雅黑", 16, FontStyle.Bold) \'设置字体 ........ rbc.ShowText = False rt.Cells(5,3).RenderObject = rbc \'将单元格内容设置为图片对象rm doc.Body.Children.Add(rt) \'将表格对象加入到报表中 Next Doc.Preview() \'预览报表 |
-- 作者:有点蓝 -- 发布时间:2020/9/3 22:54:00 -- 这种代码肯定是一次性生成出来的 |
-- 作者:zto001 -- 发布时间:2020/9/4 17:10:00 -- Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.Code128 Bar.Code = "75376451448390" Bar.BarWidth = 0.5 Bar.BarRatio = 3 Bar.BarHeight = 9 Bar.QuietZoneWidth = 2 Bar.Font = New Font("微软雅黑",9,FontStyle.Bold) Bar.TextFont = New Font("微软雅黑",9,FontStyle.Bold) Bar.SaveImage("文件名") 要添加到:rt.Cells(0,4) [此贴子已经被作者于2020/9/4 17:13:33编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/9/4 17:12:00 -- 参考:http://www.foxtable.com/webhelp/topics/1208.htm |
-- 作者:zto001 -- 发布时间:2020/9/15 23:47:00 -- 第一种 Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.Code128 Bar.Code = "75376451448390" Bar.BarWidth = 0.5 Bar.BarRatio = 3 Bar.BarHeight = 9 Bar.QuietZoneWidth = 2 Bar.Font = New Font("微软雅黑",9,FontStyle.Bold) Bar.TextFont = New Font("微软雅黑",9,FontStyle.Bold) Bar.SaveImage("c:\\data\\MyBar.png") rt.Cells(4,4).Image = GetImage("c:\\data\\MyBar.png") 第二种 Dim doc As New PrintDoc 第一种方法生成的条形码不清楚,即使我生成超大的文件,然后缩小也不清楚。要怎么才能像第二种生成的条形码一样清楚呢? 我对条形码有要求,第二种生成的不符合要求
[此贴子已经被作者于2020/9/15 23:51:03编辑过]
|
-- 作者:zto001 -- 发布时间:2020/9/15 23:48:00 -- 要打在76*130这么大纸上 |
-- 作者:有点蓝 -- 发布时间:2020/9/16 8:32:00 -- Dim rbc As New prt.RenderBarCode() rbc.Height = 25 rbc.BarCodeType = BarCodeEnum.Code39 rbc.BarDirection = BarDirectionEnum.Normal rbc.Text = "123456" rbc.ShowText = True Dim doc As New PrintDoc \'定义一个报表 Dim rt As New prt.RenderTable() \'定义一个表格对象 doc.Body.Children.Add(rt) \'将表格对象加入到报表中 rt.Style.GridLines.All = New prt.Linedef(Color.DarkGray) \'将表格的颜色设为深灰色 rt.Rows.Count = 3 \'设置行数 rt.Cols.Count = 3 \'设置列数 rt.Width = 60 \'设置表格的宽度 rt.Height = 60 \'设置表格的高度 rt.Cells(1,1).RenderObject = rbc \'将单元格内容设置为图片对象rm Doc.Preview() \'预览报表
|
-- 作者:zto001 -- 发布时间:2020/9/16 8:46:00 -- 这种方法不合适,我需要生成指定规格的码值,就是这种,有没有办法能生成这种又能清晰? Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.Code128 Bar.Code = "75376451448390" Bar.BarWidth = 0.5 Bar.BarRatio = 3 Bar.BarHeight = 9 Bar.QuietZoneWidth = 2 Bar.Font = New Font("微软雅黑",9,FontStyle.Bold) Bar.TextFont = New Font("微软雅黑",9,FontStyle.Bold) 以下是引用有点蓝在2020/9/16 8:32:00的发言:
Dim rbc As New prt.RenderBarCode() rbc.Height = 25 rbc.BarCodeType = BarCodeEnum.Code39 rbc.BarDirection = BarDirectionEnum.Normal rbc.Text = "123456" rbc.ShowText = True Dim doc As New PrintDoc \'定义一个报表 Dim rt As New prt.RenderTable() \'定义一个表格对象 doc.Body.Children.Add(rt) \'将表格对象加入到报表中 rt.Style.GridLines.All = New prt.Linedef(Color.DarkGray) \'将表格的颜色设为深灰色 rt.Rows.Count = 3 \'设置行数 rt.Cols.Count = 3 \'设置列数 rt.Width = 60 \'设置表格的宽度 rt.Height = 60 \'设置表格的高度 rt.Cells(1,1).RenderObject = rbc \'将单元格内容设置为图片对象rm Doc.Preview() \'预览报表
|
-- 作者:有点蓝 -- 发布时间:2020/9/16 9:20:00 -- Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.Code128 Bar.Code = "75376451448390" Bar.BarWidth = 0.5 Bar.BarRatio = 3 Bar.BarHeight = 9 Bar.QuietZoneWidth = 2 Bar.Font = New Font("微软雅黑",9,FontStyle.Bold) Bar.TextFont = New Font("微软雅黑",9,FontStyle.Bold) img = new prt.RenderImage img.Image = bar.GetImage rt.Cells(4,4).Image = img [此贴子已经被作者于2020/9/16 9:21:18编辑过]
|