<legend id='jhYna'><style id='jhYna'><dir id='jhYna'><q id='jhYna'></q></dir></style></legend>
  • <i id='jhYna'><tr id='jhYna'><dt id='jhYna'><q id='jhYna'><span id='jhYna'><b id='jhYna'><form id='jhYna'><ins id='jhYna'></ins><ul id='jhYna'></ul><sub id='jhYna'></sub></form><legend id='jhYna'></legend><bdo id='jhYna'><pre id='jhYna'><center id='jhYna'></center></pre></bdo></b><th id='jhYna'></th></span></q></dt></tr></i><div id='jhYna'><tfoot id='jhYna'></tfoot><dl id='jhYna'><fieldset id='jhYna'></fieldset></dl></div>

    1. <tfoot id='jhYna'></tfoot>
        <bdo id='jhYna'></bdo><ul id='jhYna'></ul>

      <small id='jhYna'></small><noframes id='jhYna'>

        在卷纸上打印

        Printing on roll paper(在卷纸上打印)

        <tfoot id='Y8sp2'></tfoot>

          <small id='Y8sp2'></small><noframes id='Y8sp2'>

          <legend id='Y8sp2'><style id='Y8sp2'><dir id='Y8sp2'><q id='Y8sp2'></q></dir></style></legend>

              <i id='Y8sp2'><tr id='Y8sp2'><dt id='Y8sp2'><q id='Y8sp2'><span id='Y8sp2'><b id='Y8sp2'><form id='Y8sp2'><ins id='Y8sp2'></ins><ul id='Y8sp2'></ul><sub id='Y8sp2'></sub></form><legend id='Y8sp2'></legend><bdo id='Y8sp2'><pre id='Y8sp2'><center id='Y8sp2'></center></pre></bdo></b><th id='Y8sp2'></th></span></q></dt></tr></i><div id='Y8sp2'><tfoot id='Y8sp2'></tfoot><dl id='Y8sp2'><fieldset id='Y8sp2'></fieldset></dl></div>
                <tbody id='Y8sp2'></tbody>
                • <bdo id='Y8sp2'></bdo><ul id='Y8sp2'></ul>

                  本文介绍了在卷纸上打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 Winforms 中使用 C#.我正在尝试在纸卷上打印账单.纸张的宽度为 3 英寸,但纸张的长度是动态的(它是卷纸).长度取决于列表中有多少项目.例如.在一次购买中,如果有 100 件商品售出,那么它会很长,而对于单个购买的商品,它的长度会很短.

                  I am using C# with Winforms. I am trying to print bills on a paper roll. The width of the paper is 3in but the length of the paper is dynamic (its a roll paper). The length depends on how many items are there in the list. E.g. in a purchase if there are 100 items sold then it will be quite long roll while for a single item purchased it would be of small length.

                  当我打印报告时,在结束作业后,打印机弹出的最后一页比我需要的多.它会弹出与 A4 尺寸一样长的纸张.我想打印所需的行,然后停止打印.我使用一卷纸,而不是 A4 或 A3 和 Epson LQ-300 + II 打印机.

                  When I print the report, after the end job, printer eject the last page more than I need. It eject paper as long as A4 size. I want to print the required lines, then stop printing. I use a roll of paper, not A4 or A3 and an Epson LQ-300 + II printer.

                  更具体地说,总是按页面大小的单位进行打印.如果我将页面设置为 3 英寸 x 8 英寸,那么我总是会得到一个 8 英寸长的打印输出.如果我要打印一张 9 英寸的钞票,我最终会打印出 16 英寸的纸币,浪费了 7 英寸的纸张.我怎样才能在最后一页只打印需要的长度的情况下打印?

                  To be more specific, printing is always done to page-sized units. If I set the page to be 3in x 8in then I always end up with a printout that is a multiple of 8in long. If I have a 9in bill to print, I end up with a 16in printout, wasting 7in of paper. How can I print with the last page being only as long as it needs to be?

                  代码如下:

                  private void printDoc_PrintPage(Object sender, PrintPageEventArgs e)
                          {
                              Font printFont = new Font("Courier New", 12);
                              int y = 15;
                              e.Graphics.DrawString("a Line", printFont, Brushes.Black, 0, y); y = y + 20;
                              e.Graphics.DrawString(" Line", printFont, Brushes.Black, 0, y); y = y + 25;
                              e.Graphics.DrawString(" Line", printFont, Brushes.Black, 0, y); y = y + 35;
                              e.Graphics.DrawString(" Line", printFont, Brushes.Black, 0, y); y = y + 45;
                          }
                  

                  推荐答案

                  你试过使用只有一行"长的页面吗?

                  Have you tried using a page that is only "one line" long?

                  省略上下边框,可以不间断打印.

                  Omit the upper and lower border, and you can print non stop.

                  现在添加一点(这样页面可以被撕掉)并弹出它.

                  Now add a bit (So the page can be torn off) and eject that.

                  试试这个:

                              PaperSize pkCustomSize1 = new PaperSize("First custom size", 100, 200);
                  
                              printDoc.DefaultPageSettings.PaperSize = pkCustomSize1
                  

                  见:http://msdn.microsoft.com/en-us/library/system.drawing.printing.pagesettings.papersize.aspx

                  这篇关于在卷纸上打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  How can I force the PropertyGrid to show a custom dialog for a specific property?(如何强制 PropertyGrid 显示特定属性的自定义对话框?)
                  Associate attribute with code generated property in .net(将属性与 .net 中的代码生成属性相关联)

                  <small id='SWCXk'></small><noframes id='SWCXk'>

                    <bdo id='SWCXk'></bdo><ul id='SWCXk'></ul>
                  • <i id='SWCXk'><tr id='SWCXk'><dt id='SWCXk'><q id='SWCXk'><span id='SWCXk'><b id='SWCXk'><form id='SWCXk'><ins id='SWCXk'></ins><ul id='SWCXk'></ul><sub id='SWCXk'></sub></form><legend id='SWCXk'></legend><bdo id='SWCXk'><pre id='SWCXk'><center id='SWCXk'></center></pre></bdo></b><th id='SWCXk'></th></span></q></dt></tr></i><div id='SWCXk'><tfoot id='SWCXk'></tfoot><dl id='SWCXk'><fieldset id='SWCXk'></fieldset></dl></div>

                        <tbody id='SWCXk'></tbody>
                      <tfoot id='SWCXk'></tfoot>

                            <legend id='SWCXk'><style id='SWCXk'><dir id='SWCXk'><q id='SWCXk'></q></dir></style></legend>