Click here to Skip to main content
11,923,958 members (65,462 online)
Rate this:
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 18:15pm
tumbledDown2earth 14-Apr-13 9:40am
Check you driver details from your manual .. may be there is a hint there
Jayanta Chatterjee 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151125.3 | 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