以文本方式查看主题 - 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=118652) |
-- 作者:huhu -- 发布时间:2018/5/8 11:18:00 -- 二维码固定高度和宽度吗? 二维码固定高度和宽度吗?比如30*40 单位毫米。请问怎么设置? Dim URL As String = "http://10.1.1.1/cgi-bin/luci/mini?pwd=" & dr("口令") & "&mac=" & dr("后四位") dr("URL") = URL Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Bar.Code = dr("URL") Bar.QuietZoneWidth = 2 Bar.CodeAlignment = Barpro.Alignment.AboveCenter Bar.Text = "手机接入无线BDCOM_" & dr("后四位").ToUpper() & vbcrlf & "浏览器扫描二维码,开始配置" Bar.TextAlignment = Barpro.Alignment.BelowCenter Bar.TextFont = New Font("微软雅黑",7) Bar.SaveImage(file & dr("MAC") & ".bmp") dr.save
|
-- 作者:有点甜 -- 发布时间:2018/5/8 11:25:00 -- 比如
Dim doc As New PrintDoc |
-- 作者:huhu -- 发布时间:2018/5/8 12:06:00 -- 这样?怎么感觉不对呢? Dim doc As New PrintDoc Dim img As prt.RenderImage Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Bar.Code = dr("URL") Bar.QuietZoneWidth = 2 Bar.CodeAlignment = Barpro.Alignment.AboveCenter Bar.Text = "手机接入无线BDCOM_" & dr("后四位").ToUpper() & vbcrlf & "浏览器扫描二维码,开始配置" Bar.TextAlignment = Barpro.Alignment.BelowCenter Bar.TextFont = New Font("微软雅黑",7) Dim bmp As new bitmap(bar.GetImage, 30, 30) bmp.save(file & dr("MAC") & ".wmf") bmp.dispose |
-- 作者:有点甜 -- 发布时间:2018/5/8 12:15:00 -- 单位是像素,不是厘米
Dim bmp As new bitmap(bar.GetImage, 30, 30)
像素和毫米的关系,如 象素数 / DPI = 英寸数 英寸数 * 25.4 = 毫米数 |
-- 作者:huhu -- 发布时间:2018/5/8 12:25:00 -- 怎么会生成出2个文件(bmp和wmf) |
-- 作者:huhu -- 发布时间:2018/5/8 14:52:00 -- Dim doc As New PrintDoc Dim img As prt.RenderImage Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Bar.Code = dr("URL") Bar.QuietZoneWidth = 2 Bar.CodeAlignment = Barpro.Alignment.AboveCenter Bar.Text = "手机接入无线BDCOM_" & dr("后四位").ToUpper() & vbcrlf & "浏览器扫描二维码,开始配置" Bar.TextAlignment = Barpro.Alignment.BelowCenter Bar.TextFont = New Font("微软雅黑",7) Dim bmp As new bitmap(bar.GetImage, 85, 85) bmp.save(file & dr("MAC") & ".bmp") ------改为bmp行不行?还是一定格式为wmf? bmp.dispose |
-- 作者:有点蓝 -- 发布时间:2018/5/8 15:19:00 -- 行不行测试不就知道了 |