StarPrinter Object

The following StarPrinter functions can be used with a JavaScript file (star.js) that wraps the functions for easy use.

Functions

Type Signature
string getStatus(string alias)
This function can be used to return the current status of the printer.
string getFirmwareInfo(string alias)
This function can be used to return the version of firmware running on the printer.
bool send_commands(string alias, int blockTime, string bytes)
This function can be used to send commands to the printer.
string getLineFeedCommand(int lines)
This function can be used to return a line feed command.
string getCutCommand()
This function can be used to return a cut command.
string getTextCommand(string text, bool slashedZero, bool underline, bool invertColor, bool emphasized, bool upperline, bool upsideDown, int heightExpansion, int widthExpansion, byte leftMargin, int alignment)
This function can be used to return a write text command.
string getPdf147Command(string text, bool limit byte p1, byte p2, byte securityLevel, byte xDirection, byte aspectRatio)
This function can be used to return a PDF417 command.
string getQRCommand(string text, byte correctionLevel, byte model, byte cellSize)
This function can be used to return a QR command.
string getBase64ImageCommand(string base64, int maxWidth, bool compressionEnable)
This function can be used to return a draw image command.
string getImageFileCommand(string filepath, int maxWidth, bool compressionEnable)
This function can be used to return a draw image command.
string getCode39Command(string text, int option, byte height, int width)
This function can be used to return a Code39 barcode command.
string getCode93Command(string text, int option, byte height, int width)
This function can be used to return a Code93 barcode command.
string getCodeITFCommand(string text, int option, byte height, int width)
This function can be used to return an ITF barcode command.
string getCode128Command(string text, int option, byte height, int width)
This function can be used to return a Code128 barcode command.
string getTextbyDotCommand(string text, bool slashedZero, bool underline, bool twoColor, bool emphasized, bool upperline, bool upsideDown, int heightExpansion, int widthExpansion, byte leftMargin, int alignment)
This function can be used to return a write text command.