Questions tagged [printdialog]

In WPF PrintDialog is a class that invokes a standard Microsoft Windows print dialog box that configures a PrintTicket and PrintQueue according to user input and then prints a document.

In WPF PrintDialog is a class that invokes a standard Microsoft Windows print dialog box that configures a PrintTicket and PrintQueue according to user input and then prints a document.

More info

172 questions
50
votes
8 answers

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?
Nick Gotch
  • 9,167
  • 14
  • 70
  • 97
20
votes
2 answers

Customize PrintDialog Window in WPF

In my WPF application, I am going to print the contents of my ListBox. I want to add a new control to the PrintDialog box to select the number of lines (items) to print. Is it possible to customize the existing PrintDialog box and add a new control…
Roshil K
  • 2,583
  • 28
  • 38
18
votes
2 answers

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?
Mike Fagan 2dot0
12
votes
1 answer

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…
Bryan
  • 3,224
  • 9
  • 41
  • 58
11
votes
5 answers

printdialog.showdialog(); not showing the print dialog in windows 7 with 64 bit

I have custom control with print toolbar item.when print the control the dialog is not coming in windows 7 with 64 bit os in other system os working fine. problem only in windows 7 with 64 bit. my problem printdialog is not coming in windows 7 os…
sivarajini
  • 111
  • 1
  • 1
  • 3
9
votes
2 answers

java: set page range for print dialog

I'm just starting to learn how to print a window in Java/Swing. (edit: just found the Java Printing Guide) When I do this: protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok =…
Jason S
  • 184,598
  • 164
  • 608
  • 970
9
votes
1 answer

How can I retrieve the name of the printer chosen in Acrobat?

I want to get the name of the printer chosen in Acrobat PrintDialog using SendMessage Windows API. This is sample code. static string GetWindowText( hwnd_printDialog_in_Acrobat ) { int comboBoxCount = 0; int HWND_PRINTER_NAME = 1 ; …
JiY Choi
  • 91
  • 2
8
votes
2 answers

Show Print Dialog before printing

I want to show the print dialog box before printing the document, so the user can choose another printer before printing. The code for printing is: private void button1_Click(object sender, EventArgs e) { try { …
user2257581
  • 87
  • 1
  • 1
  • 9
7
votes
3 answers

WPF accessing opened print dialog and close them

I have a WPF application, which needs to log out user after 5 min of inactivity. But if user open a print dialog of any page, and do not touch screen for 5 minutes, even if I log out user and clear all child elements, print dialog still stays on…
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
6
votes
2 answers

Page-Range-Problem at Printing a Document

i try to print out the content of my editor: PrintDialog pd = new PrintDialog(); pd.PageRangeSelection = PageRangeSelection.AllPages; pd.UserPageRangeEnabled = true; FlowDocument fd =…
0xDEADBEEF
  • 3,401
  • 8
  • 37
  • 66
6
votes
3 answers

How do you prevent printing dialog when using Excel PrintOut method

When I use the PrintOut method to print a Worksheet object to a printer, the "Printing" dialog (showing filename, destination printer, pages printed and a Cancel button) is displayed even though I have set DisplayAlerts = False. The code below…
James Roes
  • 63
  • 1
  • 1
  • 6
5
votes
2 answers

Printing the content of a DocumentViewer in a different UI thread

In my WPF app, I have particular Window which contains, amongst other controls, a DocumentViewer. When this window is opened and loaded, it dynamically builds a FixedDocument with a progress indicator, and then displays it in the DocumentViewer. It…
Ross
  • 4,460
  • 2
  • 32
  • 59
5
votes
1 answer

Win32 PrintDlg, PrintDlgEx, Crashing and quirkiness

I'm tasked with solving the following issue: My application crashes when running on a 64 bit machine when the PrintDlg() function is called. After digging and hair pulling, I've decided the best solution is to replace the original calls of…
greggorob64
  • 2,487
  • 2
  • 27
  • 55
5
votes
1 answer

Printing multiple figures in matlab

Assume I produce several figures in my program. I want to give the user the option of printing them all at once. I do not want to show the print dialog for every page. Therefore, I am displaying it only once and for the first figure only. This is…
Matin Kh
  • 5,192
  • 6
  • 53
  • 77
5
votes
1 answer

Printing files in java with raster PTR printer

I have two peices of code for printing using java as seen below: The First Code for(int i = 0; i < files.length; i++) { String file = "C:\\images\\colour\\"+files[i].getName(); String filename = file; PrintRequestAttributeSet pras = new…
Liam Sorsby
  • 2,912
  • 3
  • 28
  • 51
1
2 3
11 12