使用ASP.net自定义打印c# [英] Custom printing using ASP.net c#

查看:91
本文介绍了使用ASP.net自定义打印c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个ASP.net页面,其中有4个文本框,数据保存在文本框中。我想创建一个按钮,弹出窗口会显示三个控件:



1.下拉列表显示打印机列表(选定的打印机应该用于打印目的) )

2.显示要打印的份数。 (提及份数)。

3.打印按钮(实际上将从下拉列表打印所选打印机上的页面,并在第二个控件中配置份数,即文本框)



有没有办法使用.net 3.5版本???





提前致谢。

解决方案

使用ASP.NET ...



1.您无法获得已安装的列表客户打印机。 ASP.NET是一个无法访问客户端计算机的服务器端框架。要获得客户端安装的打印机列表,您需要一个基于ActiveX,Flash,Silverlight等其他客户端技术的外部工具....



2这没问题......



3.通过经典的javascript window.print()打印不是可配置的,即你不能指定打印机名称,副本等。



顺便问一下......你需要打印什么样的文件? PDF?文档? html格式的内容页面?什么?

We have a ASP.net page with 4 textboxes and data saved in textboxes. I want to create a button which will result into a pop-up showing three controls:

1. Dropdown showing list of Printers ( Selected printer should be used for printing purpose)
2. Showing number of copies to be printed. (Mention number of copies).
3. Print button (Which will actually print pages on selected printer from dropdown with number of copies configured in 2nd control i.e. text box)

Is there any way to do this using .net 3.5 version ???


Thanks in advance.

解决方案

With ASP.NET...

1. You cannot get a list of installed client printers. ASP.NET is a server side framework that cannot access client machine. To get a list of installed printers at the client side you need an external tool based on some client tech like ActiveX, Flash, Silverlight, others....

2. No problem with this...

3. Printing through classic javascript window.print() is not "configurable" i.e. you cannot specify printer name, copies, etc.

By the way... what kind of file do you need to print? pdf? doc? the content page in html format? what?


这篇关于使用ASP.net自定义打印c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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