使用Asp.net中的点阵打印机在收据上打印数据 [英] Print data on a Receipt using Dot Matrix Printer in Asp.net

查看:77
本文介绍了使用Asp.net中的点阵打印机在收据上打印数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有这样的发票收据:



Hi,

I have an Invoice Receipt like this :

                         < Invoice Receipt >                        Receipt No : 1

First Name :                                         Last Name : 

Age        :                                         Address   :

Amount Paid : 


Date of Payment : 





用户在dotmatrix打印机中插入此收据纸&从Web应用程序打印,然后用户信息应显示在相应的标题前面。



这是一个Web应用程序,任何人都可以帮助我如何实现这一目标。



先谢谢。



User insert this receipt paper in dotmatrix printer & hit print from web application then user information should display in front of their corresponding titles.

It is a web application, can anyone please help me how to achieve this.

Thanks in Advance.

推荐答案

当您在客户端上打印时,您需要向客户提供格式合适的html(或其他文件类型)



您可以使用打印样式表(参见在其中 [ ^ ]有一个很好的解释。



或者你可以建立(比方说)a PDF文件服务器端并将其提供给用户进行打印。
As you are printing on the client you need to provide the client with suitably formatted html (or other file type)

You can use a print style sheet (see here[^] for a good explanation.

Alternatively you can build (say) a PDF file server-side and provide it to the user to print.


你当然可以用CSS制作单页 - 如果你想一次打印多个页面' 这会很难der。



是否需要预先打印的文具?将标题和数据一起打印要容易得多



使用CSS,您可以指定以cm为单位的大小(例如),所以通过一些实验,您应该是能够让它排队好。



如果你需要准确,那么可能会产生一个PDF服务器端。更复杂的事情 - 但是有些库(例如textSharp)可以帮助你做到这一点。
You could certainly do it for a single page with CSS - if you want to print multiple pages ''in one go'' it would be harder.

Is it necessary to have pre-printed stationery? It would be far easier to print the titles and the data together

With CSS you can specify sizes in cm (for example) so with a bit of experimentation you should be able to get it to line up OK.

If you need to be exact, then probably generating a PDF server side is the way to go. More complex to do - but there are libraries out there (such as textSharp) that would help you do that.


这篇关于使用Asp.net中的点阵打印机在收据上打印数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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