Package com.zebra.sdk.printer
Class FontConverterZpl
Object
com.zebra.sdk.printer.FontConverterZpl
A class used to convert TrueType® fonts for use on ZPL printers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamgetTteFontHeader(InputStream sourceStream, String pathOnPrinter) Returns anInputStreamwhich provides the TTE header information as determined from the source stream.static InputStreamgetTtfFontHeader(InputStream sourceStream, String pathOnPrinter) Returns anInputStreamwhich provides the TTF header information as determined from the source stream.static voidsaveAsTtePrinterFont(InputStream sourceInputStream, OutputStream destinationStream, String pathOnPrinter) Converts a native TrueType® font to a ZPL TTE format.static voidsaveAsTtePrinterFont(String sourceFilePath, OutputStream destinationStream, String pathOnPrinter) Converts a native TrueType® font to a ZPL TTE format.static voidsaveAsTtfPrinterFont(InputStream sourceInputStream, OutputStream destinationStream, String pathOnPrinter) Converts a native TrueType® font to a ZPL TTF format.static voidsaveAsTtfPrinterFont(String sourceFilePath, OutputStream destinationStream, String pathOnPrinter) Converts a native TrueType® font to a ZPL TTF format.
-
Method Details
-
getTtfFontHeader
Returns anInputStreamwhich provides the TTF header information as determined from the source stream.- Parameters:
sourceStream- Stream containing TrueType® font datapathOnPrinter- Location of the font file on the printer.- Returns:
- Header information for the provided stream
-
getTteFontHeader
Returns anInputStreamwhich provides the TTE header information as determined from the source stream.- Parameters:
sourceStream- Stream containing TrueType® font datapathOnPrinter- 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.
-