Custom paper size when printing...

Gary Harpin <[email protected]> Mon, 19 Nov 2007 14:09:38 -0000
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
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]