Simple Printer Configuration
Introduction
A printer configuration defines a list of available printers, along with the defaults and constraints for each printer. A valid PrinterConfig.xml can be used to create a printer configuration at the Site or Organizations containers using the Visualization Configuration Administration utility. A valid printer configuration is also required in order to enable Batch Print. Refer to the $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfigSchema.xsd schema definition to understand different possibilities and constraints involved in constructing a PrinterConfig.xml.
See $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-SimpleTemplate.xsd for details about the configurable elements and attributes of a simplePrinterConfig.xml.
See $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-ComplexTemplate.xsd for details about the configurable elements and attributes of a complexPrinterConfig.xml.
In addition, $wt_home\codebase\com\ptc\wvs\server\xml\PrinterConfig-WorkingExample.xsd contains a sample printer configuration for PrinterConfig.xml.
<printers resource="com.ptc.windchill.enterprise.wvs.batchPrint.batchPrintResource">
Quick Start Instructions
The following is a typical simple printer configuration. Replace the variables with values specific to your site.
Variable Attribute Name
Description
worker_hostname
This is the host name (the value of the “host” attribute) as listed in $wt_home/conf/wvs/agent.ini for the print worker supporting this printer (e.g., "printworker1.ptcnet.ptc.com”).
printername
The name of the printer. This is the name the print worker uses to talk to the printer that is printing the file (e.g., "\\AH-MP2\AH-8PT-PRINTER”).
Examples:
<printerid="1" name="printer_name" workerhost="worker_hostname" workertype="PRINT" />
<defaultprinters defaultprinterid="1" />
<printabletypes> <pvtype type="model" filter="exclude" />
* 
The following line must be added because batch print does not support Microsoft document types.
<pvtype type="document" filter="exclude" filterby="doc docx xls xlsx ppt pptx" /></printabletypes>
Out-of-the-Box Defaults
This section defines the defaults for paper sizes, paper orientation, print scales, and units. These entries are only used when a job and/or printer makes use of these properties. Do not delete the lines in this section. Your administrator can modify existing entries or add custom entries for paper sizes, paper orientation, print scales, or units.
pvsid numbers are internal numbers and must not be changed. pvsid=1 is reserved for all site-specific customizations, and pvsid=0 is reserved for other (or unknown) entries.
For the paper size, paper orientation, scale, and unit elements in the following section, you can define a resourcekey attribute. If defined, the value of this resourcekey is used in the batchprint UI. The resourcekey must exist in the resource defined previously in the printers Element section. If no resourcekey is defined, the name value is used in the batchprint 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>
War dies hilfreich?