public interface GraphicsUtil
Modifier and Type | Method and Description |
---|---|
void |
printImage(String imageFilePath,
int x,
int y)
Prints an image from the connecting device file system to the connected device as a monochrome image.
|
void |
printImage(String imageFilePath,
int x,
int y,
int width,
int height,
boolean insideFormat)
Prints an image from the connecting device file system to the connected device as a monochrome image.
|
void |
printImage(ZebraImageI image,
int x,
int y,
int width,
int height,
boolean insideFormat)
Prints an image to the connected device as a monochrome image.
|
void |
storeImage(String deviceDriveAndFileName,
String imageFullPath,
int width,
int height)
Stores the specified
image to the connected printer as a monochrome image. |
void |
storeImage(String deviceDriveAndFileName,
ZebraImageI image,
int width,
int height)
Stores the specified
image to the connected printer as a monochrome image. |
void printImage(String imageFilePath, int x, int y) throws ConnectionException, java.io.IOException
OutOfMemoryError
exception.imageFilePath
- image file to be printed.x
- horizontal starting position in dots.y
- vertical starting position in dots.ConnectionException
- if an I/O error occurs.java.io.IOException
- when the file could not be found, opened, or is an unsupported graphicvoid printImage(String imageFilePath, int x, int y, int width, int height, boolean insideFormat) throws ConnectionException, java.io.IOException
OutOfMemoryError
exception.imageFilePath
- image file to be printed.x
- horizontal starting position in dots.y
- vertical starting position in dots.width
- desired width of the printed image. Passing a value less than 1 will preserve original width.height
- desired height of the printed image. Passing a value less than 1 will preserve original height.insideFormat
- boolean value indicating whether this image should be printed by itself (false), or is part
of a format being written to the connection (true).ConnectionException
- if an I/O error occurs.java.io.IOException
- when the file could not be found, opened, or is an unsupported graphicvoid printImage(ZebraImageI image, int x, int y, int width, int height, boolean insideFormat) throws ConnectionException
OutOfMemoryError
exception.image
- the image to be printed.x
- horizontal starting position in dots.y
- vertical starting position in dots.width
- desired width of the printed image. Passing a value less than 1 will preserve original width.height
- desired height of the printed image. Passing a value less than 1 will preserve original height.insideFormat
- boolean value indicating whether this image should be printed by itself (false), or is part
of a format being written to the connection (true).ConnectionException
- if an I/O error occurs.void storeImage(String deviceDriveAndFileName, ZebraImageI image, int width, int height) throws ConnectionException, ZebraIllegalArgumentException
image
to the connected printer as a monochrome image. The image will be stored
on the printer at printerDriveAndFileName
with the extension GRF. If a drive letter is not supplied,
E will be used as the default (e.g. FILE becomes E:FILE.GRF). If an extension is supplied, it is ignored if it is
not either BMP or PNG. If the extension is ignored, GRF will be used. OutOfMemoryError
exception.
deviceDriveAndFileName
- path on the printer where the image will be stored.image
- the image to be stored on the printer.width
- desired width of the printed image, in dots. Passing -1 will preserve original width.height
- desired height of the printed image, in dots. Passing -1 will preserve original height.ConnectionException
- if there is an issue communicating with the printer (e.g. the connection is not
open).ZebraIllegalArgumentException
- if printerDriveAndFileName
has an incorrect format.void storeImage(String deviceDriveAndFileName, String imageFullPath, int width, int height) throws ConnectionException, ZebraIllegalArgumentException, java.io.IOException
image
to the connected printer as a monochrome image. The image will be stored
on the printer at printerDriveAndFileName
with the extension GRF. If a drive letter is not supplied,
E will be used as the default (e.g. FILE becomes E:FILE.GRF). If an extension is supplied, it is ignored if it is
not either BMP or PNG. If the extension is ignored, GRF will be used. OutOfMemoryError
exception.
deviceDriveAndFileName
- path on the printer where the image will be stored.imageFullPath
- image file to be stored on the printer.width
- desired width of the printed image, in dots. Passing -1 will preserve original width.height
- desired height of the printed image, in dots. Passing -1 will preserve original height.ConnectionException
- if there is an issue communicating with the printer (e.g. the connection is not
open).ZebraIllegalArgumentException
- if printerDriveAndFileName
has an incorrect format.java.io.IOException
- when the file could not be found, opened, or is an unsupported graphic
© 2017 ZIH Corp. All Rights Reserved.