次の方法で共有


Branch Office Direct Printing Technical Details

 

Applies To: Windows Server 2012

Branch Office Direct Printing is designed to reduce network traffic on expensive WAN links and potentially reduce the workload on busy print servers centrally located in your datacenter. The topic covers the architecture and design of Branch Office Direct Printing in Windows Server 2012.

Overview

Branch Office Direct Printing has the following benefits and limitations:

Benefits of Branch Office Direct Printing

  • Works for print queues using printer drivers that support Client Side Rendering (CSR), whether they are v3 OR v4 drivers.

  • Functions with both TCP and Web Services on Devices (WSD) print devices (directed discovery only, not multicast)

  • Can be enabled or disabled via Windows PowerShell.

  • PrintBRM will backup and restore the Branch Office Direct Printing setting on a print queue.

  • Saves bandwidth and jobs may print faster since print jobs no longer go through server.

  • Scalability might improve, as server load will be reduced, but exact amount depends on your organization’s printing environment and setup.

Limitations of Branch Office Direct Printing

  • Requires a print server running Windows Server 2012, and Windows 8 clients.

  • The printer must be a network attached device.

  • The printer can’t be locked to accept print jobs from a single IP address. It must be configured to accept print jobs from any client.

  • Quota, auditing and detailed job logging capabilities are lost if Branch Office Direct Printing is used. For queues that must retain these records, leave Branch Office Direct Printing disabled

  • Even if Branch Office Direct Printing is enabled on a print queue, clients running an operating system prior to Windows 8 will not use this setting and will still print to the server.

  • Settings that conflict with Branch Office Direct Printing (such as Keep Printed Jobs) cannot be used.

  • If server side rendering (SSR) is required for some specific reason, Branch Office Direct Printing cannot be used because it depends on CSR.

    • For example, if a client computer running Windows 8 receives and installs a v4 print class driver (a v4 driver that supports a broad set of printers sharing common features) because a model specific v4 driver is not available, then CSR is not possible and thus Branch Office Direct Printing is not supported.
  • If printer pooling is enabled on a printer queues, Branch Office Direct Printing is not compatible.

  • All third party server-based tools will no longer work properly (quota management, job auditing, and so on.) because print jobs will no longer be routed through the server.

  • If Branch Office Direct Printing is enabled, it will override the default SSR mode for systems like laptops and tablets. Typically, these portable computers running Windows 8 will force SSR to conserve battery power while printing. When Branch Office Direct Printing is enabled on a queue, it is assumed that bandwidth is more valuable than extended battery life, and the portable clients will switch to CSR and take advantage of the Branch Office Direct Printing feature.

Architecture

The following diagrams show a visual representation of the data flow for CSR versus Branch Office Direct Printing:

Figure 1: Printing Data Flow for CSR Printing

Figure 2: Print Data Flow for Branch Office Direct Printing

Branch Office Direct Printing depends on the existing CSR print technology. CSR implements a remote printer connection in such a way that the bulk of the work involved in a print job is performed locally on the client. With CSR, the print job is processed on the client and then sent to the print server. The print server then sends the spooled data to the shared print device. In Branch Office Direct Printing mode, the port on the client is replaced so when CSR is done, the job is sent directly to the physical print device instead of the print server.

Implementation Details

The implementation of this feature and its integration into the CSR feature can be broken down into several parts: Configuration, Setup, Synchronization, and Fallback.

Configuration

Branch Office Printing is configured on a per-connection basis on the server – there is no way to enable this feature from the client side. Configuration is accomplished by using the Print Management Console or Windows Windows PowerShell to set a registry value on the print queue:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\<printername>\PrinterDriverData

valueName: EnableBranchOfficePrinting

Values set on the remote printer are synchronized periodically by the client (either after an elapsed time period, or when changes on the server are detected), and when “BypassServer” is set to a non-zero value, Branch Office printing for the connection is enabled. The client may be forced to ignore this setting if it is incompatible or if conflicting settings are in effect, explained in more detail in the fallback section.

Setup

Creating a connection involves setting up a local GUID printer, and as part of setting up the printer, it must be assigned a port. For both normal and Branch Office Direct Printing, this port defaults to the CSR Port Monitor until a CSR cache synchronization occurs.

