Click or drag to resize

FontUtil Interface

Defines functions used for downloading fonts to Zebra printers.

Namespace: Zebra.Sdk.Printer
Assembly: SdkApi.Core (in SdkApi.Core.dll) Version: 3.0.3271
Syntax
public interface FontUtil

The FontUtil type exposes the following members.

Methods
 NameDescription
Public methodDownloadTteFont(Stream, String) Adds a TrueType® font to a profile and stores it at the specified path as a TrueType® extension (TTE).
Public methodDownloadTteFont(String, String) Adds a TrueType® font file to a profile and stores it at the specified path as a TrueType® extension (TTE).
Public methodDownloadTtfFont(Stream, String) Adds a TrueType® font file to a profile and stores it at the specified path as a TTF.
Public methodDownloadTtfFont(String, String) Adds a TrueType® font file to a profile and stores it at the specified path as a TTF.
Top
Example
C#
using System;
using Zebra.Sdk.Comm;
using Zebra.Sdk.Printer;

public class FontUtilExample {

    public static void Main(string[] args) {
        TcpConnection connection = new TcpConnection("192.168.1.32", TcpConnection.DEFAULT_ZPL_TCP_PORT);

        try {
            connection.Open();

            ZebraPrinter genericPrinter = ZebraPrinterFactory.GetInstance(connection);
            ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.CreateLinkOsPrinter(genericPrinter);
            if (linkOsPrinter != null) {
                linkOsPrinter.DownloadTtfFont("C:\\BaroqueScript.ttf", "E:Baroque");
            }
        } catch (ConnectionException e) {
            Console.WriteLine(e.ToString());
        } catch (ZebraPrinterLanguageUnknownException e) {
            Console.WriteLine(e.ToString());
        } finally {
            connection.Close();
        }
    }
}
See Also