Print to a Shared Card Printer with SDK

Article ID: 27246493

Details


Description

This solution is useful for printing to a shared card printer using Zebra's Software Development Kit (SDK)

Applies To

Any of the card SDKs

Overview

The card SDKs support shared printers as long as they are on the same network as the computer implementing the SDK. Before the SDK can be used to access the shared printer, the shared printer must be properly installed with the appropriate driver on the host machine.

Procedure

During installation, or after the fact (under Printer Properties), the printer must be set to shared, be listed in the directory, and given a shared name.  Once this is completed, any computer on the network can access this printer via the SDK by using '\\Computer-Name\Shared-Printer-Name' as the printer name.  The computer name refers to the machine to which the printer is connected, and can be found by right clicking on My Computer > Properties > Computer Name > Full Computer Name.  

The printer name should look like this when implementing the SDK:

printerName= "\\ComputerName\UsbShareName"
ZBRGetHandle(out theHandle, printerName, out printerType, out errValue)

Some common pitfalls include:

  • Using the wrong computer name.  Be sure that you are using the name of the computer to which the printer is connected when calling the printer name.
  • The printer is not set to be shared.
  • Improper formatting - In languages such as C#, be careful to properly format your string.  In the above example, an arroba will guarantee that the printer name string is correct: @"\\ComputerName\UsbShare

 

Helpful Information

Please visit Zebra's website for more information and latest versions of the Card Developer ToolsRead more>>