Click or drag to resize

ZebraPrinterFactoryGetInstance Method (String, Connection)

Factory method to create the correct ZebraPrinter concrete class based on the printer's control language.

Namespace:  Zebra.Sdk.Printer
Assembly:  SdkApi_Core (in SdkApi_Core.dll) Version: 2.13.898
Syntax
public static ZebraPrinter GetInstance(
	string[] cpclFwVersionPrefixes,
	Connection connection
)

Parameters

cpclFwVersionPrefixes
Type: SystemString
An array of possible CPCL version number prefixes
connection
Type: Zebra.Sdk.CommConnection
An open connection to a printer

Return Value

Type: ZebraPrinter
An instance of a ZebraPrinter
Exceptions
ExceptionCondition
ConnectionExceptionIf an I/O error occurs
ZebraPrinterLanguageUnknownExceptionIf the printer language cannot be determined
Remarks
If the Set-Get-Do value, appl.name, starts with one of the cpclFwVersionPrefixes, the printer is determined to be a CPCL printer.Otherwise it is considered to be a ZPL printer.
See Also