来自vb.net windows App的BROTHER QL-700标签打印空白 [英] BROTHER QL-700 label printing blank from vb.net windows App
本文介绍了来自vb.net windows App的BROTHER QL-700标签打印空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个小型VB.NET Windows应用程序来打印标签。当我打印标签打印机响应但它打印空白标签。我已将配置设置为使用默认打印机设置,但它仍然打印为空白。任何帮助将不胜感激,请参阅下面的代码。
静态 intCurrentChar As Int32
Dim font As 新字体( Arial, 24 )
Dim PrintAreaHeight,PrintAreaWidth,marginLeft,marginTop As Int32
使用 PrintDocument1.DefaultPageSettings
PrintAreaHeight = .PaperSize.Height - .Margins.Top - .Margins.Bottom
PrintAreaWidth = .PaperSize.Width - .Margins.Left - .Margins.Right
marginLeft = .Margin s.Left
marginTop = .Margins.Top
结束 使用
Dim intLineCount As Int32 = CInt (PrintAreaHeight / font.Height)
Dim rectPrintingArea As 新 RectangleF(marginLeft,marginTop,PrintAreaWidth,PrintAreaHeight)
Dim fmt 作为 新 StringFormat(StringFormatFlags.LineLimit)
Dim intLinesFilled,intCharsFitted As Int32
e.Graphics.MeasureString(Mid(RichTextBox1.Text) ,intCurrentChar + 1 ),font,新 SizeF(PrintAreaWidth,PrintAreaHeight),fmt,intCharsFitted,intLinesFilled)
e.Graphics.DrawString(Mid(RichTextBox1.Text,intCurrentChar + 1 ),font,Brushes.Black,rectPrintingArea,fmt)
intCurrentChar + = intCharsFitted
解决方案
只是一个更新我设法通过使用他们的SDK工具包解决问题。我能拿起来的是因为打印机不在我的机器上它拿起普通的A4纸
在我的电脑上安装打印机后它选择了正确的设置并正确打印
Hi,
i created a small VB.NET Windows app to print labels . when i print the label printer responds but it prints blank labels. i have set the configuration to use default printer settings but it still prints blank. any help will be greatly appreciated please see my code below.
Static intCurrentChar As Int32
Dim font As New Font("Arial", 24)
Dim PrintAreaHeight, PrintAreaWidth, marginLeft, marginTop As Int32
With PrintDocument1.DefaultPageSettings
PrintAreaHeight = .PaperSize.Height - .Margins.Top - .Margins.Bottom
PrintAreaWidth = .PaperSize.Width - .Margins.Left - .Margins.Right
marginLeft = .Margins.Left
marginTop = .Margins.Top
End With
Dim intLineCount As Int32 = CInt(PrintAreaHeight / font.Height)
Dim rectPrintingArea As New RectangleF(marginLeft, marginTop, PrintAreaWidth, PrintAreaHeight)
Dim fmt As New StringFormat(StringFormatFlags.LineLimit)
Dim intLinesFilled, intCharsFitted As Int32
e.Graphics.MeasureString(Mid(RichTextBox1.Text, intCurrentChar + 1), font, New SizeF(PrintAreaWidth, PrintAreaHeight), fmt, intCharsFitted, intLinesFilled)
e.Graphics.DrawString(Mid(RichTextBox1.Text, intCurrentChar + 1), font, Brushes.Black, rectPrintingArea, fmt)
intCurrentChar += intCharsFitted
解决方案
Just an update i managed to sort the problem out by using their SDK kit . what i can pick up was that because the printer was not on my machine it picked up normal A4 paper
after installing printer on my pc it picked correct setting and printed correctly
这篇关于来自vb.net windows App的BROTHER QL-700标签打印空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文