用C#winfrom实现打印.lbl的条形码打印该怎么去做

用C#winfrom实现打印.lbl的条形码打印该怎么去做,第1张

打印的话,你可以查下禅岩烂 PrintDocument 这个控件,用这个可以实现打印功能

/// <summary>

/// 打印绘制

/// </贺漏summary>

/// <param name="e"></param>枣尘

protected override void OnPrintPage(PrintPageEventArgs e)

{

base.OnPrintPage(e)

if (printBitmap != null)

{

int width = printBitmapRectangle.Width >e.MarginBounds.Width ? e.MarginBounds.Width : printBitmapRectangle.Width

int height = printBitmapRectangle.Height >e.MarginBounds.Height ? e.MarginBounds.Height : printBitmapRectangle.Height

e.Graphics.DrawImage(printBitmap, new Rectangle(e.MarginBounds.Left, e.MarginBounds.Top, width, height), new Rectangle(0, 0, printBitmap.Width, printBitmap.Height), GraphicsUnit.Pixel)

}

if (printString != "")

e.Graphics.DrawString(printString, new Font("宋体", 12), new SolidBrush(Color.Black), printStringLocation)

}

/// <summary>

/// 启动打印

/// </summary>

public void OnPrint()

{

if (printBitmap == null) { MessageBox.Show("请先加载图片")return}

if (!this.PrinterSettings.IsValid) { MessageBox.Show("无法识别打印机")return}

if (MessageBox2.Show("确定打印吗?", "打印", MessageBoxButtons2.OKCancel) == DialogResult.OK)

{

this.Print()

}

}

这个是我以前写的,现在也忘了,你看下,自己研究下,打印图片的功能

1、LBL文件是NiceLabel创建的LABEL标签模版文件,NiceLabel是创建专业条形码或是RFID标签文件,包含一个默认的布局和设计,包括尺寸、格式、文本和模板部分。

LBL文件可和困桥以从简单模版打唤猛印出许多标签,在打印的时候,有可能会被填上日尺橡期或是一些数据信息。

2、打开方式:用Microsoft

Visual

FoxPro直接打开。

3、1.dBASE

IV

-

2.Clipper

5

-

3.dBFast这三种也可以打开的


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/12429595.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-23
下一篇2023-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存