Graphics
|
The GraphicsUtil type exposes the following members.
| Name | Description | |
|---|---|---|
| PrintImage(String, Int32, Int32) | Obsolete. Prints an image from the connecting device file system to the connected device as a monochrome image. (Deprecated, use PrintImageFromPath) | |
| PrintImage(String, Int32, Int32, Int32, Int32, Boolean) | Obsolete. Prints an image from the connecting device file system to the connected device as a monochrome image. (Deprecated, use PrintImageFromPath) | |
| PrintImage(ZebraImageI, Int32, Int32, Int32, Int32, Boolean) | Prints an image to the connected device as a monochrome image. | |
| PrintImageFromPath(String, Int32, Int32) | New, optimized method to print an image from the connecting device file system to the connected device as a monochrome image. | |
| PrintImageFromPath(String, Int32, Int32, Int32, Int32, Boolean) | New, optimized method to print an image from the connecting device file system to the connected device as a monochrome image. | |
| StoreImage(String, String, Int32, Int32) | Stores the specified image to the connected printer as a monochrome image. | |
| StoreImage(String, ZebraImageI, Int32, Int32) | Stores the specified image to the connected printer as a monochrome image. |
using System; using System.IO; using Zebra.Sdk.Comm; using Zebra.Sdk.Printer; public class GraphicsUtilExample { public static void Main(string[] args) { Connection connection = new TcpConnection("192.168.1.32", TcpConnection.DEFAULT_ZPL_TCP_PORT); try { connection.Open(); ZebraPrinter printer = ZebraPrinterFactory.GetInstance(connection); int x = 0; int y = 0; printer.PrintImage("/path/to/my/image/sample.jpg", x, y); } catch (ConnectionException e) { Console.WriteLine(e.ToString()); } catch (ZebraPrinterLanguageUnknownException e) { Console.WriteLine(e.ToString()); } catch (IOException e) { Console.WriteLine(e.ToString()); } finally { connection.Close(); } } }