如何打印一行并停止分页符C# [英] how to print one line and stop page breaks C#

查看:99
本文介绍了如何打印一行并停止分页符C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我写了从数据库中获取记录的代码,然后将该记录写入txt文件,然后打印该记录,但是当我在dotMatrix打印机中打印该记录时,其打印一行和一页都中断了,因为txt文件只包含一个记录.我需要控制打印机分页符.

仅当记录计数器超过10条记录时才分页.



所以请帮助我,并给我任何参考代码.

谢谢所有人

Dear All ,

i write code which is get the record from database and write that record into txt file and then print the record but when i print the record in dotMatrix printer its print one line and page is break because txt file contain only one record . i need to control the printer page break.

page break only case when record counter exceed the 10 record.



so please help me and give me any reference code.

thanks all

推荐答案

当您需要新页面时,像创建文件一样创建文件.但是,不要在每条记录之后打印,而是将下9条附加到原始文件中,这样您就有10条记录.然后打印.然后重复.
When you need a new page, create the file like you do. However, instead of printing after every record, append the next 9 to the original file so that you have 10 records. Then print. Then repeat.


这篇关于如何打印一行并停止分页符C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