I have 3 printers connected to my computer, and in my win form I select print by name, in code (I do not use PrintDialog). Each printer has a different paper size (small, medium and large). Is there a way to get the paper size for the current printer. I'm trying to
Console.WriteLine(e.PageSettings.Bounds.ToString());
Console.WriteLine(e.PageSettings.PaperSize.ToString());
Console.WriteLine(e.Graphics.VisibleClipBounds.ToString());
Console.WriteLine(e.Graphics.ClipBounds.ToString());
I get the e variable from my delegate options method:
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(PrintLabel);
private void PrintLabel(object o, PrintPageEventArgs e)
{
Console.WriteLine(e.PageSettings.Bounds.ToString());
}
But it shows me the same size, no matter which printer I use. Thanks in advance.
source
share