自動偵測印表機的 PPD 硬碟
針對 PPD 檔案中的任何硬碟相關功能,將專案新增至 GDL 檔案。 您可以使用上一個範例所示的相同技術,在 GDL 檔案中建立對應的功能建構來完成此作業。 下列 GDL 建構會自動偵測是否已安裝硬碟。
*% The GDL parser merges this feature definition with the
*% corresponding feature construct in the GPD file
*Feature: PrinterHardDisk
{
*FeatureType: PRINTER_PROPERTY
*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)
}
}