F
felrayes
Hello,
Does anyone know how we can change the paper size for the current
active printer?
I need to change the paper size to a well known size (not a custom
size).
I tried something like the following:
PrinterSettings ps = new PrinterSettings();
ps.PrinterName = "MyPrinterName";
PrinterConfiguration pc = new PrinterConfiguration();
PageSettings paS = new PageSettings(ps);
for (int count = 0; count < ps.PaperSizes.Count; count++)
{
if (condition)
{
paS.PaperSize = ps.PaperSizes[count];
pc.ChangePrinterPaperSize("MyPrinterName",
paS.PaperSize);
paperSize = paS.PaperSize;
break;
}
}
Your help is greatly appreciated.
Ferass
Does anyone know how we can change the paper size for the current
active printer?
I need to change the paper size to a well known size (not a custom
size).
I tried something like the following:
PrinterSettings ps = new PrinterSettings();
ps.PrinterName = "MyPrinterName";
PrinterConfiguration pc = new PrinterConfiguration();
PageSettings paS = new PageSettings(ps);
for (int count = 0; count < ps.PaperSizes.Count; count++)
{
if (condition)
{
paS.PaperSize = ps.PaperSizes[count];
pc.ChangePrinterPaperSize("MyPrinterName",
paS.PaperSize);
paperSize = paS.PaperSize;
break;
}
}
Your help is greatly appreciated.
Ferass