Class FontConverterZpl

Object
com.zebra.sdk.printer.FontConverterZpl

public class FontConverterZpl extends Object
A class used to convert TrueType® fonts for use on ZPL printers.
  • Method Details

    • getTtfFontHeader

      public static InputStream getTtfFontHeader(InputStream sourceStream, String pathOnPrinter)
      Returns an InputStream which provides the TTF header information as determined from the source stream.
      Parameters:
      sourceStream - Stream containing TrueType® font data
      pathOnPrinter - Location of the font file on the printer.
      Returns:
      Header information for the provided stream
    • getTteFontHeader

      public static InputStream getTteFontHeader(InputStream sourceStream, String pathOnPrinter)
      Returns an InputStream which provides the TTE header information as determined from the source stream.
      Parameters:
      sourceStream - Stream containing TrueType® font data
      pathOnPrinter - Location of the font file on the printer.
      Returns:
      Header information for the provided stream
    • saveAsTtfPrinterFont

      public static void saveAsTtfPrinterFont(String sourceFilePath, OutputStream destinationStream, String pathOnPrinter)
      Converts a native TrueType® font to a ZPL TTF format.
      Parameters:
      sourceFilePath - Path to a TrueType® font.
      destinationStream - Destination stream for converted ZPL.
      pathOnPrinter - Location to save the font file on the printer.
    • saveAsTtfPrinterFont

      public static void saveAsTtfPrinterFont(InputStream sourceInputStream, OutputStream destinationStream, String pathOnPrinter)
      Converts a native TrueType® font to a ZPL TTF format.
      Parameters:
      sourceInputStream - Stream containing the TrueType® font data.
      destinationStream - Destination stream for converted ZPL.
      pathOnPrinter - Location to save the font file on the printer.
    • saveAsTtePrinterFont

      public static void saveAsTtePrinterFont(String sourceFilePath, OutputStream destinationStream, String pathOnPrinter)
      Converts a native TrueType® font to a ZPL TTE format.
      Parameters:
      sourceFilePath - Path to a TrueType® font.
      destinationStream - Destination stream for converted ZPL.
      pathOnPrinter - Location to save the font file on the printer.
    • saveAsTtePrinterFont

      public static void saveAsTtePrinterFont(InputStream sourceInputStream, OutputStream destinationStream, String pathOnPrinter)
      Converts a native TrueType® font to a ZPL TTE format.
      Parameters:
      sourceInputStream - Stream containing the TrueType® font data.
      destinationStream - Destination stream for converted ZPL.
      pathOnPrinter - Location to save the font file on the printer.