Re: Custom paper size when printing...
Gary Harpin <[email protected]> Tue, 20 Nov 2007 08:58:55 -0000
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the reply. I have managed to test against a few more printers, only the Samsungs seem to fail. I'll try to talk to someone at Samsung as the software need to work with them. Regards, Gary Harpin ________________________________ "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match.." Bill Bryson [No Disclaimer] > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps > and controls [mailto:[email protected]] On Behalf Of > Chris Bordeman > Sent: Monday, November 19, 2007 2:51 PM > To: [email protected] > Subject: Re: [DOTNET-WINFORMS] Custom paper size when printing... > > Lots of printer drivers don't do custom page sizes well, so the latter > is quite possible. > > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps > and controls [mailto:[email protected]] On Behalf Of > Gary Harpin > Sent: Monday, November 19, 2007 8:10 AM > To: [email protected] > Subject: [DOTNET-WINFORMS] Custom paper size when printing... > > I have the need to automatical print to a custom paper size on a named > printer. > > The code I have is basicaly as below: > --------------------------------------------------------------- > ... > PrintDocument prnDoc = new PrintDocument(); prnDoc.PrintPage += new > PrintPageEventHandler(OnPrintPage); > prnDoc.PrinterSettings.PrinterName = "Samsung ML-2010 Series"; > > PaperSize ps = new PaperSize("Custom", 600, 400); > > prnDoc.DefaultPageSettings.PaperSize = ps; > > prnDoc.Print(); > ... > ---------------------------------------------------------------- > > On most of the printers available to me this code works as expected, > however on Samsung printers it dose not (it allways prints to A4). > > Is this an error in my understanding of how to set custom paper sizes > or > could it be an error in how the Samsung drivers work with the > framework? > > > Thank you. > > Regards, > Gary Harpin > > ________________________________ > > "...a computer is a stupid machine with the ability to do incredibly > smart things, while computer programmers are smart people with the > ability to do incredibly stupid things. They are, in short, a perfect > match.." Bill Bryson > > > > [No Disclaimer] >