BIXOLON SLP-DL413 Reference Manual

BIXOLON SLP-DL413 Reference Manual

Linux sdk
Hide thumbs Also See for SLP-DL413:

Advertisement

Linux SDK Reference Guide
Label Printer
Rev. 1.00
SLP-TX400/SLP-TX403
SLP-TX420/SLP-TX423
SLP-TX220/SLP-TX223
SLP-DX420/SLP-DX423
SLP-DX220/SLP-DX223
SLP-DL410/SLP-DL413
SRP-770II
http://www.bixolon.com

Advertisement

Table of Contents
loading

Summary of Contents for BIXOLON SLP-DL413

  • Page 1 Linux SDK Reference Guide Label Printer SLP-TX400/SLP-TX403 Rev. 1.00 SLP-TX420/SLP-TX423 SLP-TX220/SLP-TX223 SLP-DX420/SLP-DX423 SLP-DX220/SLP-DX223 SLP-DL410/SLP-DL413 SRP-770II http://www.bixolon.com...
  • Page 2: Table Of Contents

    Label Printer ■ Table of Contents 1. About This Manual ......................3 1-1 Supported Kernel & Platforms ..................3 1-2 Supported Interfaces ....................3 2. Property .......................... 4 2-1 CharacterSet & International CharacterSet(LONG R/W) ..........4 2-2 State (LONG R) ......................6 3.
  • Page 3: About This Manual

    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.
  • Page 4: Property

    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...
  • Page 6: State (Long R)

    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...
  • Page 7: Method

    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”);...
  • Page 8: Disconnectprinter

    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.
  • Page 9: Feedonelabel

    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 -...
  • Page 10: Setspeed

    Label Printer 3-5 SetSpeed Set the speed. int SetSpeed(int speed) [Parameters] * int speed [in] Printing speed Constant Value Description SPEED_25 2.5 ips SPEED_30 3.0 ips SPEED_40 4.0 ips SPEED_50 5.0 ips SPEED_60 6.0 ips SPEED_70 7.0 ips SPEED_80 8.0 ips [Return Values] Constant Value...
  • Page 11: Setdensity

    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…”); ……...
  • Page 12: Setorientation

    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.
  • Page 13: Setcutter

    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.
  • Page 14: Setbackfeed

    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;...
  • Page 15: Setpaper

    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...
  • Page 16: Setmargin

    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.
  • Page 17: Setoffset

    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;...
  • Page 18: Printdevicefont

    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 -...
  • Page 20: Printdevicefontw

    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 -...
  • Page 22: Printvectorfont

    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.
  • Page 24: Printvectorfontw

    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...
  • Page 26 Label Printer * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintVectorFontW(“BIXOLON Label Printer SDK Test.”, 20, 150, VECTOR_ASCII, 10, 10, 3, false, false, false, ROTATE_0, ALIGNMENT_LEFT, LEFT_TO_RIGHT, CP_CP949); Prints(1, 1); …… Rev. 1.00 - 26 -...
  • Page 27: Prints

    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...
  • Page 28: Print1Dbarcode

    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...
  • Page 30: Printmaxicode

    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 -...
  • Page 31: Printpdf417

    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 -...
  • Page 33: Printqrcode

    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 -...
  • Page 35: Printdatamatrix

    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 -...
  • Page 36: Printaztec

    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);...
  • Page 38: Printcode49

    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 -...
  • Page 40: Printcodablock

    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 -...
  • Page 42: Printmicropdf

    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 -...
  • Page 44: Printgs1Databar

    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.
  • Page 46: Printblock

    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]...
  • Page 47 Label Printer * Example int ret; ret = ConnectToPrinter(“portinfo…”); …… PrintBlock(20, 20, 300, 300, BLOCK_BOX, 10); PrintBlock(400, 20, 20, 500, BLOCK_SLOPE, 10); Prints(1, 1); …… Rev. 1.00 - 47 -...
  • Page 48: Printcircle

    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]...
  • Page 49: Printimage

    Label Printer 3-30 PrintImage Select and print image files (bmp, jpg, gif). int PrintImage(const char *imagePath, const int xPos, const int yPos, const bool compress); [Parameters] * const char *imagePath [in] Image file path * const int xPos [in] Horizontal position (X) [dot] * const int yPos [in] Vertical position (Y) [dot] * const bool compress...
  • Page 50: Directio

    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 -...
  • Page 51: Calibratemedia

    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 -...
  • Page 52: Resetprinter

    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 -...
  • Page 53: Clearbuffer

    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(); ……...

Table of Contents