简体   繁体   English

如何使用C#在ASP.NET中直接打印发票?

[英]How to print invoice directly in ASP.NET using C#?

I am currently working on asp.net c# Project on POS (Point Of Sale). 我目前正在POS(销售点)上的asp.net c#项目上工作。 I am using JavaScript function on page load but it populate print dialogue box in google chrome. 我在页面加载时使用JavaScript函数,但它会在Google Chrome中填充打印对话框。 This is my page load JavaScript function. 这是我的页面加载JavaScript函数。

<script type="text/javascript">
        window.onload = function () {`enter code here`
            window.print();

        }

</script>

I don't want this Google Chrome print dialog box. 我不想要这个Google Chrome打印对话框。 How can in print invoice directly on button click? 如何在打印发票上直接单击按钮? I am stuck at this point. 我被困在这一点上。

What I have tried: I used JavaScript function. 我尝试过的内容:我使用了JavaScript函数。 I want some C# function which directly print the invoice. 我需要一些直接打印发票的C#函数。

You may have alternate way . 您可能有其他选择

  • Save items in database, which you wants to print. 将项目保存在要打印的数据库中。
  • Run window service, which collect this printable item and print in back end. 运行窗口服务,该服务收集此可打印项目并在​​后端打印。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM