Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 132,679 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,195 people online right now. Registration is fast and FREE... Join Now!




printDialog

 
Reply to this topicStart new topic

printDialog, when printing, the result does not take the settings of the printDialo

siu
post 31 May, 2008 - 08:28 AM
Post #1


New D.I.C Head

*
Joined: 31 May, 2008
Posts: 2

Hi, i'm having trouble when using the printDialog. After the user chooses settings from the printDialog like the FromPage, ToPage, Number of Copies, etc, when hit the print button, the printer always print all the pages and doesn't print more copies from each. I don't understand why this is happening, what did I do wrong. When I debug, the properties of the printDocument are set according to the printDialog, so why when printDocument.print() is executed, it doesn't follow the settings established by the printDialog?


CODE


PrintDialog pd1 = new PrintDialog();
pd1.AllowSomePages = true;
pd1.Doment = this.printDocument1;

if(pd1.ShowDialog()==DialogResult.Ok)
   this.printDocument1.Print();



For my example, I use a printing code that prints contents that makes for example 33 pages
I choose to print from Page 3 to Page 5
I choose to print 3 copies of each

When I click to print

It prints all 33 pages
User is offlineProfile CardPM

Go to the top of the page

djkitt
post 2 Jun, 2008 - 01:12 PM
Post #2


D.I.C Head

**
Joined: 22 May, 2008
Posts: 128



Thanked 13 times
My Contributions


Hey there siu,

Look under the printDialog1.PrinterSettings area.

I think you must not be handling the .PrinterSettings.FromPage and .PrinterSettings.ToPage variables.

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:40AM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month