特定管理 > 支援視覺化與發行 > Windchill Visualization Services 發佈 (批次列印) > 簡易印表機組態
  
簡易印表機組態
簡介
印表機組態會定義可用印表機的清單,以及每個印表機的預設值與條件約束。有效的 PrinterConfig.xml 可用來使用「視覺化組態管理」公用程式在「網站」「組織」容器中建立印表機組態。若要啟用「批次列印」,也需要有效的印表機組態。如需瞭解牽涉到建構 PrinterConfig.xml 的不同可能性與條件約束,請參閱 $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfigSchema.xsd 結構描述定義。
如需有關簡單 PrinterConfig.xml 的可供配置元素與屬性的詳細資訊,請參閱 $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-SimpleTemplate.xsd
如需有關複雜 PrinterConfig.xml 的可供配置元素與屬性的詳細資訊,請參閱 $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-ComplexTemplate.xsd
此外,$wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-WorkingExample.xsd 包含 PrinterConfig.xml 的樣本印表機組態。
<printers resource="com.ptc.windchill.enterprise.wvs.batchPrint.batchPrintResource">
快速啟動指示
以下是典型的簡易印表機組態。用您網站的特定值取代變數。
變數屬性名稱
描述
worker_hostname
這是針對支援此印表機的 printworker (例如,"printworker1.ptcnet.ptc.com") 列於 $wt_home/conf/wvs/agent.ini 中的主機名稱 ("host" 屬性的值)。
printername
印表機的名稱。這是 printworker 用來與列印檔案的印表機通訊的名稱 (例如 "\\AH-MP2\AH-8PT-PRINTER")。
「範例:」
<printerid="1" name="printer_name" workerhost="worker_hostname" workertype="PRINT" />
<defaultprinters defaultprinterid="1" />
<printabletypes> <pvtype type="model" filter="exclude" />
* 
必須新增以下這一行,因為批次列印不支援 Microsoft 文件類型。
<pvtype type="document" filter="exclude" filterby="doc docx xls xlsx ppt pptx" /></printabletypes>
現成的預設值
此區段定義紙張大小、紙張定向、列印比例與單位的預設值。這些項目只會在工作與/或印表機使用這些內容時使用。請勿 刪除此區段中的行。您的管理員可以修改現有項目,或新增紙張大小、紙張定向、列印比例或單位的自訂項目。
pvsid 數字是內部數字,不得變更。會針對所有網站特定自訂保留 pvsid=1,並針對其他 (或不明) 項目保留 pvsid=0
對於以下區段中的紙張大小、紙張定向、比例與單位元素,您可以定義 resourcekey 屬性。若已定義,此 resourcekey 的值會在批次列印 UI 中使用。resourcekey 必須存在於之前在 printers 元素區段中定義的資源中。若未定義 resourcekey,則會在批次列印 UI 中使用名稱值。
<papersizes> <size id="0" name="Unknown" pvsid="0" /> <size id="1" name="Custom1" pvsid="1" width="3" height="4" units="in" /> <size id="2" name="Custom2" pvsid="1" width="5" height="6" units="in" /> <size id="3" name="Custom3" pvsid="1" width="8" height="10" units="in" /> <size id="4" name="Letter" pvsid="2" width="8.5" height="11" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_LETTER" /> <size id="5" name="Legal" pvsid="3" width="8.5" height="14" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_LEGAL" /> <size id="6" name="Tabloid" pvsid="4" width="11" height="17" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_TABLOID" /> <size id="7" name="ANSI_A" pvsid="2" width="8.5" height="11" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_A" /> <size id="8" name="ANSI_B" pvsid="4" width="11" height="17" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_B" /> <size id="9" name="ANSI_C" pvsid="5" width="17" height="22" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_C" /> <size id="10" name="ANSI_D" pvsid="6" width="22" height="34" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_D" /> <size id="11" name="ANSI_E" pvsid="7" width="34" height="44" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_E" /> <size id="12" name="ANSI_F" pvsid="8" width="28" height="40" units="in" /> resourcekey="PRINT_CONFIG_PAPERSIZE_ANSI_F" /> <size id="13" name="A0" pvsid="9" width="841" height="1189" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A0" /> <size id="14" name="A1" pvsid="10" width="594" height="841" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A1" /> <size id="15" name="A2" pvsid="11" width="420" height="594" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A2" /> <size id="16" name="A2" pvsid="12" width="297" height="420" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A3" /> <size id="17" name="A4" pvsid="13" width="210" height="297" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A4" /> <size id="18" name="A5" pvsid="14" width="148.5" height="210" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A5" /> <size id="19" name="A6" pvsid="15" width="105" height="148.5" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A6" /> <size id="20" name="A7" pvsid="16" width="74" height="105" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A7" /> <size id="21" name="A8" pvsid="17" width="52" height="74" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A8" /> <size id="22" name="A9" pvsid="18" width="37" height="52" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A9" /> <size id="23" name="A10" pvsid="19" width="26" height="37" units="mm" /> resourcekey="PRINT_CONFIG_PAPERSIZE_A10" /></papersizes>
<paperorientation> <orientation id="0" pvsid="0" name="Unknown" /> <orientation id="1" pvsid="1" name="Landscape" resourcekey="PRINT_CONFIG_PAPERORIENTATION_LANDSCAPE" /> <orientation id="2" pvsid="2" name="Portrait" resourcekey="PRINT_CONFIG_PAPERORIENTATION_PORTRAIT" /> </paperorientation>
<printscales> <scale id="0" pvsid="0" name="Unknown" /> <scale id="1" pvsid="1" name="Fit to Page" resourcekey="PRINT_CONFIG_PRINTSCALES_FITTOPAGE" /> <scale id="2" pvsid="2" name="1.00" <scale id="3" pvsid="3" name="0.75" <scale id="4" pvsid="4" name="0.50" <scale id="5" pvsid="5" name="0.25" </printscales>
<units> <unit id="0" pvsid="0" name="Unknown" /> <unit id="1" pvsid="1" name="Custom Metric" /> <unit id="2" pvsid="2" name="Custom Imperial" /> <unit id="3" pvsid="3" name="km" /> <unit id="4" pvsid="4" name="m" /> <unit id="5" pvsid="5" name="cm" /> <unit id="6" pvsid="6" name="mm" /> <unit id="7" pvsid="7" name="micron" /> <unit id="8" pvsid="8" name="nanometer" /> <unit id="9" pvsid="9" name="mile" /> <unit id="10" pvsid="10" name="yd" /> <unit id="11" pvsid="11" name="ft" /> <unit id="12" pvsid="12" name="in" /> <unit id="13" pvsid="13" name="mil" /> <unit id="14" pvsid="14" name="point" /> </units>
</printers>