As the last step of setup, a synchronous CSR cache sync is forced for the new GUID printer – as a result, this copies over all the remote printer’s settings to the GUID printer and at this point the port settings are changed from the CSR Port Monitor to the port settings used on the server.

Synchronization

As described above, during Setup the CSR Cache Synchronization is the point at which CSR chooses how to configure the port for the connection. The print spooler then uses an internal work item that is responsible for keeping a single local GUID printer in sync with the remote print queue the connection it is associated with. This ensures that if the administrator changes port settings on the remote printer that they will be propagated to the client.

The synchronization process determines how to configure the port based on the following:

  • Whether branch office printing is enabled or disabled for the connection.

  • If Branch Office printing is enabled and if the remote port settings differ from the local ones, the local settings must be synchronized.

  • If Branch Office printing is disabled, then the local port must be set to the CSR Port Monitor in order to allow normal operation of the connection.

After these settings are checked the local port is updated accordingly and synchronization is complete.

The following diagram displays the synchronization logic:

Figure 3: Synchronization Logic

Branch Office Status

The registry value that determines whether Branch Office Printing is enabled for the connection is contained in the GetPrinterData value EnableBranchOfficePrinting. If this value is zero or unset then Branch Office Printing is disabled, if set to a nonzero value then the feature is enabled as long as no other settings conflict with it and the connection hasn’t been determined to be incompatible.

A table of conflicting settings and their resolution is defined in the Fallback section.

Synchronization Before Printing

The CSR Sync manager in general runs in a polling mode such that it pulls down settings from the server periodically. Since the sync manager is used for synchronizing port settings, there is the potential for a window where the client’s port settings are out of sync with the server’s. If a client were to print a job to a Branch Office printer during this time the job would fail or go to the wrong place.

To eliminate this issue, a synchronous cache sync is forced on the client at the start of every job. This insures the settings are up to date at the time when they are needed most. To reduce the performance impact, only port information is synced, not a full printer sync.

Fallback

There are mutually exclusive settings, some of which cause automatic fallback (either to CSR or SSR, both through the server). If either condition occurs there are events logged to the event log.

  • Printer falls back to Server side rendering if the enhanced point and print driver is used.

  • SSR Fallback occurs if the driver in use does not support CSR.

  • CSR Fallback occurs if port settings are not WSD or TCP.

  • SSR Fallback occurs if admin has manually enabled SSR on the given queue.

  • CSR Fallback occurs if the Keep printed jobs setting is enabled on the given queue.

  • CSR Fallback occurs if printer pooling is enabled on the given queue.

In each of the above cases, the client will fall back to normal printing and an event will be logged explaining why for administrative purposes. To make the fallback apparent to the administrator, warning events are logged on the server as well.  The server checks whether incoming jobs are from clients that should have Branch Office Printing enabled but go through the server instead.

See the following tables for more information about these events.

Branch Office Direct Printing Event IDs

The following Branch Office Direct Printing events are logged in the Applications and Services Logs/Microsoft/PrintService/Admin event log:

Event ID

Description

858

Connection '%1' has been reconfigured for normal operation because the queue has been configured for Server Side Rendering. To re-enable Branch Office Printing, enable the 'Render Jobs On Client' setting on the server queue.

862

Connection '%1' has been reconfigured for normal operation because the 'Keep Printed Jobs' setting is enabled on the queue. To re-enable Branch Office Printing, disable the 'Keep Printed Jobs' setting on the server queue.

The following Branch Office Direct Printing events are logged in the Applications and Services Logs/Microsoft/PrintService/Operational event log:

Event ID

Description

856

Connection '%1' has been reconfigured for normal operation because branch office printing has been disabled.

857

Connection '%1' has been reconfigured for normal operation because the queue is incompatible with branch office printing.

859

Connection '%1' has been reconfigured for normal operation because the client is incompatible with branch office printing.

860

Connection '%1' has been reconfigured for normal operation because the server is incompatible with branch office printing.

861

Connection '%1' has been reconfigured for normal operation because the remote port is incompatible with branch office printing.

863

Connection '%1' has been reconfigured for normal operation due to an internal error, %2.