Constructs a LabelPrinter object with the specified settings.
public LabelPrinter(string cmdAttrib, string printerID, string printerURI);
Parameter | Description |
---|---|
string cmdAttrib | A string containing the printer commands and attributes. |
string printerID | A string containing the printer identifier that is used to load the specific printer commands from the specified commands and attributes string. |
string printerURI | A string in URI format that specifies how to connect to the printer. |
The cmdAttrib parameter should contain a string in JSON format. For more information on the JSON format, please refer to the Command and Attribute Format section of the Printer Commands and Attributes User Guide. This SDK provides a printer_profiles.JSON file with printer settings and example label definitions for PB22 and PB32 printers. You may modify or add printer settings and label definitions to printer_profiles.JSON and include it in the Assets folder of your application. See the LabelPrinterSample included in the SDK for reading printer_profiles.JSON in the Assets folder into a string.
The printerID parameter specifies an identifier which is used to load the specific printer commands from the commands and attributes specified in the cmdAttribFilePath parameter.
The printerURI parameter specifies how to connect to the printer. As of version 1.70, it only supports Bluetooth printing and the URI format is "bt://MacAddress where MacAddress specifies the Bluetooth MAC address in the format of "nn:nn:nn:nn:nn:nn" where each n is a hexadecimal digit, for example, "00:06:AB:3C:25:8F."