printdialog

PrintDialog filter list of printers

I need to, preferably in C# - but c++ will do, find a way to filter the list of printers in the windows print dialog for any windows printing. I have come across WinAPIOverride and have figured I am going to have to write my own dll which overrides the method to get the printers list, then filter it and return it. I would then have to i...

How to get Printer Info in .NET?

In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment. If I know a printer's name, how can I get these values in C# 2.0? ...

Print Dialog in servlet/jsp

I want to display print dialog in servlet/jsp. Below is my code: DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ; PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras); PrintService defaultService = PrintServiceLookup.lookupDefaultPrintS...

Page preferences dialog in WPF

Howdy, I'm fiddling with adding the ability to output from a program I'm working on to both PDF and XPS. Initially both were just done via printers (pdf printer/xps writer) but I'd like to do it a little more directly. The issue I've run into is that there doesn't seem to be a page preferences dialog for WPF. Is there one and I just ca...

Setting PageOrientation for the Wpf DocumentViewer PrintDialog

Using the Wpf DocumentViewer control I can't figure out how to set the PageOrientation on the PrintDialog that the DocumentViewer displays when the user clicks the print button. Is there a way to hook into this? ...

PrintDialog.ShowDialog(this) immediately returns DialogResult.Cancel on Windows 7

An in house application that I'm developing is behaving strange on a Windows 7 (64 bit) PC. If I create an instance of a PrintDialog, and call it's ShowDialog() method, the method immediately returns DialogResult.Cancel without showing the printer dialog form. The Windows 7 PC does have printers installed (with a working default printe...

PrintDocument.Print() throws a Win32Exception

Hi, I'm getting a strange exception from the following code: var printDialog = new PrintDialog(); printDialog.ShowDialog(); var printDocument = new PrintDocument { DefaultPageSettings = { Landscape = true, PrinterSettings = new PrinterSettings { PrinterName = printDialog.PrintQueue.Name } } }; var updateRe...

WPF Documentviewerbase.Print. Remove dialog box

I am using WPF and the DocumentViewer to display a document. However, when I use DocumentViewerBase.Print, it gives the "standard" Windows dialog box asking me to choose a printer with the default already selected. How can I get rid of this? I just want to use a Print method that will automatically start printing with no other prompt in ...

.net printdialog

i am building a button that allows a user to browse to a file. i want to get the location of the file and send it to printdialog. can this be done and if so how? i know how to create the browse funcitonality and how to get the location... my question is how to send the location of the file to the printdialog for printing...without o...

How to open the WPF PrintDialog as CenterOwner?

Is it possible to open the WPF PrintDialog as CenterOwner? ...

C# Windows Forms Print Dialog box click OK twice to respond

I'm using Visual Studio 2008, .net Framework 3.5 for a Windows forms client-server app that I'm working on. There is a weird bug when I run the program and try to print. The print dialog box opens, but I have to click the OK button twice for it to work. After the second click it works fine, no errors. When I put a breakpoint on: if (resu...

How can I change text on a win32 window?

Looking for hints, tips and search terms for changing the text on a win32 window from C#. More specifically, I'm trying to change the text on the print dialog from "Print" to "OK", as I am using the dialog to create a print ticket and not do any printing. How can I find the dialog's window handle? Once I've got it, how would I go about...

Enable "Current Page" in PrintDialog

Im using a System.Windows.Controls.PrintDialog to let the user print one or more pages from my application. This is what I currently got: PrintDialog printDialog = new PrintDialog(); printDialog.PageRangeSelection = PageRangeSelection.AllPages; printDialog.UserPageRangeEnabled = true; if (printDialog.Sh...

wpf simple print dialog page size issue

I'm creating a simple WPF print dialog box to setup a label printer. I want it to be very simple and so I've choosen not to use the standard WPF printdialog. All is going well accept for one thing, paper sizes. Having selected a printer from one combobox, a second combobox is populated with the paper sizes available from that device. ...