以文本方式查看主题

-  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=191465)

--  作者:瑞峰
--  发布时间:2024/4/18 17:26:00
--  [求助]标签打印:文字要纵向排布
试过以下两种,都不能实现
rt.style.TextAngle = 90
doc.Landscape = Page_Landscape



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



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


--  作者:有点蓝
--  发布时间:2024/4/18 17:32:00
--  
贴出完整代码看看。纸张规格是多大的?
--  作者:瑞峰
--  发布时间: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编辑过]

--  作者:有点蓝
--  发布时间:2024/4/18 20:17:00
--  
就是调整TextAngle 呀:http://www.foxtable.com/webhelp/topics/1168.htm


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