Functions

				
					initCIDPrinterLib(): Promise<PrinterLibraryEvent>;
				
			

must be called once before calling any other method in CIDPrint Plugin.

return: a Promise of type PrinterLibraryEvent.

				
					closeCIDPrinterLib();
				
			

called on app shutdown to close and remove all used resources.

				
					activateLicense(options: {productKey: string;});
				
			

call this method once directly in response of the initCIDPrinterLib and before any other call to ensure the library is working with all features.(not required in evaluation version)

Parameter

productKey: a string value with the license key provided by your supplier.

				
					enableBluetoothPrinting(options: {enable: boolean;});
				
			

call this method with enable/disable bluetooth printing

Parameter

enable: true = enable bluetooth printing, false = disable bluetooth printing.

				
					getPairedDevices();
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					discoverDevices();
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					printData(options: {data: string;});
				
			

call this method to print a label on a particular printer in his native language (i.e. ZPL, SBPL or Fingerprint).

Parameter

data: the data stream in string format to be sent to the printer.

				
					  printLabelWithData(options: {label: string; data: string[];});
				
			

call this method to print a label with a predefined format template and fill the variables with the data contained in a string array.

Parameter

label: path and filename of the template file that should be used.
data: an array of string that will be used to alter the variables in the template file to the values from this array.

				
					printLabelWithObject(options: {label: string; data: TicketData;});
				
			

call this method to use a predefined label template and fill the variables contained in the file with the named values from the given json object.

Parameter

label: path and filename of the template that should be used.
data: an object of type TicketData containing the values that should be used in the output.

				
					printLabel(options: {label: string;});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					connectToPreferredPrinter(options: {mac: string;});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					disconnectFromPrinter(options: {mac: string;});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					getPrinterStatus();
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					setupMediaSize(options: {width: number; height: number});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					enableDispendingMode(options: {enable: boolean});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					printReferenceLabel(options: {labeltype: ReferenceTicketType});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					showUI(options: {show: boolean});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					showSettings(options: {show: boolean});
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					addListener(eventName: string, listenerFunc: (data: PrinterLibraryEvent) => void): PluginListenerHandle;
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

				
					removeAllListeners();
				
			

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Was this article helpful?

previous article

Classes and Types