Packagecom.myflashlab.air.extensions.rongta
Classpublic class Cmd
InheritanceCmd Inheritance Object

A Cmd object is used to send print commands to the printer. You must initialize a Cmd object for every print command you are sending to the printer. Use Rongta.createCmd(); to init.



Public Methods
 MethodDefined By
  
append($bytes:String):void
Append cmds
Cmd
  
clear():void
Clear all cmds
Cmd
  
getAllCutCmd():String
All cut
Cmd
  
getAppendCmds():String
Get All Cmds
Cmd
  
getBarcodeCmd($type:int, $setting:BarcodeSetting, $content:String):String
Get Barcode Printing command
Cmd
  
getBeepCmd():String
Beep
Cmd
  
getBitmapCmd($bitmapSetting:BitmapSetting, $bitmap:BitmapData):String
Get Bitmap printing command
Cmd
  
getChartName():String
Get current charset name.
Cmd
  
getCRCmd():String
Enter
Cmd
  
getEndCmd():String
End command
Cmd
  
getHalfCutCmd():String
Half cut
Cmd
  
getHeaderCmd():String
Get header commands
Cmd
  
getLFCmd():String
Wrap
Cmd
  
getLFCRCmd():String
Wrap + Enter
Cmd
  
Test page print
Cmd
  
getTextCmd($textSettings:TextSettings, $text:String):String
Print text command
Cmd
  
setChartName(a:String):void
charset name setting
Cmd
Method Detail
append()method
public function append($bytes:String):void

Append cmds

Parameters

$bytes:String — Base64 String bytes

clear()method 
public function clear():void

Clear all cmds

getAllCutCmd()method 
public function getAllCutCmd():String

All cut

Returns
String — Base64 String representative of the bytes.
getAppendCmds()method 
public function getAppendCmds():String

Get All Cmds

Returns
String — Base64 String representative of the bytes.
getBarcodeCmd()method 
public function getBarcodeCmd($type:int, $setting:BarcodeSetting, $content:String):String

Get Barcode Printing command

Parameters

$type:int — barcodeType, BarcodeSetting.QR_CODE for example.
 
$setting:BarcodeSetting
 
$content:String

Returns
String — Base64 String representative of the bytes.
getBeepCmd()method 
public function getBeepCmd():String

Beep

Returns
String — Base64 String representative of the bytes.
getBitmapCmd()method 
public function getBitmapCmd($bitmapSetting:BitmapSetting, $bitmap:BitmapData):String

Get Bitmap printing command

Parameters

$bitmapSetting:BitmapSetting — Bitmap setting (width limit)
 
$bitmap:BitmapData — the bitmap which to print

Returns
String — Base64 String representative of the bytes.
getChartName()method 
public function getChartName():String

Get current charset name.

Returns
String
getCRCmd()method 
public function getCRCmd():String

Enter

Returns
String — Base64 String representative of the bytes.
getEndCmd()method 
public function getEndCmd():String

End command

Returns
String — Base64 String representative of the bytes.
getHalfCutCmd()method 
public function getHalfCutCmd():String

Half cut

Returns
String — Base64 String representative of the bytes.
getHeaderCmd()method 
public function getHeaderCmd():String

Get header commands

Returns
String — Base64 String representative of the bytes.
getLFCmd()method 
public function getLFCmd():String

Wrap

Returns
String — Base64 String representative of the bytes.
getLFCRCmd()method 
public function getLFCRCmd():String

Wrap + Enter

Returns
String — Base64 String representative of the bytes.
getSelfTestCmd()method 
public function getSelfTestCmd():String

Test page print

Returns
String — Base64 String representative of the bytes.
getTextCmd()method 
public function getTextCmd($textSettings:TextSettings, $text:String):String

Print text command

Parameters

$textSettings:TextSettings
 
$text:String

Returns
String — Base64 String representative of the bytes.
setChartName()method 
public function setChartName(a:String):void

charset name setting

Parameters

a:String