Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]标签打印:文字要纵向排布

1楼
瑞峰 发表于:2024/4/18 17:26:00
试过以下两种,都不能实现
rt.style.TextAngle = 90
doc.Landscape = Page_Landscape



图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20240418172252.png
图片点击可在新窗口打开查看



图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20240418172412.png
图片点击可在新窗口打开查看

2楼
有点蓝 发表于:2024/4/18 17:32:00
贴出完整代码看看。纸张规格是多大的?
3楼
瑞峰 发表于:2024/4/18 17:36:00
蓝版,我就要实现  文字可以像下图一样
可以纵向分布,有没有办法

Dim t As New prt.RenderTable()
With t
    .Width = 25
    .Height = 50
    .Style.GridLines.All = New prt.LineDef '设置网格线
    .Rows.Count = 1 '设置总行数
    .Cols.Count = 2 '设置总列数
    '
    '.Rows(0).Height = 30 '二维码
    '.Rows(1).Height = 10 '
    
    .Cols(0).Width = 15
    .Cols(1).Width = 5
    '
    '.Cells(0, 0).SpanCols = 2 '零件号
    '.Cells(1, 0).SpanRows = 2 '文字
End With

Dim cell As prt.RenderArea
Dim rt As prt.RenderText

'二维码
cell = t.Cells(0, 0).Area
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.QuietZoneWidth = 0 '把静区宽度设置为0
Bar.DisplayCode = False
Bar.Code = mid_pack_code
rg = New prt.RenderGraphics

rg.Width = 15
rg.Height = 15
'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)

'rg.style.TextAngle = 90
cell.Children.Add(rg)

cell = t.Cells(0, 1).Area
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 = 5
rt.Style.Font = New Font("宋体", 9, FontStyle.Bold) '设置字体
rt.Text = sn
rt.style.TextAngle = 90
cell.Children.Add(rt)
[此贴子已经被作者于2024/4/18 17:36:52编辑过]
4楼
有点蓝 发表于:2024/4/18 20:17:00
就是调整TextAngle 呀:http://www.foxtable.com/webhelp/topics/1168.htm


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

共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.