以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  专业报表的二维码为何两侧有白边  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=172506)

--  作者:瑞峰
--  发布时间:2021/10/16 1:01:00
--  专业报表的二维码为何两侧有白边

图片点击可在新窗口打开查看此主题相关图片如下:qq.jpg
图片点击可在新窗口打开查看


cell = t.Cells(1,1).Area
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = lsn
rg = New prt.RenderGraphics

rg.Width = 28
rg.Height = 28
rg.Style.BackColor = Color.Red
rg.Style.Padding.Top = 0.5
rg.Style.Padding.Left = 0.5
rg.Style.Padding.right = 0.5
rg.Style.Padding.Bottom = 0.5

Bar.DrawOnCanvas(rg.Graphics, 0, 0, 1)
cell.Children.Add(rg)

rt = New prt.RenderText()
rt.Style.BackColor = Color.yellow
\'rt.Style.TextAlignHorz = prt.AlignHorzEnum.left \'水平左对齐
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rt.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中
rt.Height = 4
rt.Style.Font = New Font("宋体", 9, FontStyle.Bold) \'设置字体
rt.Text = sn
cell.Children.Add(rt)


--  作者:有点蓝
--  发布时间:2021/10/16 9:20:00
--  
默认就是这样的,把静区宽度设置为0
Bar.QuietZoneWidth = 0


--  作者:瑞峰
--  发布时间:2021/10/16 22:41:00
--  
谢谢蓝版,
静区设置为0,有什么不良的影响吗?

--  作者:有点蓝
--  发布时间:2021/10/17 20:28:00
--  
静区就是空白区域,不需要就去掉,有啥影响?
[此贴子已经被作者于2021/10/17 20:28:44编辑过]