Solved

Printing To Network Printers From ASP .Net Application

Posted on 2002-07-11
6
347 Views
Last Modified: 2010-04-14
Is there any information or directions on how to  configure a printing environment with ASP .Net as the intended programming language? I understand there are some issues related to the default ASPNET account,changes to machine.config, user permissions, etc. I'd like info on what is required on IIS,Active Directory,IP protocol Printing. I simply want to print data retrieved from a dataset to a network printer from an ASP .Net web form. Any lead will be greatly appreciated.
0
Comment
Question by:dxrodela
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Accepted Solution

by:
naveenkohli earned 100 total points
ID: 7146955
I think you will need to use PrintDocument class to make this work. Althugh this is for WIndows forms application but with little bit of cutomization you should be able to work.

The whole idea is to have the text in StreamReader class and then associate that streeam with PrintDocument class. The problem will be that you will have to know the printer settings before hand to set the default settings. On server side you can't invoke the select printer or page setup dialog box. You should be able to get rid of the print event handlers from the code. In the document ation there is a nice sample "SamplePad" for printing demo. It should be a good starting point. Here is a small code snippet from documentation.

0
 

Author Comment

by:dxrodela
ID: 7147005
naveenkohli,
Thanks for the info. I understand the process but still unfamiliar with the StreamReader,PrintDocument classes. However, I will pursue this direction. But, you stated, "In the documentation there is a nice sample", mentioning "SamplePad" demo. Where is the demo located?
Also, I'm assuming all I need to do is configure my printers on my server,request the user select a network printer(I'll provide a list on a form),and send my PrintDocument object to the selected printer. Please clarify any details I've missed. Thanks.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7147065
>>Where is the demo located?
Look in Help files under PrintDialog Class -> samples
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 28

Expert Comment

by:AzraSound
ID: 7147078
In case you didnt have the code for enumerating printers:

"Enumerating the VB.Net Printers Collection"
http://www.aspalliance.com/jeffwids/articles.aspx?105
0
 

Author Comment

by:dxrodela
ID: 7147097
Thank you AzraSound. I'd give you pts too, but naveenkohli had the first lead. I'm studying the code now and can see it will be very helpful in many ways.
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 7147104
You will have to be very careful with this implementation. You can't leave any detail or selection to be made through dialog box raised on server. Otherwise your application will hang.
Azra has provided you nice reference to enumerating printers. Other than that if you follow the "SamplePad" example, I am sure that you will be able to accomplish it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now