You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1545 lines
44 KiB

3 years ago
/*!
* \~chinese
* @header PTCommandTSPL.h
* @abstract TSPL
*
* \~english
* @header PTCommandTSPL.h
* @abstract TSPL Command
*/
#import <Foundation/Foundation.h>
#import "SDKDefine.h"
#import "PTBitmap.h"
/*!
* \~chinese
*
*
* \~english
* Print speed
*/
typedef NS_ENUM(NSUInteger, PTTSCPrintSpeed) {
PTTSCPrintSpeed1 = 1,
PTTSCPrintSpeed2 = 2,
PTTSCPrintSpeed3 = 3,
PTTSCPrintSpeed4 = 4,
PTTSCPrintSpeed5 = 5,
PTTSCPrintSpeed6 = 6,
PTTSCPrintSpeed10 = 10,
PTTSCPrintSpeed12 = 12
};
/*!
* \~chinese
*
*
* \~english
* Print density
*/
typedef NS_ENUM(NSUInteger, PTTSCPrintDensity) {
PTTSCPrintDensity0 = 0,
PTTSCPrintDensity1 = 1,
PTTSCPrintDensity2 = 2,
PTTSCPrintDensity3 = 3,
PTTSCPrintDensity4 = 4,
PTTSCPrintDensity5 = 5,
PTTSCPrintDensity6 = 6, ///< default
PTTSCPrintDensity7 = 7,
PTTSCPrintDensity8 = 8,
PTTSCPrintDensity9 = 9,
PTTSCPrintDensity10 = 10,
PTTSCPrintDensity11 = 11,
PTTSCPrintDensity12 = 12,
PTTSCPrintDensity13 = 13,
PTTSCPrintDensity14 = 14,
PTTSCPrintDensity15 = 15
};
/*!
* \~chinese
*
*
* \~english
* DIRECTION
*/
typedef NS_ENUM(NSUInteger, PTTSCPrintDirection) {
/*! \~chinese 正常方向 \~english normal */
PTTSCPrintDirectionNormal = 0,
/*! \~chinese 反向 \~english Reverse */
PTTSCPrintDirectionReverse = 1
};
/*!
* \~chinese
*
*
* \~english
* Print Mode
*/
typedef NS_ENUM(NSUInteger, PTTSCPrintStyle) {
/*! \~chinese 正常模式 \~english normal */
PTTSCPrintStyleNormal = 0,
/*! \~chinese 镜像模式 \~english Mirror */
PTTSCPrintStyleMirror = 1
};
/*!
* \~chinese
*
*
* \~english
* International character
*/
typedef NS_ENUM(NSUInteger, PTTSCCharacterStyle) {
PTTSCCharacterStyleUSA = 0,
PTTSCCharacterStyleBritish,
PTTSCCharacterStyleGerman,
PTTSCCharacterStyleFrench,
PTTSCCharacterStyleDanish,
PTTSCCharacterStyleItalian,
PTTSCCharacterStyleSpanish,
PTTSCCharacterStyleSwedish,
PTTSCCharacterStyleSwiss,
PTTSCCharacterStyleUnitedStates,
PTTSCCharacterStyleMultilingual,
PTTSCCharacterStyleSlavic,
PTTSCCharacterStylePortuguese,
PTTSCCharacterStyleCanadianOrFrench,
PTTSCCharacterStyleNordic,
PTTSCCharacterStyleTurkish,
PTTSCCharacterStyleWindowsCentralEurope,
PTTSCCharacterStyleWindowsLatin,
PTTSCCharacterStyleWindowsGreek,
PTTSCCharacterStyleWindowsTurkish
};
/*!
* \~chinese
*
*
* \~english
* Barcode type
*/
typedef NS_ENUM(NSUInteger, PTTSCBarcodeStyle) {
PTTSCBarcodeStyle128 = 0,
PTTSCBarcodeStyle128M,
PTTSCBarcodeStyleEAN128,
PTTSCBarcodeStyle25,
PTTSCBarcodeStyle25C,
PTTSCBarcodeStyle39,
PTTSCBarcodeStyle39C,
PTTSCBarcodeStyle93,
PTTSCBarcodeStyleEAN13,
PTTSCBarcodeStyleEAN132,
PTTSCBarcodeStyleEAN135,
PTTSCBarcodeStyleEAN8,
PTTSCBarcodeStyleEAN82,
PTTSCBarcodeStyleEAN85,
PTTSCBarcodeStyleCODA,
PTTSCBarcodeStylePOST,
PTTSCBarcodeStyleUPCA,
PTTSCBarcodeStyleUPCA2,
PTTSCBarcodeStyleUPCA5,
PTTSCBarcodeStyleUPCE,
PTTSCBarcodeStyleUPCE2,
PTTSCBarcodeStyleUPCE5,
PTTSCBarcodeStyleCPOST,
PTTSCBarcodeStyleMSI,
PTTSCBarcodeStyleMSIC,
PTTSCBarcodeStylePLESSY,
PTTSCBarcodeStyleITF14,
PTTSCBarcodeStyleEAN14,
PTTSCBarcodeStyle11
};
/*!
* \~chinese
*
*
* \~english
* Readable
*/
typedef NS_ENUM(NSUInteger, PTTSCBarcodeReadbleStyle) {
/*! \~chinese 不可识别 \~english not */
PTTSCBarcodeReadbleStyleNot = 0,
/*! \~chinese 可识别 \~english human */
PTTSCBarcodeReadbleStyleHuman
};
/*!
* \~chinese
*
*
* \~english
* Rotation
*/
typedef NS_ENUM(NSUInteger, PTTSCStyleRotation) {
/*! \~chinese 正常打印 \~english normal */
PTTSCStyleRotation0 = 0,
/*! \~chinese 顺时针旋转90度 \~english rotate 90 degrees (clockwise) */
PTTSCStyleRotation90 = 90,
/*! \~chinese 180度旋转 \~english inverted 180 degrees */
PTTSCStyleRotation180 = 180,
/*! \~chinese 270度旋转 \~english read from bottom up, 270 degrees */
PTTSCStyleRotation270 = 270
};
/*!
* \~chinese
*
*
* \~english
* The ratio of wide to narrow bars
*/
typedef NS_ENUM(NSUInteger, PTTSCBarcodeRatio) {
PTTSCBarcodeRatio1 = 1, ///< 1:1
PTTSCBarcodeRatio2, ///< 1:2
PTTSCBarcodeRatio3, ///< 1:3
PTTSCBarcodeRatio4, ///< 2:5
PTTSCBarcodeRatio5 ///< 3:7
};
/*!
* \~chinese
*
*
* \~english
* Error correction recovery level
*/
typedef NS_ENUM(UInt8, PTTSCQRcodeEcclevel) {
/*! \~chinese ⾼密度级别 \~english high density level level */
PTTSCQRcodeEcclevelL = 'L',
/*! \~chinese 标准级别 \~english standard level */
PTTSCQRcodeEcclevelM = 'M',
/*! \~chinese 高可靠级别 \~english high reliability level */
PTTSCQRcodeEcclevelQ = 'Q',
/*! \~chinese 极高可靠级别 \~english ultra-high reliability level */
PTTSCQRcodeEcclevelH = 'H'
};
/*!
* \~chinese
*
*
* \~english
* cell width
*/
typedef NS_ENUM(NSUInteger, PTTSCQRcodeWidth) {
PTTSCQRcodeWidth1 = 1,
PTTSCQRcodeWidth2,
PTTSCQRcodeWidth3,
PTTSCQRcodeWidth4,
PTTSCQRcodeWidth5,
PTTSCQRcodeWidth6,
PTTSCQRcodeWidth7,
PTTSCQRcodeWidth8,
PTTSCQRcodeWidth9,
PTTSCQRcodeWidth10
};
/*!
* \~chinese
*
*
* \~english
* qrcode mode
*/
typedef NS_ENUM(UInt8, PTTSCQRCodeMode) {
/*! \~chinese 自动 \~english auto */
PTTSCQRCodeModeAuto = 'A',
/*! \~chinese 手动 \~english Manual */
PTTSCQRCodeModeManual = 'M'
};
/*!
* \~chinese
*
*
* \~english
* qrcode model
*/
typedef NS_ENUM(NSUInteger, PTTSCQRCodeModel) {
/*! \~chinese 默认值,原始版本 \~english (default), original version */
PTTSCQRCodeModelM1 = 0,
/*! \~chinese 增强版本 \~english enhanced version */
PTTSCQRCodeModelM2 = 1
};
/*!
* \~chinese
* mask
*
* \~english
* qrcode mask
*/
typedef NS_ENUM(NSUInteger, PTTSCQRcodeMask) {
PTTSCQRcodeMaskS0 = 1,
PTTSCQRcodeMaskS1,
PTTSCQRcodeMaskS2,
PTTSCQRcodeMaskS3,
PTTSCQRcodeMaskS4,
PTTSCQRcodeMaskS5,
PTTSCQRcodeMaskS6,
PTTSCQRcodeMaskS7,
PTTSCQRcodeMaskS8
};
/*!
* \~chinese
*
*
* \~english
* qrcode mask
*/
typedef NS_ENUM(NSUInteger, PTTSCBitmapMode) {
PTTSCBitmapModeOVERWRITE = 0,
PTTSCBitmapModeOR = 1,
PTTSCBitmapModeXOR = 2,
/*! *\~chinese 压缩模式,兼容旧的固件,新的固件已经废弃 *\~english Compatible with old models,New firmware has been deprecated */
PTTSCBitmapModeCompress = 3,
PTTSCBitmapModeOVERWRITECompress = 16,
PTTSCBitmapModeORCompress = 17,
PTTSCBitmapModeXORCompress = 18
};
/*!
* \~chinese
* (),9
*
* \~english
* Text font typefor vector and chinese onlt select 9
*/
typedef NS_ENUM(NSUInteger, PTTSCTextVectorFontStyle) {
PTTSCTextVectorFontStyle0 = 0, ///< 8x12not adjuset
PTTSCTextVectorFontStyle1, ///< 8x12
PTTSCTextVectorFontStyle2, ///< 12x20
PTTSCTextVectorFontStyle3, ///< 16x24
PTTSCTextVectorFontStyle4, ///< 24x32
PTTSCTextVectorFontStyle5, ///< 32x48
PTTSCTextVectorFontStyle6, ///< 14x19
PTTSCTextVectorFontStyle7, ///< 21x27
PTTSCTextVectorFontStyle8, ///< 14x25
PTTSCTextVectorFontStyle9 ///< vector font,for chinese
};
/*!
* \~chinese
* ,
*
* \~english
* Text font type,Support Chinese and English
*/
typedef NS_ENUM(NSUInteger, PTTSCTextFontStyle) {
PTTSCTextFontStyle0 = 0, ///< chinese:24x24 english:12x24
PTTSCTextFontStyle1, ///< chinese:16x16 english:8x16
};
/*!
* \~chinese
* DMATRIX
*
* \~english
* Module size for DMATRIX 2D bar code
*/
typedef NS_ENUM(UInt8, PTTSCDMATRIXSize) {
PTTSCDMATRIXSizeX6 = 0,
PTTSCDMATRIXSizeX8
};
@interface PTCommandTSPL : NSObject
/*!
* \~chinese
*
* .
*
* \~english
*
* Data sent to the printer.
*
*/
@property(strong,nonatomic,readwrite) NSMutableData *cmdData;
/*!
* \~chinese
*
* 使GBK.
*
* \~english
*
* encodedefault is GBK.
*
*/
@property (nonatomic, assign) NSStringEncoding encoding;
/////////////////////////////////////////////////////////////////////
/********************* Setup and System Commands ********************/
/////////////////////////////////////////////////////////////////////
/*!
* \~chinese
*
* .
*
* @brief
*
* \~english
*
* printer Print self-test message.
*
* @brief View Printer Message
*/
- (void)selfTest;
/*!
* \~chinese
*
* .
*
* @brief
* @param cmd .使encoding.
*
* \~english
*
* append command.
*
* @brief Append Command
* @param cmd command text. encode with encoding property.
*
*/
- (void)appendCommand:(NSString *)cmd;
/*!
* \~chinese
*
* ,.1mm == 8 dot
*
* @brief
* @param label_width
* @param label_height
*
* \~english
*
* This command defines the label width and length(mm).1mm == 8 dot
*
* @brief Set Print Area
* @param label_width Label width
* @param label_height Label length
*
*/
- (void)setPrintAreaSizeWithWidth:(NSInteger)label_width
height:(NSInteger)label_height;
/*!
* \~chinese
*
* ,.
*
* @brief
* @param distance ,0 distance 25.4 (mm)
* @param offset
*
* \~english
*
* This command sets the distance between two labels(mm).
*
* @brief Set Label Distance
* @param distance The gap distance between two labels,0 distance 25.4 (mm)
* @param offset The offset distance of the gap offset label length (mm)
*
*/
- (void)setGapWithDistance:(NSInteger)distance
offset:(NSInteger)offset;
/*!
* \~chinese
*
* 线().(height,offset 0,0)
*
* @brief
* @param height 线 0~25.4 mm
* @param offset 线 0~label length
*
* \~english
*
* This command sets the height of the black line and the user-defined extra label feeding length each form feed takes(mm).(height,offset is 0,0 : Continuous label)
*
* @brief Bline
* @param height The height of black line either in mm. 0 m 25.4 (mm)
* @param offset The extra label feeding length. 0 offset label length
*
*/
- (void)setBlineWithHeight:(NSInteger)height
offset:(NSInteger)offset;
/*!
* \~chinese
*
* .
*
* @brief
* @param distance ,0 distance 25.4 (mm)
*
* \~english
*
* This command defines the selective, extra label feeding length(mm).
*
* @brief Offset Length
* @param distance The offset distance,0 distance 25.4 (mm)
*
*/
- (void)setOffsetWithDistance:(NSInteger)distance;
/*!
* \~chinese
*
* .
*
* @brief
* \~english
*
* This command feeds label to the beginning of next label.
*
* @brief Form Feed
*/
- (void)feedToNextLabel;
/*!
* \~chinese
*
* (dots).
*
* @brief
* @param length ,1 length 9999
*
* \~english
*
* This command feeds label with the specified length.
*
* @brief Feed Length
* @param length The length is specified by dot. 1 length 9999
*
*/
- (void)setFeedLength:(NSInteger)length;
/*!
* \~chinese
*
* .
*
* @brief
* @param speed
*
* \~english
*
* This command defines the print speed.
*
* @brief Print Speed
* @param speed Printing speed in inch per second
*
*/
- (void)setPrintSpeed:(PTTSCPrintSpeed)speed;
/*!
* \~chinese
*
* .
*
* @brief
* @param density
*
* \~english
*
* This command sets the printing darkness.
*
* @brief Print Density
* @param density 0: specifies the lightest level,15: specifies the darkest level
*
*/
- (void)setPrintDensity:(PTTSCPrintDensity)density;
/*!
* \~chinese
*
* .
*
* @brief
* @param direction
* @param mirror
*
* \~english
*
* This command defines the printout direction and mirror image.
*
* @brief Print Direction And Mirror
* @param direction normal or reverse
* @param mirror normal or mirror
*
*/
- (void)setPrintDirection:(PTTSCPrintDirection)direction mirror:(PTTSCPrintStyle)mirror;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_pos
* @param y_pos
*
* \~english
*
* This command defines the reference point of the label.
*
* @brief Set Label Reference Point
* @param x_pos Horizontal coordinate (in dots)
* @param y_pos Vertical coordinate (in dots)
*
*/
- (void)setReferenceXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos;
/*!
* \~chinese
*
* .
*
* @brief
* @param codepage
*
* \~english
*
* This command defines the code page of international character set.
*
* @brief International Character Set
* @param codepage Name or number of code page
*
*/
- (void)setCodePage:(PTTSCCharacterStyle)codepage;
/*!
* \~chinese
*
* .
*
* @brief
* \~english
*
* This command clears the image buffer.
*
* @brief Clear Buffer
*/
- (void)setCLS;
/*!
* \~chinese
*
* .
*
* @brief
* @param distance (1,9999)
*
* \~english
*
* This command feeds the label in reverse. The length is specified by dot.
*
* @brief Feeds Label In Reverse
* @param distance unit: dot,(1,9999)
*
*/
- (void)setBackFeed:(NSInteger)distance;
/*!
* \~chinese
*
* .
*
* @brief
* @param distance (1,9999)
*
* \~english
*
* This command feeds the label in reverse. The length is specified by dot.
*
* @brief Feeds Label In Reverse
* @param distance unit: dot,(1,9999)
*
*/
- (void)setBackUP:(NSInteger)distance;
/*!
* \~chinese
*
* .
*
* @brief
* \~english
*
* This command will feed label until the internal sensor has determined the origin.
*
* @brief Feed label until the internal sensor has determined the origin
*/
- (void)setHome;
/*!
* \~chinese
*
* .
*
* @brief
* @param sets
* @param copies
*
* \~english
*
* This command prints the label format currently stored in the image buffer.
*
* @brief Begin Print,Set Print Copies
* @param sets Specifies how many sets of labels will be printed.
* @param copies Specifies how many copies should be printed for each particular label set.
*
*/
- (void)printWithSets:(NSInteger)sets copies:(NSInteger)copies;
/*!
* \~chinese
*
* 10.
*
* @brief
* @param level 0~9
* @param interval 1~4095
*
* \~english
*
* This command controls the sound frequency of the beeper. There are 10 levels of sounds.
*
* @brief Control Frequency
* @param level Sound level: 0~9
* @param interval Sound interval: 1~4095
*
*/
- (void)setSoundWithLevel:(NSInteger)level interval:(NSInteger)interval;
/*!
* \~chinese
*
* .
* @brief
*
* \~english
*
* This command activates the cutter to immediately cut the labels without back feeding the label.
*
* @brief Set Cutter
*/
- (void)setCut;
/*!
* \~chinese
*
* ,.
*
* @brief
* @param max_len
*
* \~english
*
* If the gap sensor is not set to a suitable sensitivity while feeding labels, the printer will not be able to locate the correct position of the gap.
*
* @brief Set Feed Length
* @param max_len The maximum length for sensor detecting.
*
*/
- (void)setLimitFeed:(NSInteger)max_len;
/*!
* \~chinese
*
* .
*
* @brief
* @param bold true: false:
*
* \~english
*
* Set font bold.
*
* @brief Font Bold
* @param bold true:bold false:not bold
*
*/
- (void)setFontBold:(BOOL)bold;
/*!
* \~chinese
*
* .
*
* @brief
* @note 104(aa bb cc dd) + 4() + 1 + 00,
1.aabbccdd 03000000 2000
2.aabbccdd ffffffff 0000 ->
aabbccdd 00000000 0000 ->
* @param status true: false:
*
* \~english
*
* Turn on/off print status callback.
*
* @brief Automatic Return Status
* @note Returns 10 bytes of data,4-byte instruction header(aa bb cc dd) + 4 bytes of printed sheets + 1 byte status + Terminator(00),Returns twice the data, the first time to return to get the total number of prints and the status, the second time to end the end of printing
* @param status true:open false:close
*
*/
- (void)setPrinterStateAutomaticBackWithStatus:(BOOL)status;
/*!
* \~chinese
*
* .
*
* @brief
*
| () | |
| --------- | ----------- |
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
*
* \~english
*
* Get print status.
* @brief Get Print Status
*
| Bit(return value) | Status |
| ----------------- | ------------- |
| 0 | Head opened |
| 1 | Paper jam |
| 2 | Out of paper |
| 3 | Out of ribbon |
| 4 | Pause |
| 5 | Printing |
| 6 | Cover opened |
| 7 | High |
*
*/
- (void)getPrinterStatus;
/////////////////////////////////////////////////////////////////////
/********************* Label Commands ********************/
/////////////////////////////////////////////////////////////////////
/*!
* \~chinese
*
* 线.
*
* @brief 线
* @param x_pos
* @param y_pos
* @param width 线
* @param height 线
*
* \~english
*
* This command draws a bar on the label format.
*
* @brief Draws Bar
* @param x_pos The upper left corner x-coordinate (in dots)
* @param y_pos The upper left corner y-coordinate (in dots)
* @param width Bar width (in dots)
* @param height Bar height (in dots)
*
*/
- (void)drawBarWithXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
width:(NSInteger)width
height:(NSInteger)height;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_pos x
* @param y_pos y
* @param type
* @param height
* @param readable 01
* @param rotation
* @param ratio
* @param context
*
* \~english
*
* This command prints 1D barcodes.
*
* @brief 1D Barcodes
* @param x_pos Specify the x-coordinate of the bar code on the label
* @param y_pos Specify the y-coordinate of the bar code on the label
* @param type code type
* @param height Bar code height (in dots)
* @param readable 0: not readable 1: human readable
* @param rotation Rotation
* @param ratio The ratio of wide to narrow bars
* @param context The maximum number of digits of bar code content
*
*/
- (void)printBarcodeWithXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
type:(PTTSCBarcodeStyle)type
height:(NSInteger)height
readable:(PTTSCBarcodeReadbleStyle)readable
rotation:(PTTSCStyleRotation)rotation
ratio:(PTTSCBarcodeRatio)ratio
context:(NSString *)context;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_pos x
* @param y_pos y
* @param ecc_level
* @param width
* @param mode
* @param rotation
* @param model
* @param mask mask
* @param context
*
* \~english
*
* This command prints QR code.
*
* @brief QR Code
* @param x_pos Specify the x-coordinate of the qr code on the label
* @param y_pos Specify the y-coordinate of the qr code on the label
* @param ecc_level Error correction recovery level
* @param width cell width
* @param mode mode
* @param rotation Rotation
* @param model model
* @param mask mask
* @param context qrcode context
*
*/
- (void)printQRcodeWithXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
eccLevel:(PTTSCQRcodeEcclevel)ecc_level
cellWidth:(PTTSCQRcodeWidth)width
mode:(PTTSCQRCodeMode)mode
rotation:(PTTSCStyleRotation)rotation
model:(PTTSCQRCodeModel)model
mask:(PTTSCQRcodeMask)mask
context:(NSString *)context;
/*!
* \~chinese
*
* .
*
* @brief
* @param xpos x
* @param ypos y
* @param mode
* @param image
* @param bitmapMode
* @param compress
* @return false
*
* \~english
*
* Print Bitmap.
*
* @brief Print Bitmap
* @param xpos Specify the x-coordinate
* @param ypos Specify the y-coordinate
* @param mode Graphic modes
* @param image Image
* @param bitmapMode Bitmap mpde:binary/dithering
* @param compress Compress mode:TIFF/ZPL2/LZO/None
* @return The data is less than the cache and can be printed NO:The data exceeds the cache and cannot be printed
*
*/
- (BOOL)addBitmapWithXPos:(NSInteger)xpos
yPos:(NSInteger)ypos
mode:(PTTSCBitmapMode)mode
image:(CGImageRef)image
bitmapMode:(PTBitmapMode)bitmapMode
compress:(PTBitmapCompressMode)compress;
/*!
* \~chinese
*
* ().
*
* @brief ()
* @param x_pos x
* @param y_pos y
* @param font
* @param rotation
* @param x_multiplication ,1-10
* @param y_multiplication ,1-10
* @param text
*
* \~english
*
* Print Text(Printer for dot matrix font).
*
* @brief Print Text(Matrix Fonts)
* @param x_pos Specify the x-coordinate
* @param y_pos Specify the y-coordinate
* @param font Font type
* @param rotation Rotation
* @param x_multiplication Horizontal multiplication,up to 10x
* @param y_multiplication Vertical multiplication,up to 10x
* @param text print context
*
*/
- (void)appendTextWithXpos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
font:(PTTSCTextFontStyle)font
rotation:(PTTSCStyleRotation)rotation
xMultiplication:(NSInteger)x_multiplication
yMultiplication:(NSInteger)y_multiplication
text:(NSString *)text;
/*!
* \~chinese
*
* ().
*
* @brief ()
* @param x_pos x
* @param y_pos y
* @param font
* @param rotation
* @param x_multiplication ,1-10
* @param y_multiplication ,1-10
* @param safeHeight
* @param width 0
* @param lineSpacing
* @param text
*
* \~english
*
* Print word wrap text(Printer for dot matrix font).
*
* @brief Print Word Wrap Text(Matrix Fonts)
* @param x_pos Specify the x-coordinate
* @param y_pos Specify the y-coordinate
* @param font Font type
* @param rotation Rotation
* @param x_multiplication Horizontal multiplication,up to 10x
* @param y_multiplication Vertical multiplication,up to 10x
* @param safeHeight Height of text field.Part will not print more than height
* @param width width of text field.if width is 0,not auto line
* @param lineSpacing line space.
* @param text print context
*
*/
- (NSInteger)printAutoTextWithXpos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
font:(PTTSCTextFontStyle)font
rotation:(PTTSCStyleRotation)rotation
xMultiplication:(NSInteger)x_multiplication
yMultiplication:(NSInteger)y_multiplication
safeHeight:(NSInteger)safeHeight
width:(NSInteger)width
lineSpacing:(NSInteger)lineSpacing
text:(NSString *)text;
/*!
* \~chinese
*
* ().
*
* @brief
* @param x_pos x
* @param y_pos y
* @param font
* @param rotation
* @param x_multiplication ,9
* @param y_multiplication ,9
* @param text
*
* \~english
*
* Print Text(Printer for vector fonts and dot fonts).
*
* @brief Print Text
* @param x_pos Specify the x-coordinate
* @param y_pos Specify the y-coordinate
* @param font Font type
* @param rotation Rotation
* @param x_multiplication Horizontal font size,If the type is 9, said the font size, or said is magnification
* @param y_multiplication Vertical font size,If the type is 9, said the font size, or said is magnification
* @param text print context
*
*/
- (void)appendTextForVectorWithXpos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
font:(PTTSCTextVectorFontStyle)font
rotation:(PTTSCStyleRotation)rotation
xMultiplication:(NSInteger)x_multiplication
yMultiplication:(NSInteger)y_multiplication
text:(NSString *)text;
/*!
* \~chinese
*
* ().
*
* @brief ()
* @param x_pos x
* @param y_pos y
* @param font
* @param rotation
* @param x_multiplication ,9
* @param y_multiplication ,9
* @param safeHeight
* @param width 0
* @param lineSpacing
* @param text
*
* \~english
*
* Print word wrap text(Printer for vector fonts and dot fonts).
*
* @brief Print Word Wrap Text(Vector Fonts)
* @param x_pos Specify the x-coordinate
* @param y_pos Specify the y-coordinate
* @param font Font type
* @param rotation Rotation
* @param x_multiplication Horizontal font size,If the type is 9, said the font size, or said is magnification
* @param y_multiplication Vertical font size,If the type is 9, said the font size, or said is magnification
* @param safeHeight Height of text field.Part will not print more than height
* @param width width of text field.if width is 0,not auto line
* @param lineSpacing line space.
* @param text print context
*
*/
- (NSInteger)printAutoTextForVectorWithXpos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
font:(PTTSCTextVectorFontStyle)font
rotation:(PTTSCStyleRotation)rotation
xMultiplication:(NSInteger)x_multiplication
yMultiplication:(NSInteger)y_multiplication
safeHeight:(NSInteger)safeHeight
width:(NSInteger)width
lineSpacing:(NSInteger)lineSpacing
text:(NSString *)text;
/*!
* \~chinese
*
*
*
* @brief
* @param x_start x
* @param y_start y
* @param x_width x
* @param y_height y
*
* \~english
*
* This command reverses a region in image buffer.
*
* @brief Reverses
* @param x_start The x-coordinate of the starting point (in dots)
* @param y_start The y-coordinate of the starting point (in dots)
* @param x_width X-axis region width (in dots)
* @param y_height Y-axis region height (in dots)
*
*/
- (void)setReverseWithXStart:(NSInteger)x_start
yStart:(NSInteger)y_start
xWidth:(NSInteger)x_width
yHeight:(NSInteger)y_height;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_start x
* @param y_start y
* @param x_end x
* @param y_end y
* @param thickness 线
*
* \~english
*
* This command draws rectangles on the label.
*
* @brief Draws Rectangles
* @param x_start Specify x-coordinate of upper left corner (in dots)
* @param y_start Specify y-coordinate of upper left corner (in dots)
* @param x_end Specify x-coordinate of lower right corner (in dots)
* @param y_end Specify y-coordinate of lower right corner (in dots)
* @param thickness Line thickness (in dots)
*
*/
- (void)setBoxWithXStart:(NSInteger)x_start
yStart:(NSInteger)y_start
xEnd:(NSInteger)x_end
yEnd:(NSInteger)y_end
thickness:(NSInteger)thickness;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_start x
* @param y_start y
* @param width
* @param height
* @param thickness
*
* \~english
*
* Draw an ellipse on the label.
*
* @brief Draw Ellipse
* @param x_start Specify x-coordinate of upper left corner (in dots)
* @param y_start Specify y-coordinate of upper left corner (in dots)
* @param width Specify the width of the ellipse (in dots)
* @param height Specify the height of the ellipse (in dots)
* @param thickness Thickness of the ellipse (in dots)
*
*/
- (void)setEllipseWithXStart:(NSInteger)x_start
yStart:(NSInteger)y_start
width:(NSInteger)width
height:(NSInteger)height
thickness:(NSInteger)thickness;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_start x
* @param y_start y
* @param diameter
* @param thickness
*
* \~english
*
* This command draws a circle on the label.
*
* @brief Draw Circle
* @param x_start Specify x-coordinate of upper left corner (in dots)
* @param y_start Specify y-coordinate of upper left corner (in dots)
* @param diameter Specify the diameter of the circle (in dots)
* @param thickness Thickness of the circle (in dots)
*
*/
- (void)setCircleWithXStart:(NSInteger)x_start
yStart:(NSInteger)y_start
diameter:(NSInteger)diameter
thickness:(NSInteger)thickness;
/*!
* \~chinese
*
* .
*
* @brief
* @param x_start x
* @param y_start y
* @param x_width x
* @param y_height y
*
* \~english
*
* This command clears a specified region in the image buffer.
*
* @brief Clear Specified BBuffer
* @param x_start The x-coordinate of the starting point (in dots)
* @param y_start The x-coordinate of the starting point (in dots)
* @param x_width The region width in x-axis direction (in dots)
* @param y_height The region height in y-axis direction (in dots)
*
*/
- (void)setEraseWithXStart:(NSInteger)x_start
yStart:(NSInteger)y_start
xWidth:(NSInteger)x_width
yHeight:(NSInteger)y_height;
/*!
* \~chinese
*
* DMATRIX.
*
* @brief DMATRIX
* @param x_pos
* @param y_pos
* @param width
* @param height
* @param xm
* @param row :10-144
* @param col :10-144
* @param expresssion
*
* \~english
*
* This command is used to define the DataMatrix 2D bar code.
*
* @brief DataMatrix 2D Barcode
* @param x_pos Specify the x-coordinate of the bar code on the label
* @param y_pos Specify the y-coordinate of the bar code on the label
* @param width The expected width of barcode area (in dots)
* @param height The expected height of barcode area (in dots)
* @param xm Module size (in dots)
* @param row Symbol size of row: 10 to 144
* @param col Symbol size of col: 10 to 144
* @param expresssion Barcode content
*
*/
- (void)drawDmatrixBarcodeWithXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
width:(NSInteger)width
height:(NSInteger)height
xm:(PTTSCDMATRIXSize)xm
row:(NSInteger)row
col:(NSInteger)col
expression:(NSString *)expresssion;
/*!
* \~chinese
*
* PDF417.
*
* @brief PDF417
* @param x_pos
* @param y_pos
* @param width
* @param height
* @param rotate
* @param option
* @param expresssion
*
* \~english
*
* This command defines a PDF417 2D barcode.
*
* @brief PDF417 Barcode
* @param x_pos Specify the x-coordinate of the bar code on the label
* @param y_pos Specify the y-coordinate of the bar code on the label
* @param width The expected width of barcode area (in dots)
* @param height The expected height of barcode area (in dots)
* @param rotate Rotation counterclockwise.
* @param option Details are given in the documentation
* @param expresssion Barcode content
*
*/
- (void)printPDF417WithXPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos
width:(NSInteger)width
height:(NSInteger)height
rotate:(PTTSCStyleRotation)rotate
option:(NSString *)option
expression:(NSString *)expression;
/*!
* \~chinese
*
* AZTEC.
*
* @brief AZTEC
* @param xPos
* @param yPos
* @param rotate
* @param size 1206
* @param ecp /
* @param flg 0 1使
* @param menu 010
* @param multi 1266
* @param rev 010
* @param aztecData
*
* \~english
*
* This command defines a AZTEC 2D barcode.
*
* @brief AZTEC Barcode
* @param xPos Specify the x-coordinate of the bar code on the label
* @param yPos Specify the y-coordinate of the bar code on the label
* @param rotate Rotation
* @param size Element module size (1 to 20), default is 6
* @param ecp Error control (& symbol size/type) parameter
* @param flg 0 : input message is straight bytes 1:input uses
* @param menu Menu symbol (0 : no, 1 : yes), default is 0
* @param multi Number of symbols (1 to 26), default is 6
* @param rev Output to be reversed (0 : no, 1 : yes), default is 0
* @param aztecData Barcode content
*
*/
- (void)printAztecWithXPos:(NSInteger)xPos
yPos:(NSInteger)yPos
rotate:(PTTSCStyleRotation)rotate
size:(NSInteger)size
ecp:(NSInteger)ecp
flg:(NSInteger)flg
menu:(NSInteger)menu
multi:(NSInteger)multi
rev:(NSInteger)rev
aztecData:(NSString *)aztecData;
/*!
* \~chinese
*
* BMP.
*
* @brief BMP
* @param filename BMP
* @param x_pos BMPx
* @param y_pos BMPy
*
* \~english
*
* This command prints BMP format images.
*
* @brief BMP Format Image
* @param filename The downloaded BMP filename.
* @param x_pos The x-coordinate of the BMP format image
* @param y_pos The y-coordinate of the BMP format image
*
*/
- (void)printBMPWithFilename:(NSString *)filename
xPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos;
/*!
* \~chinese
*
* PCX.
*
* @brief PCX
* @param filename PCX
* @param x_pos PCXx
* @param y_pos PCXy
*
* \~english
*
* This command prints PCX format images.
*
* @brief PCX Format Image
* @param filename The downloaded PCX filename.
* @param x_pos The x-coordinate of the PCX format image
* @param y_pos The y-coordinate of the PCX format image
*
*/
- (void)printPCXWithFilename:(NSString *)filename
xPos:(NSInteger)x_pos
yPos:(NSInteger)y_pos;
/////////////////////////////////////////////////////////////////////
/********************* Device Reconfiguration Commands ********************/
/////////////////////////////////////////////////////////////////////
/*!
* \~chinese
*
* .
*
* @brief
* @param counterNumber 0-50
* @param step -99999999 ~ 99999999
*
* \~english
*
* Counters can be a real counter or a variable.This setting sets the counter number in the program and its increments.
*
* @brief Set The Counter
* @param counterNumber counter number. There are 51 counters available (@0~@50) in the printer.
* @param step The increment of the counter, can be positive or negative.-99999999 ~ 99999999
*
*/
- (void)setCounterWithCounterNumber:(NSInteger)counterNumber
step:(NSInteger)step;
/*!
* \~chinese
*
* .
*
* @brief
* @param status true: false
*
* \~english
*
* This setting activates or deactivates the cutter.
*
* @brief Cutter Status
* @param status true:Set printer to cut label at the end of printing job falseDisable cutter function
*
*/
- (void)setCutterStatus:(BOOL)status;
/*!
* \~chinese
*
*
*
* @brief
* @param pieces 0 ~ 65535
*
* \~english
*
* Set number of printing labels per cut.
*
* @brief Number Of Cut
* @param pieces 0 ~ 65535
*
*/
- (void)setCutterPieces:(NSInteger)pieces;
@end