Prints the given image to the connected printer as a monochrome image.

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

Syntax

C#
void PrintImage(
	Bitmap image,
	int x,
	int y,
	int width,
	int height,
	bool insideFormat
)
Visual Basic (Declaration)
Sub PrintImage ( _
	image As Bitmap, _
	x As Integer, _
	y As Integer, _
	width As Integer, _
	height As Integer, _
	insideFormat As Boolean _
)

Parameters

image
Type: System.Drawing..::.Bitmap
Bitmap image to print.
x
Type: System..::.Int32
Horizontal starting position in dots.
y
Type: System..::.Int32
Vertical starting position in dots.
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.
insideFormat
Type: System..::.Boolean
Boolean value indicating whether this image should be printed by itself (false), or is part of a format being written to the connection (true).

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..::.ZebraGeneralExceptionIf there are issues rendering the graphic.

See Also