使用c#从打印机获取纸张尺寸和位置 [英] Get the Paper size and Position from the printer using c#
问题描述
我正在处理一个用于打印CHEQUE的项目,
我现在面临的问题是,由于支票的大小是一个小矩形,我无法将其水平放置(正常位置),我将其垂直放置90度.
现在我面临的问题是
.我做过的程序在侧面进纸打印机中工作正常,但在中央进纸打印机中,打印不规则.
所以现在我应该有一种方法来获取支票的大小和支票在打印机中的放置位置.这样我就可以从那个位置开始打印了.
希望您能理解我的问题.
在此先谢谢您
I am working on a project which is used to print a CHEQUE,
the problem which i face now is, since the Size of the cheque is small rectangle i cannot place it horizontally(normal position), i am placing it vertically 90degree rotated.
Now the problem i face is
. The program which i did works fine in Side feeding printer , but in center feeding printer it prints irregularly.
so now i should get a way to get the cheque size and the place where the cheque is placed in the printer. so that i can start my printing from that position.
I hope you understand my problem.
Thanks in advance
推荐答案
打印机如何知道里面有什么纸?是否将其设置为特定的自定义纸张尺寸?如果打印机不知道里面有什么纸,那么您的程序也将无法分辨.
How does the printer know what paper is in it ? Does it get set to a certain custom paper size ? If the printer doesn''t know what paper is in it, your program isn''t going to be able to tell, either.
我是这个C#和Printing的新手.并不是那么有经验.那就是为什么我问这个.有什么方法可以从打印机获取纸张尺寸和纸张位置.
bcz我需要这个.
i am new to this c# and printing.i am not so experienced. thats why i ask this. is there any way of getting paper size and paper position from the printer.
bcz i need that.
好吧,如果您想添加一些内容,那么您真的应该编辑您的帖子.并不是说您确实添加了任何东西.就像我说的那样,如果没有将打印机设置为使用特殊的纸张尺寸,那么可以肯定的是,它不知道支票的尺寸或位置,因此您的代码是不可能的来解决.
Well, you really should edit your post if you want to add something. Not that you added anything, really. Like I said, if the printer has not been set up to use a special paper size, then it''s for certain that it doesn''t know the size or location of your cheque, therefore it''s impossible for your code to work it out.
这篇关于使用c#从打印机获取纸张尺寸和位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!