Click here to Skip to main content
11,811,971 members (58,487 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# printing
I created a application to print the invoice and challan. so generally invoice paper size is "A4" and Challan paper size is "custom".
So, When I set the paper size "A4", its print fine... but when i want to print custom paper size then it print different, from others printer and it print the multiple pages.

My code is :-
DialogResult dr = MessageBox.Show("Do You Want to Print?", "Print", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
   if (dr == DialogResult.Yes)
       printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Custom", 670, 846);
       printDocument1.PrinterSettings.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Custom", 670, 846);                    

It happens on "HP Leserjet 1015" printer Only...
Thanks in advanced..
Posted 13-Apr-13 17:15pm
tumbledDown2earth at 14-Apr-13 9:40am
Check you driver details from your manual .. may be there is a hint there
Jayanta Chatterjee at 14-Apr-13 10:09am
what will I check from driver manual??
but this happens only with my software, otherwise its good.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 354
1 Palash Mondal_ 185
2 CHill60 180
3 OriginalGriff 178
4 Abhinav S 175
0 OriginalGriff 3,888
1 KrunalRohit 2,392
2 CPallini 2,240
3 Maciej Los 2,155
4 ppolymorphe 1,725

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 13 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100