![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Printing A Document Selected From A Drop Down List Hi All I am trying my hand at printing from a web page for the first time. I have been asked to print what amounts to many pages of data in response to a button click. The scenario is as follows. 1. The user will select a Product from a Drop Down List. 2. The user will press the print button 3. Based upon the product selected in the Drop Down List I need to print data gathered from 3 different data sources. In addition I need to print at least 5 different documents (2 Word Documents, 1 Spreadsheet and 2 pdf documents" to a printer specified in another drop down list. Gathering the data I can do. I have authority to use the printer using impersonateValidUser I can stream a text file and put that to the printer using Graphics.DrawString. However, what I want to do is simply give the PrintDocument object a Document name (as per the example I have tried below) and for the full document to be printed PrintDocument _doc = new PrintDocument(); string LPrinterName = @"\\Dun-Server3\" + ddlPrinter.SelectedItem.Text; _doc.PrinterSettings.PrinterName = LPrinterName; ........... _doc.DocumentName = @"\\Server1\Temp\Pdf Documents \MyPdf1.pdf"; ........... _doc.PrintPage += new PrintPageEventHandler(_doc_PrintPage); _doc.Print(); Am I going along the correct lines or is there some other way to do this. Thanks in advance for any assistance offered. Iain |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Multiple Items in a List Box are being selected | .NET General | |||
| Adding Program to list of Selected programs | Vista General | |||
| drop down list everywhere | Vista performance & maintenance | |||
| Search unable to find Word documents when "Document" type selected | Vista file management | |||
| First e-mail in list is selected at startup | Vista mail | |||