Skip to main content

Windows printer

note

Windows printers are not supported in Docker.

With the printer plug-in, you can create document templates in OPC Router that are dynamically populated with values at runtime and printed on a printer installed on the local computer or an available network printer. The following steps are required:

  • Create the document template in the plug-in configuration
  • Select the printer and populate the template variables with values in the flow configuration

Creating the Document Template​

  1. Open the Windows Printer Plug-in in the “Print templates” section under the “Plug-ins” menu.
  2. Select “Add Document Template” or double-click an existing entry to edit a template.
  3. Assign a name to the print template.
  4. Create the template using the built-in designer (see the section “ Designer ”).
  5. Close the editor using the “Close Window” button in the window title bar. Confirm the save query.

The document template is now available for use when configuring a flow.

Interactive Printers​

The OPC Router runs as a Windows service in the background of the server 24/7. It is not designed for user interaction. This means that printers requiring user input (e.g., PDF output, XPS output with a “Save As…” dialog) cannot be used: In such cases, a user would have to provide the necessary input every time the router initiates a print job.

Depending on the Windows version, printer status indicators (ink/toner levels) may also respond differently when accessed by a service. Therefore, test your configuration carefully. If necessary, enable interaction between the service and the desktop in Services to allow for user input. This is expressly recommended for testing purposes only, not for production use:

  1. Open the Services management console via “Control Panel – Administrative Tools – Services.”
  2. Double-click the OPCRouterService to open it.
  3. On the “Log On” tab, enable the “Allow data exchange between service and desktop” property.
  4. Confirm by clicking “OK”.”
  5. Restart the service.

If you are testing your label design here—for example, using the Windows XPS Writer—do not save the XPS file in the suggested directory; instead, choose one directly at the root (e.g., C:\LabelTest) to avoid access issues.