FormatUtilLinkOs Interface
|
Defines functions used for interacting with Link-OS™ printer formats.
Namespace: Zebra.Sdk.PrinterAssembly: SdkApi.Core (in SdkApi.Core.dll) Version: 3.0.3271
Syntax public interface FormatUtilLinkOs
Public Interface FormatUtilLinkOs
public interface class FormatUtilLinkOs
The FormatUtilLinkOs type exposes the following members.
Methods | Name | Description |
---|
| PrintStoredFormatWithVarGraphics(String, DictionaryInt32, String) |
Prints a stored format on the printer, filling in the fields specified by the Dictionary.
|
| PrintStoredFormatWithVarGraphics(String, DictionaryInt32, String, String) |
Prints a stored format on the printer, filling in the fields specified by the Dictionary.
|
| PrintStoredFormatWithVarGraphics(String, DictionaryInt32, ZebraImageI, DictionaryInt32, String) |
Prints a stored format on the printer, filling in the fields specified by the Dictionaries.
|
| PrintStoredFormatWithVarGraphics(String, DictionaryInt32, ZebraImageI, DictionaryInt32, String, String) |
Prints a stored format on the printer, filling in the fields specified by the Dictionaries.
|
TopExample using System;
using System.Collections.Generic;
using System.IO;
using Zebra.Sdk.Comm;
using Zebra.Sdk.Graphics;
using Zebra.Sdk.Printer;
public class FormatUtilLinkOsExample {
public static void Main(string[] args) {
string pathToImageFileOnHost = "/path/to/my/image/example.png";
Connection connection = new TcpConnection("1.2.3.4", TcpConnection.DEFAULT_ZPL_TCP_PORT);
try {
connection.Open();
Dictionary<int, string> vars = new Dictionary<int, string> {
{ 12, "John" },
{ 11, "Smith" }
};
ZebraImageI image = ZebraImageFactory.GetImage(pathToImageFileOnHost);
Dictionary<int, ZebraImageI> imgVars = new Dictionary<int, ZebraImageI> {
{ 13, image }
};
ZebraPrinter genericPrinter = ZebraPrinterFactory.GetInstance(connection);
ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.CreateLinkOsPrinter(genericPrinter);
if (linkOsPrinter != null) {
linkOsPrinter.PrintStoredFormatWithVarGraphics("E:FORMAT2.ZPL", imgVars, vars);
}
} catch (ConnectionException e) {
Console.WriteLine(e.ToString());
} catch (ZebraPrinterLanguageUnknownException e) {
Console.WriteLine(e.ToString());
} catch (IOException e) {
Console.WriteLine(e.ToString());
} finally {
connection.Close();
}
}
}
See Also