Search code examples
apiprintingpreferenceszebra-printers

WIN10 | Configure printer properties using code


I am on the look for a solution to print with correct printer configurations with Windows 10 and a Zebra printer connected. To properly use the printer I need to define a group of properties to print in the correct format. Since I cannot be sure that the latest printing preference were saved, I'd like to use code to define all these printer properties. They include Page setup, Edit Stock and more options that can be configurable in the Printing Preferences of the printer instance in Windows.

Please help me in finding information on how to configure all these printer properties using code, preferably C#. Thanks in advance,

Nadav


Solution

  • To configure Zebra printers via an application, please first take a look at the Link-OS Multiplatform SDK, which has the libraries and API for C#. With this SDK, you can create a C# app that can communicates with the printer either via USB or TCP. The SDK has a class called SGD (Set-Get-Do), which provides API for the application to send the configuration commands to the printers.

    The SGD can configure almost anything on the printer. You can refer to the SGD section of this ZPL Programming Guide for the detail of a specific SGD command.