GPD용 프린터 하드 드라이브 자동 보호
GPD 파일의 하드 드라이브 관련 기능에 대한 항목을 GDL 파일에 추가합니다. 예를 들어 하드 드라이브 설치 여부에 따라 데이터 정렬 기능이 있는 경우 자동 구성을 사용하여 프린터가 데이터 정렬할 수 있는지 여부를 자동으로 확인할 수 있습니다. GPD 파일의 다음 코드 예제를 고려합니다.
*% Printer supports collation only if PrinterHardDisk is installed
*Feature: Collate
{
*rcNameID: 392
*DefaultOption: OFF
*Option: ON
{
*rcNameID: =ON_DISPLAY
*switch: PrinterHardDisk
{
*case: FALSE
{
*Command: CmdSelect
{
*Order: JOB_SETUP.5
*% Collate requested but no disk =>
*% printer collate disabled
*% Print Processor will take care
*% of collated copies
*Cmd: ""
}
}
*case: TRUE
{
*Command: CmdSelect
{
*Order: JOB_SETUP.5
*% Collate requested with disk =>
*% printer collate enabled
*% Printer will take care of collated copies
*Cmd: "@PJL SET QTY=" %d{NumOfCopies}"<0A>"
}
}
}
}
*Option: OFF
{
*rcNameID: =OFF_DISPLAY
*Command: CmdSelect
{
*Order: JOB_SETUP.5
*Cmd: ""
}
}
}
*% Feature to explicitly constrain the Collate feature
*Feature: PrinterHardDisk
{
*rcNameID: 430 *% Printer Hard Disk
*HelpIndex: 12002
*FeatureType: PRINTER_PROPERTY
*DefaultOption: FALSE
*Option: FALSE
{
*rcNameID: 444
*DisabledFeatures: Collate.ON
}
*Option: TRUE
{
*rcNameID: 443
}
}
하드 디스크가 설치되어 있는지 여부를 자동으로 감지하고 그에 따라 정렬을 사용하거나 사용하지 않도록 설정하려면 GDL 파일에 다음 코드 예제를 추가하기만 하면됩니다.
*%The GDL parser merges this code with the corresponding feature construct in the GPD file
*Feature: PrinterHardDisk
{
*% *BidiQuery and *BidiResponse constructs must have the same names
*BidiQuery: PrinterHardDisk
{
*QueryString: "\Printer.Configuration.HardDisk:Installed"
}
*BidiResponse: PrinterHardDisk
{
*ResponseType: BIDI_BOOL
*ResponseData: ENUM_OPTION (PrinterHardDisk)
}
*Option: FALSE
{
*BidiValue: BOOL(FALSE)
}
*Option: TRUE
{
*BidiValue: BOOL(TRUE)
}
}