Rilevamento automatico del disco rigido della stampante per GPD
Aggiungere voci al file GDL per tutte le funzionalità correlate al disco rigido nel file GPD. Ad esempio, se si dispone di una funzionalità Collate che dipende dal fatto che sia installato un disco rigido, è possibile usare la configurazione automatica per determinare automaticamente se la stampante è in grado di comprimere. Si consideri l'esempio di codice seguente da un file 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
}
}
Per rilevare automaticamente se è installato un disco rigido e abilitare o disabilitare la compressione di conseguenza, aggiungere semplicemente l'esempio di codice seguente al file 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)
}
}