選取範圍與安裝之間的條件約束
重要
新式列印平臺是 Windows 與印表機通訊的慣用方法。 我們建議您使用Microsoft的 IPP 收件匣類別驅動程式,以及列印支援應用程式 (PSA),自定義 Windows 10 和 11 中的列印體驗,以進行印表機裝置開發。
如需詳細資訊,請參閱 列印支援應用程式設計指南。
有時候,如果安裝某些其他選項,或某些選項未安裝,則無法選取特定選項。 例如,如果未安裝印表機的大型紙匣,使用者就不應該選取 Tabloid 紙張。
若要指定特定選項與其他選項安裝狀態之間的關聯性,請使用 *InstalledConstraints 和 *NotInstalledConstraints 專案。 格式為:
InstalledConstraints:*FeatureName。OptionName
NotInstalledConstraints:*FeatureName。OptionName
其中 FeatureName 是功能的名稱,而 OptionName 是與功能相關聯的選項名稱。 如果自變數是特徵,則不包含period和 OptionName 。
*InstalledConstraints 或 *NotInstalledConstraints 項目必須放在 *Feature 或 *Option 專案內。 例如,若要指出如果印表機的大型紙匣未安裝,使用者就不應該選取 Tabloid 紙張,可以使用下列專案:
*Feature: InputBin
{
*Option: LARGEFMT
{
Installable?: TRUE
NotInstalledConstraints: PaperSize.TABLOID
}
}
如果功能或選項包含 *InstalledConstraints 或 *NotInstalledConstraints 專案,則功能或選項的 *Installable? 屬性必須設定為 TRUE。