public static cPrinter getcPrinterFromDefaultPrinter(PrintDialog printDialog)
{
String deviceName = "";
String driverName = "";
String port = "";
int paperSize = 0;
int orientation = 0;
int width = 0;
int height = 0;
getDefaultPrinter(out deviceName, out driverName, out port, out paperSize, out orientation, out width, out height);
if (deviceName != "")
{
return getcPrint(printDialog, deviceName, driverName, port, orientation, paperSize, width, height);
}
else
{
return null;
}
}