Controlling available printers
You can plot drawings in Creo Elements/Direct Model Manager through the Task Agent by specifying a printer. All the printers that are installed on the registered Job Servers are available to you by default. In some cases like distributed environments, this may not be desirable.
There are different approaches to restrict the list of available printers. In all these cases, the printer list is controlled through XML configuration files. They all share the same format describing included and excluded printers.
<PrinterFilter>
<Accept>\\MySite\.*</Accept>
<Deny>\\MySite\ColorPrinter.*</Deny>
<Deny>\\MySite\ExpensivePrinter<\Deny>
</PrinterFilter>
* 
If the <Accept> filter is not specified, all the printers except the ones with the <Deny> filter are accepted.
Each entry is a regular expression for name matching. This means that a wildcard is described by “.*”, and not “*”.
You can control the available printers in the following ways:
Specifying the printers in the XML configuration file: This is the most common method. You can control the printers by adding the <PrinterFilter> tag in the <Options> section of the XML configuration file.
Suppressing printers available on a Job Server: A printer filter is also specified in the JobServerConfiguration.xml in the job server’s installation directory. This filters out local drivers like PDF or Microsoft document writers by default. These printer drivers will not be visible to the Task Agent at all.
Advanced printer handling by implementing custom business logic: You can control the printers by adding the following to the DraftingPlot.xml configuration file which is located in <Creo Elements/Direct Manager Server 20.6 install location> \taskagent \jobconfig:
<Options java_class="com.osm.automation.plot.PlotJobOptions">
<PrinterConfiguration>
<PrinterProvider java_class="com.acme.plot.AcmePrinterProvider"/>
<PrinterFilter java_class="com.acme.plot.AcmePrinterProvider"/>
</PrinterConfiguration>
..
..
</Options>
The plot job configuration allows you to specify custom IPrinterProvider and IPrinterFilter implementation classes. The DefaultPrinterProvide offers the list of all printers that are accessible through the Job Server. The DefaultPrinterFilter filters this list using <Accept> and <Deny> patterns.
* 
The classes mentioned in this section are used during user interface creation and manipulation. Inefficient implementation of the business logic may have considerable impact on the user interface’s interactive performance.
Was this helpful?