Getting Printer Information Example for C#
private void GetPrinterInfo(ref LTDICPRNSCULib.LEADDicomPrintSCU
objPrintSCU)
{
// Assume that the Association is already established
// We need only the Printer Status and Printer Status
Info;
objPrintSCU.Printer.RequiredInfo
= LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS
| LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS_INFO;
// Query the Print SCP for the information
if (objPrintSCU.Printer.GetInfo(true, false)
== (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// Display the retrieved information
MessageBox.Show("Printer Status: " + objPrintSCU.Printer.PrinterStatus + System.Environment.NewLine
+ "Printer Status Info: " + objPrintSCU.Printer.PrinterStatusInfo,
"Printer Info");
}
}