Stores the specified 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 (E:FILE.BMP becomes E:FILE.GRF).

Namespace:  ZSDK_API.Printer
Assembly:  ZSDK_API (in ZSDK_API.dll) Version: 1.1.123.0

Syntax

C#
void StoreImage(
	string printerDriveAndFileName,
	Bitmap image,
	int width,
	int height
)
Visual Basic (Declaration)
Sub StoreImage ( _
	printerDriveAndFileName As String, _
	image As Bitmap, _
	width As Integer, _
	height As Integer _
)

Parameters

printerDriveAndFileName
Type: System..::.String
Path on the printer where the image will be stored.
image
Type: System.Drawing..::.Bitmap
Bitmap image to print.
width
Type: System..::.Int32
Desired width of the printed image, in dots. Passing -1 will preserve original width.
height
Type: System..::.Int32
Desired height of the printed image, in dots. Passing -1 will preserve original height.

Remarks

If the image resolution is large (e.g. 1024x768) this method may take a long time to execute or throw an exception.

Exceptions

ExceptionCondition
ZSDK_API.ApiException..::.ZebraPrinterConnectionExceptionIf there is an issue communicating with the printer (e.g. the connection is not open).
ZSDK_API.ApiException..::.ZebraIllegalArgumentExceptionIf printerDriveAndFileName has an incorrect format.
ZSDK_API.ApiException..::.ZebraGeneralExceptionIf there are issues rendering the graphic.

See Also