internal static cPrinter getcPrint(
PrintDialog printDialog,
string deviceName,
string driverName,
string port,
int orientation,
int paperSize,
int width,
int height)
{
cPrinter o = new cPrinter(printDialog);
o.setDeviceName(deviceName);
o.setDriverName(driverName);
o.setPort(port);
cReportPaperInfo paperInfo = o.getPaperInfo();
paperInfo.setOrientation(orientation);
paperInfo.setPaperSize((csReportPaperType)paperSize);
if (width == 0 || height == 0)
{
getSizeFromPaperSize((csReportPaperType)paperSize, orientation, out width, out height);
}
paperInfo.setWidth(width);
paperInfo.setHeight(height);
return o;
}