Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to Web Server Printer

Status
Not open for further replies.

msmith425

MIS
Jan 29, 2002
15
0
0
US
I'm developing a small web app that takes the users name from a web form and prints it out to a label printer.

My problem is that I don't know how to go about printing. I do not want to print the web form just the data that the user has entered. The printer is a special label printer but it will be connected from the web server so no client side code needed.

I don't know if I should capture the information to a file and then print or ir it can be printed directly.

TIA
Marc

 
Look up "System.Drawing.Printing.PrintDocument"

You can user system.drawing to draw directly to the printer.

Here are some of the lines of code.

The sub PrintDocPage actually writes to the printer

Dim printDoc As System.Drawing.Printing.PrintDocument = _
New System.Drawing.Printing.PrintDocument()
AddHandler printDoc.PrintPage, AddressOf PrintDocPage

printDoc.Print()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top