使用.NET printdocument的动态纸张高度 [英] Dynamic paper height with .NET printdocument

查看:107
本文介绍了使用.NET printdocument的动态纸张高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是我需要打印发票,它可能包含10行或者可能包含20行。每件东西都应该在一张发票上。



例如,如果你去任何超市,如果你买3件物品,你可能会收到小额账单。如果您购买30件商品,您可能会收到大笔账单。我想在我的vb.net应用程序中实现相同的功能。



我需要的是如何根据账单的性质通过程序增加打印机页面长度。 />


我使用的是点阵打印机和图形模式打印。



我尝试了什么:



我试图设置4作为默认纸张长度。它看起来不是我想要的。我想打印输出,如热敏打印机(这里有无需设置纸张尺寸。)

My requirement is that i need to print invoice, it may contain 10 line or may contain 20 line. every thing should be in the one invoice.

for eg, if you go to any supermarket, if you buy 3 items, you may get small sized bill. if you buy 30 items, you might get big sized bill. i want to implement the same in my vb.net application.

exactly i need that how to increase printer page length through program according to the nature of bill.

I am using dot matrix printer and graphic mode printing.

What I have tried:

I tried to set 4" as default paper length. It will not look exactly i want. I want the printout as in thermal printer (here there is no need to set paper size).

推荐答案

System.Drawing.Printing.PrintDocument

将解决您的问题

设置打印机名称纸张尺寸ect

will solve your problem
set printer name paper size ect


这篇关于使用.NET printdocument的动态纸张高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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