This SDK manual describes the contents of the library required to develop Linux OS application programs. At BIXOLON, we are constantly making improvements to the functions and quality of our products. The specifications and contents of this manual are subject to change without prior notice for this reason.
Label Printer 2. Property The constants used by the library are declared in BxlLabelConst.h. The development environment is based on C. 2-1 CharacterSet & International CharacterSet(LONG R/W) This is the property for defining the printer's code page and International character Set and set to CS_CP437 and ICS_USA by default.
Page 5
Label Printer The following International character Set can be used: Constant Value Description ICS_USA USA code ICS_FRANCE FRANCE code ICS_GERMANY GERMANY code ICS_UK UK code ICS_DENMARK_I DENMARK1 code ICS_SWEDEN SWEDEN code ICS_ITALY ITALY code ICS_SPAIN_I SPAIN code ICS_NORWAY NORWAY code ICS_DENMARK_II DENMARK 2 code ICS_JAPAN...
Label Printer 2-2 State (LONG R) This is the property that sets the printer status and calls the CheckPrinterStatus function to check the printer status and receive the data. The status value can be set in duplicate and each value can be checked using bitwise operation. These are the printer status values: Constant Value...
The operation is successful. PORT_OPEN_ERROR The communication port cannot be opened. NO_CONNECTED_PRINTER -100 The printer is not connected. NO_BIXOLON_PRINTER -101 It is not a BIXOLON printer. * Example int ret; // USB ret = ConnectToPrinter(“USB:”); // Serial ret = ConnectToPrinter(“serial:115200”); // Parallel ret = ConnectToPrinter(“parallel”);...
Label Printer 3-2 DisconnectPrinter Disconnect the printer. int DisconnectPrinter() [Parameters] None [Return Values] None * Example ConnectToPrinter(“portinfo…”); …… DisconnectPrinter(); 3-3 InitializePrinter Initialize the printer. int InitializePrinter(); [Parameters] None [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed.
Label Printer 3-4 FeedOneLabel Feed a label. int FeedOneLabel () [Parameters] None [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… ret = FeedOneLabel(); …… Rev. 1.00 - 9 -...
Label Printer 3-6 SetDensity Set the density. int SetDensity(int density) [Parameters] * int density [in] Printing density (0 ~ 20) [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); ……...
Label Printer 3-7 SetOrientation Set the orientation. int SetOrientation(int orientation) [Parameters] * int orientation [in] Printing orientation Constant Value Description TOP_TO_BOTTOM Print from top to bottom. BOTTOM_TO_TOP Print from bottom to top. [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed.
Label Printer 3-8 SetCutter Set the cutting options. int SetCutter(bool autoCut, int cutPeriod) [Parameters] * bool autoCut [in] Enable/disable auto cutting. false: disable auto cutting, true: enable auto cutting * int cuttingPeriod [in] Cut interval [Return Values] Constant Value Description SUCCESS The function is successful.
Label Printer 3-9 SetBackFeed Set the back-feeding options. int SetBackFeed(bool backFeed) [Parameters] * bool backFeed [in] Enable/disable back-feed. false: disable back-feed, true: enable back-feed [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -300 Data transmission failed. * Example int ret;...
Label Printer 3-10 SetPaper Set the paper options. int SetPaper(int width, int height, int mediaType, int offset, int gapLength); [Parameters] * int width [in] Paper width. max. 832(4.1 inch) [dot] * int height [in] Paper height. max. 2432(12 inch) [dot] * int mediaType [in] Paper type Constant...
Label Printer 3-11 SetMargin Set the paper margins. int SetMargin(int horizontalMargin, int verticalMargin) [Parameters] * int horizontalMargin [in] Horizontal margin [dot] * int verticalMargin [in] Vertical margin [dot] [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed.
Label Printer 3-12 SetOffset Set the offset between Black Mark/Gap and cutting line. int SetOffset(int offset) [Parameters] * int offset [in] Offset length [dot] (-100 ~ 100) [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret;...
Label Printer 3-13 PrintDeviceFont Print the device font. int PrintDeviceFont(const char *text, const int xPos, const int yPos, const int fontName, const int xMulti, const int yMulti, const int rotation, const bool bold); [Parameters] * const char *text [in] Character strings to print * const int xPos [in] Horizontal position (X) [dot] * const int yPos...
Page 19
The function is successful. BXL_NOT_OPENED -101 ConnectPrinter must be executed. BXL_WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintDeviceFont(“BIXOLON LABEL SDK TEST.”, 20, 10, DEVICE_ENG_24X38, 1, 1, ROTATE_0, false); Prints(1, 1); …… Rev. 1.00 - 19 -...
Label Printer 3-14 PrintDeviceFontW Print the device font. int PrintDeviceFontW(const char *text, const int xPos, const int yPos, const int fontName, const int xMulti, const int yMulti, const int rotation, const bool bold, const unsigned codePage); [Parameters] * const char *text [in] Character strings to print * const int xPos [in] Horizontal position (X) [dot]...
Page 21
BXL_NOT_OPENED -101 ConnectPrinter must be executed. BXL_WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintDeviceFont(“BIXOLON Label Printer SDK Test.”, 20, 10, DEVICE_ENG_24X38, 1, 1, ROTATE_0, false, CP_CP949); Prints(1, 1); …… Rev. 1.00 - 21 -...
Label Printer 3-15 PrintVectorFont Print the vector font. Long PrintVectorFont(const char *text, const int xPos, const int yPos, const int font, const int fontWidth, const int fontHeight, const int rightSpace, const bool bold, const bool reverse, const bool italic, const int rotation, const int alignment, const int printDirection) [Parameters] * const char *text [in] Character strings to print...
Page 23
ALIGNMENT_RIGHT Align to the right * int printDirection [in] print direction for character strings Constant Value Description LEFT_TO_RIGHT Print from left to right (ex. BIXOLON) RIGHT_TO_LEFT Print from right to left (ex. NOLOXIB) [Return Values] Constant Value Description SUCCESS The function is successful.
Label Printer 3-16 PrintVectorFontW Print the vector font. Long PrintVectorFontW(const char *text, const int xPos, const int yPos, const int font, const int fontWidth, const int fontHeight, const int rightSpace, const bool bold, const bool reverse, const bool italic, const int rotation, const int alignment, const int printDirection, const unsigned int codePage) [Parameters] * const char *text...
Page 25
* int printDirection [in] print direction for character strings Constant Value Description LEFT_TO_RIGHT Print from left to right (ex. BIXOLON) RIGHT_TO_LEFT Print from right to left (ex. NOLOXIB) * const unsigned int codePage [in] Set the encoding type for character strings. Constant...
Label Printer 3-17 Prints Print the buffer. int Prints(const int nLabelSet, const int nCopies); [Parameters] * const int nLabelSet [in] Number of label sets (1 ~ 65535) * const int nCopies [in] Number of label copies (1 ~ 65535) [Return Values] Constant Value Description...
Label Printer 3-18 Print1DBarcode Print 1-dimensional barcode. int Print1DBarcode(const char *barcodeData, const int xPos, const int yPos, const int barcodeType, const int narrowBarWidth, const int wideBarWidth, const int barcodeHeight, const int rotation, const int HRI); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot]...
Page 29
Label Printer * int rotation [in] Set the rotation value. Constant Value Description ROTATE_0 Rotate by 0 degree ROTATE_90 Rotate by 90 degrees ROTATE_180 Rotate by 180 degrees ROTATE_270 Rotate by 270 degrees * int HRI [in] Set the HRI printing position and size in the range between 0 and 8. [Return Values] Constant Value...
Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintMaxiCode(“990,840,06840,THIS IS A TEST OF MODE 0 BIXOLON LABEL PRINTER”, 30, 100, MAXICODE_MODE0); Prints(1, 1); …… Rev. 1.00 - 30 -...
Label Printer 3-20 PrintPDF417 Print 2-dimensional barcode (PDF417). int PrintBarcode(const char *barcodeData, const int xPos, const int yPos, const int verticalCount, const int horizontalCount, int errorLevel, int dataComp, bool HRI, int startPosition, int moduleWidth, int barHeight, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot]...
Page 32
The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintPDF417(“BIXOLON Label Printer, This is Test Printing.”, 30, 100, 30, 5, PDF417_ECL0, PDF417_COMP_TEXT, true, 1, 3, 10, ROTATE_0); Prints(1, 1); …… Rev. 1.00 - 32 -...
Label Printer 3-21 PrintQRCode Print 2-dimensional barcode (QR Code). int PrintQRCode(const char *barcodeData, const int xPos, const int yPos, int model, const int eccLevel, int barSize, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot] * const int yPos [in] Vertical position (Y) [dot]...
Page 34
Label Printer * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintQRCode(“ABCDEFGHIJKLMN1234567890”, 30, 100, 1, QRCODE_ECC7, 4, ROTATE_0); Prints(1, 1); …… Rev. 1.00 - 34 -...
Rotate by 270 degrees [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintDataMatrix(“BIXOLON Label Printer”, 30, 100, 4, false, ROTATE_0); Prints(1, 1); …… Rev. 1.00 - 35 -...
Label Printer 3-23 PrintAztec Print 2-dimensional barcode (Aztec). int PrintAztec(const char *barcodeData, const int xPos, const int yPos, int barSize, int interpretation, int errCodeNSymbolSize, bool menuSymbol, int numOfSymbol, int optID, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot] * const int yPos...
Page 37
Label Printer [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintAztec(“THIS IS AZTEC BARCODE TESTTHIS IS AZTEC BARCODE TEST”, 30, 100, 5, 0, 0, true, 1, 1, ROTATE_0); Prints(1, 1);...
Label Printer 3-24 PrintCode49 Print 2-dimensional barcode (Code49). int PrintCode49(const char *barcodeData, const int xPos, const int yPos, const int narrowWidth, const int wideWidth, const int barHeight, int HRI, int startingMode, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot] * const int yPos...
Page 39
Label Printer [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintCode49(“12345ABC”, 30, 100, 2, 7, 22, 2, 7, ROTATE_0); Prints(1, 1); …… Rev. 1.00 - 39 -...
Label Printer 3-25 PrintCODABLOCK Print 2-dimensional barcode (CODABLOCK). int PrintCODABLOCK(const char *barcodeData, const int xPos, const int yPos, const int narrowWidth, const int wideWidth, const int barHeight, const bool security, int dataColumns, int mode, int encodeRow); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot]...
Page 41
The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintCODABLOCK(“BIXOLON BARCODE TEST 123BIXOLON BARCODE TEST 123”, 30, 100, 2, 5, 30, false, 30, CODABLOCK_E, 4); Prints(1, 1); …… Rev. 1.00 - 41 -...
Label Printer 3-26 PrintMicroPDF Print 2-dimensional barcode (Micro-PDF417). int PrintMicroPDF(const char *barcodeData, const int xPos, const int yPos, int moduleWidth, int barHeight, int mode, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot] * const int yPos [in] Vertical position (Y) [dot] * int moduleWidth...
Page 43
Label Printer * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintMicroPDF(“ABCDEFGHIJKLMN1234567890”, 30, 100, 2, 6, 8, ROTATE_0); Prints(1, 1); …… Rev. 1.00 - 43 -...
Label Printer 3-27 PrintGS1DataBar Print GS1 DataBar barcode. Long PrintGS1DataBar(const char *barcodeData, const int xPos, const int yPos, int barcodeType, int expand, int separatorHeight, int barHeight, int segmentWidth, int rotation); [Parameters] * const char *barcodeData [in] Barcode printing data * const int xPos [in] Horizontal position (X) [dot] * const int yPos [in] Vertical position (Y) [dot]...
Page 45
Label Printer * int rotation [in] Rotation value Constant Value Description ROTATE_0 Rotate by 0 degree ROTATE_90 Rotate by 90 degrees ROTATE_180 Rotate by 180 degrees ROTATE_270 Rotate by 270 degrees [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed.
Label Printer 3-28 PrintBlock Print lines, blocks, boxes and slopes. int PrintBlock(const int xStart, const int yStart, const int xEnd, const int yEnd, const int option, const int thickness); [Parameters] * const int xStart [in] X-axis starting coordinate [dot] * const int yStart [in] Y-axis starting coordinate [dot] * const int xEnd [in] X-axis end coordinate [dot]...
Label Printer 3-29 PrintCircle Print circles. int PrintCircle(const int xPos, const int yPos, int size, int multi); [Parameters] * const int xPos [in] Horizontal position (X) [dot] * const int yPos [in] Vertical position (Y) [dot] * int size [in] Circle size (1 ~ 6) * int multi [in] Zoom in (1 ~ 4) [Return Values]...
Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. READ_ERROR -106 Data reception failed. * Example int ret; char cmd = “T20,20,3,1,1,0,0,N,N,\'BIXOLON Label Printer\'”; ret = ConnectToPrinter(“portinfo…”); …… DirectIO(cmd, strlen(cmd), NULL, 0); …… Rev. 1.00 - 50 -...
Label Printer 3-32 CalibrateMedia Support auto calibration. int CalibrateMedia(); [Parameters] None [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… CalibrateMedia(); …… Rev. 1.00 - 51 -...
Label Printer 3-33 ResetPrinter Reboot the printer. int ResetPrinter(); [Parameters] None [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… ResetPrinter(); …… Rev. 1.00 - 52 -...
Label Printer 3-34 ClearBuffer Delete the image buffer data of the printer. int ClearBuffer(); [Parameters] None [Return Values] Constant Value Description SUCCESS The function is successful. WRITE_ERROR -105 Data transmission failed. * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… ClearBuffer(); ……...