条形码二维码标签编辑打印软件

 

 

 

 

发布版下载 https://files.cnblogs.com/files/williamyoung/KopSoftPrint.zip 

 

 

条形码二维码标签编辑打印软件

C#打印 1.建立PrintDocument对象 2.设置PrintPage打印事件 3.调用Print方法进行打印

BarcodeWriter用于生成图片格式的条码类,通过Write函数进行输出 BarcodeFormat枚举类型,条形码/二维码 QrCodeEncodingOptions二维码设置选项,继承于EncodingOptions,主要设置宽,高,编码方式等 MultiFormatWriter复合格式条码写码器,通过encode方法得到BitMatrix BitMatrix表示按位表示的二维矩阵数组,元素的值用true和false表示二进制中的1和0

支持文本、图片、条形码、二维码、直线等对象自由拖拽、删除,纸张尺寸边距设计等, 并可保存为XML模板,可直接打印到打印机,数据源支持XML、EXCEL、数据库等

##操作步骤

  • 1.纸张设置:选择纸张尺寸或自定义纸张尺寸
  • 2.条形码;二维码;图片;文本;直线;设置好属性后 插入到编辑界面
  • 3.各对象支持拖拽操作,按Delete可删除当前选中的对象
  • 4.编辑好准备打印的内容后到“打印”TAB页,“保存配置”会将当前内容保存为XML文件
  • 5.保存配置后可以“打印预览”,也可以直接“打印”
  • 6.“读取配置”用于直接读取之前设计好的模板打印样式,文件保存在程序根目录中,默认模板为KopSoft.KopSoftPrint.PrintConfig.xml

 

 

 

                    case "{ProductPrice}":
                        string ProductPrice = null;
                        ProductPrice = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductPrice;
                        result = result.Replace("{ProductPrice}", ProductPrice);
                        break;

                    case "{ProductUnit}":
                        string ProductUnit = null;
                        ProductUnit = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductUnit;
                        result = result.Replace("{ProductUnit}", ProductUnit);
                        break;

                    case "{ProductSize}":
                        string ProductSize = null;
                        ProductSize = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductSize;
                        result = result.Replace("{ProductSize}", ProductSize);
                        break;

                    case "{ProductColor}":
                        string ProductColor = null;
                        ProductColor = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductColor;
                        result = result.Replace("{ProductColor}", ProductColor);
                        break;

                    case "{ProductSupplier}":
                        string ProductSupplier = null;
                        ProductSupplier = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductSupplier;
                        result = result.Replace("{ProductSupplier}", ProductSupplier);
                        break;

                    case "{ProductBatch}":
                        string ProductBatch = null;
                        ProductBatch = KopSoftPrint.ListSource?[KopSoftPrint.rowIndex].ProductBatch;
                        result = result.Replace("{ProductBatch}", ProductBatch);
                        break;

                    default: break;
                }
            }
            return result;

  

 

 

 

 

 

开源版地址 https://www.cnblogs.com/williamyoung/p/10535198.html

 

转载于:https://www.cnblogs.com/williamyoung/p/10752970.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是关于DevExpress程序中使用条形码二维码控件和报表打印处理的解答: 1. 使用条形码二维码控件 DevExpress提供了多种条形码二维码控件,可以帮助开发人员快速在应用程序中实现条形码二维码的生成和显示。常用的控件有: - BarCodeControl:用于生成和显示条形码。 - QRCodeControl:用于生成和显示二维码。 - DataMatrixControl:用于生成和显示Data Matrix码。 使用这些控件非常简单,只需要在窗体设计器中将控件拖拽到窗体上,然后在代码中设置控件的属性即可。例如,以下代码生成并显示一个QR码: ``` QRCodeControl qrCodeControl1 = new QRCodeControl(); qrCodeControl1.Text = "Hello, World!"; qrCodeControl1.Version = QRCodeVersion.AutoVersion; qrCodeControl1.ECI = ECIMode.None; this.Controls.Add(qrCodeControl1); ``` 2. 进行报表打印处理 DevExpress还提供了丰富的报表控件和工具,可以帮助开发人员快速创建和打印报表。常用的控件有: - XtraReport:报表设计器,用于创建报表模板。 - ReportPrintTool:报表打印工具,用于将报表模板打印成实际的报表。 使用这些控件也非常简单,只需要在窗体设计器中将控件拖拽到窗体上,然后在代码中设置控件的属性即可。例如,以下代码创建并打印一个包含条形码二维码的报表: ``` XtraReport report = new XtraReport(); report.Bands.Add(new DetailBand()); BarCodeControl barCodeControl1 = new BarCodeControl(); barCodeControl1.Text = "1234567890"; report.Controls.Add(barCodeControl1); QRCodeControl qrCodeControl1 = new QRCodeControl(); qrCodeControl1.Text = "Hello, World!"; qrCodeControl1.Version = QRCodeVersion.AutoVersion; qrCodeControl1.ECI = ECIMode.None; report.Controls.Add(qrCodeControl1); ReportPrintTool printTool = new ReportPrintTool(report); printTool.ShowPreview(); ``` 以上是关于DevExpress程序中使用条形码二维码控件和报表打印处理的解答,希望能够帮助到你。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值