Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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);                    
       printDocument1.Print();                        
   }
 
It happens on "HP Leserjet 1015" printer Only...
Thanks in advanced..
Posted 13-Apr-13 18:15pm
Comments
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 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 13 Apr 2013
Copyright © CodeProject, 1999-2014
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