Interface FontUtil

All Known Subinterfaces:
ZebraPrinterLinkOs
All Known Implementing Classes:
Profile

public interface FontUtil
Defines functions used for downloading fonts to Zebra printers.

package test.zebra.sdk.printer.examples;
 
 import com.zebra.sdk.comm.ConnectionException;
 import com.zebra.sdk.comm.TcpConnection;
 import com.zebra.sdk.printer.ZebraPrinterFactory;
 import com.zebra.sdk.printer.ZebraPrinterLinkOs;
 
 public class FontUtilExample {
 
     public static void main(String[] args) throws Exception {
         TcpConnection connection = new TcpConnection("192.168.1.32", TcpConnection.DEFAULT_ZPL_TCP_PORT);
         try {
             connection.open();
             ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.getLinkOsPrinter(connection);
             if (linkOsPrinter != null) {
                 linkOsPrinter.downloadTtfFont("C:\\BaroqueScript.ttf", "E:Baroque");
             }
         } catch (ConnectionException e) {
             e.printStackTrace();
         } finally {
             connection.close();
         }
     }
 }
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    downloadTteFont(InputStream sourceInputStream, String pathOnPrinter)
    Sends a TrueType® font to a printer and stores it at the specified path as a TrueType® extension (TTE).
    void
    downloadTteFont(String sourceFilePath, String pathOnPrinter)
    Used to send a TrueType® TTE font file to a printer and store it at the specified path as a TrueType® extension (TTE).
    void
    downloadTtfFont(InputStream sourceInputStream, String pathOnPrinter)
    Sends a TrueType® font file to a printer and stores it at the specified path as a TTF.
    void
    downloadTtfFont(String sourceFilePath, String pathOnPrinter)
    Sends a TrueType® font file to a printer and stores it at the specified path as a TTF.
  • Method Details

    • downloadTtfFont

      void downloadTtfFont(String sourceFilePath, String pathOnPrinter) throws ConnectionException
      Sends a TrueType® font file to a printer and stores it at the specified path as a TTF.
      Parameters:
      sourceFilePath - Path to a TrueType® font to be saved on the printer.
      pathOnPrinter - Location to save the font file on the printer.
      Throws:
      ConnectionException - if an I/O error occurs.
    • downloadTteFont

      void downloadTteFont(String sourceFilePath, String pathOnPrinter) throws ConnectionException
      Used to send a TrueType® TTE font file to a printer and store it at the specified path as a TrueType® extension (TTE).
      Parameters:
      sourceFilePath - Path to a TrueType® TTE font file to be saved on the printer.
      pathOnPrinter - Location to save the font file on the printer.
      Throws:
      ConnectionException - if an I/O error occurs.
    • downloadTtfFont

      void downloadTtfFont(InputStream sourceInputStream, String pathOnPrinter) throws ConnectionException
      Sends a TrueType® font file to a printer and stores it at the specified path as a TTF.
      Parameters:
      sourceInputStream - Input Stream containing the font data.
      pathOnPrinter - Location to save the font file on the printer.
      Throws:
      ConnectionException - if an I/O error occurs.
    • downloadTteFont

      void downloadTteFont(InputStream sourceInputStream, String pathOnPrinter) throws ConnectionException
      Sends a TrueType® font to a printer and stores it at the specified path as a TrueType® extension (TTE).
      Parameters:
      sourceInputStream - Input Stream containing the font data.
      pathOnPrinter - Location to save the font file on the printer.
      Throws:
      ConnectionException - if an I/O error occurs.