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
4
votes
0 answers

Print range is not working even if it's values are set

I've written code for print the datagridview. But when I set the range of using "AllowSomePages = true" it still prints all the pages. Here is the code I've written for printing. Already referred from below code but still not working. Print range…
root
  • 41
  • 3
4
votes
1 answer

TPrintDialog and reading orientation parameter

Is there possibility to read from TPrintDialog orientation of page (horizontal/vertical) chosen by the user? In classical solution: if PrintDialog1.Execute() then begin Printer.Orientation := poLandscape //I want read this parameter from…
Artik
  • 803
  • 14
  • 36
4
votes
0 answers

How do i print all columns and rows from a datagrid?

I have a wpf application. Upon a user request I create a datagrid of certain columns for all the data from a database. I need to print this information. Preferably I would like to print all odd pages first and then all even pages with a header…
Cass
  • 537
  • 1
  • 7
  • 24
4
votes
1 answer

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…
user1228
4
votes
3 answers

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…
sbartlett
  • 43
  • 1
  • 1
  • 4
3
votes
1 answer

C# Winform PrintDialog Pages popup

in C# Winform, i'm sending an Image to the printer using the PrintDialog... using this code: private void PrintSnippedImage() { PrintDocument pDoc = new PrintDocument(); pDoc.PrintPage += PrintPage; PrintDialog…
eric K.
  • 43
  • 5
3
votes
1 answer

Intercepting PrintDialog to XPS Document Writer

Currently I am providing the user with two controls: Save and Print. When the user selects Save, a region of the WPF display is packaged up and sent through a XpsDocumentWriter and the user is prompted and encouraged to sign the new xps document. …
zschmid
  • 33
  • 3
3
votes
2 answers

Using the usual Windows Print Dialog instead of Java's dialog

How can I use the standard Windows Print dialog to print instead of the Java Dialog. I got problems printing a barcode with a label-printer. When I print via the Java-Print Dialog I get an error telling me that the format of the document which I…
Kevin Goedecke
  • 1,553
  • 2
  • 14
  • 26
3
votes
0 answers

WPF Print canvas to fit page

I am trying to print a canvas to both printer and file with the help of PrintDialog. I want the canvas to fit the page. I was able to achieve it using the following code private void Print(Visual v) { System.Windows.FrameworkElement e = v as…
Subru
  • 343
  • 2
  • 13
3
votes
1 answer

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…
Unknown Coder
  • 6,625
  • 20
  • 79
  • 129
3
votes
3 answers

PrintDocument.Print() throws a Win32Exception

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…
ChrisFletcher
  • 1,010
  • 2
  • 14
  • 31
3
votes
1 answer

Change printername in PrintDialog through code

I am attempting to change the selected printer of my PrintDialog through code. I am creating an image that needs to be printed, but the size of the image determines which printer should be used. I have the name of the printer that I want to use but…
user2212315
  • 41
  • 1
  • 3
3
votes
1 answer

When I print bitmap, it eats up some of it

In my application i have a chart which is surrounded inside a panel. I added a printdocument component from the toolbox and when i want to print the chart, i am creating a bitmap and i get the panel inside the bitmap (and as a result the chart which…
George Georgiou
  • 455
  • 2
  • 14
  • 27
2
votes
1 answer

Set Print Orientation on PrintDialog using Flow Document

Just wondering if there is a way to set the print document orientation on a Print Dialog that is using a flow document. e.g. var document = userControl.Content as FlowDocument; var printDialog = new PrintDialog(); if (printDialog.ShowDialog() ==…
merbla
  • 537
  • 6
  • 14
2
votes
1 answer

Print WPF grid without GridLines

I have grid array and I want to print all the grid.each grid have in his cell textbox the grid set to ShowGridLines = false; and also I have a method the remove the textbox border. private void DeletBorder() { Thickness bor = new…
MoShe
  • 6,197
  • 17
  • 51
  • 77
1
2
3
11 12