Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

RNTscCommand.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // RNTscCommand.h
  3. // RNBluetoothEscposPrinter
  4. //
  5. // Created by januslo on 2018/10/9.
  6. // Copyright © 2018年 Facebook. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <React/RCTBridgeModule.h>
  10. @interface RNTscCommand : NSObject
  11. @property NSMutableData *command;
  12. -(id)init;
  13. -(id)initWithSize:(NSInteger)width height:(NSInteger) height andGap:(NSInteger)gap;
  14. -(void)addStrToCommand:(NSString *)str;
  15. -(void)addGap:(NSInteger)gap;
  16. -(void)addSize:(NSInteger)width height:(NSInteger) height;
  17. -(void)addCashdrwer:(NSInteger) m/*0,1*/ t1:(NSInteger) t1 t2:(NSInteger) t2;
  18. -(void)addOffset:(NSInteger) offset;
  19. -(void)addSpeed:(float) speed;/* SPEED1DIV5(1.5F), SPEED2(2.0F), SPEED3(3.0F), SPEED4(4.0F); */
  20. /* DNESITY0(0), DNESITY1(1), DNESITY2(2), DNESITY3(3), DNESITY4(4), DNESITY5(5), DNESITY6(6), DNESITY7(
  21. 7), DNESITY8(8), DNESITY9(9), DNESITY10(10), DNESITY11(11), DNESITY12(12), DNESITY13(13), DNESITY14(
  22. 14), DNESITY15(15) */
  23. -(void)addDensity:(NSInteger)density;
  24. -(void)addDirection:(NSInteger) direction;/* FORWARD(0), BACKWARD(1);*/
  25. -(void)addReference:(NSInteger) x y:(NSInteger) y;
  26. -(void)addShif:(NSInteger) shif;
  27. -(void)addCls;
  28. -(void)addFeed:(NSInteger) dot;
  29. -(void)addBackFeed:(NSInteger) backDot;
  30. -(void)addFormFeed;
  31. -(void)addHome;
  32. -(void)addPrint:(NSInteger) m n:(NSInteger) n;
  33. /* PC437(437), PC850(850), PC852(852), PC860(860), PC863(863), PC865(865), WPC1250(1250), WPC1252(1252), WPC1253(
  34. 1253), WPC1254(1254); */
  35. -(void)addCodePage:(NSInteger) page;
  36. -(void)addSound:(NSInteger) level interval:(NSInteger) interval;
  37. -(void)addLimitFeed:(NSInteger) n;
  38. -(void)addSelfTest;
  39. -(void)addBar:(NSInteger) x y:(NSInteger) y
  40. width:(NSInteger) width heigth:(NSInteger) height;
  41. -(void)addText:(NSInteger) x y:(NSInteger) y
  42. fontType:(NSString *) font rotation:(NSInteger) rotation
  43. xscal:(NSInteger) Xscal yscal:(NSInteger) Yscal
  44. text:(NSString *) text;
  45. -(void)add1DBarcode:(NSInteger) x y:(NSInteger) y
  46. barcodeType:(NSString *) type height:(NSInteger) height
  47. wide:(NSInteger) wide narrow:(NSInteger) narrow
  48. readable:(NSInteger) readable rotation:(NSInteger) rotation
  49. content:(NSString *) content;
  50. -(void)addQRCode:(NSInteger) x y:(NSInteger) y errorCorrectionLevel:(NSString *) level
  51. width:(NSInteger) qrWidth rotation:(NSInteger) rotation
  52. code:(NSString *) code;
  53. -(void)addBitmap:(NSInteger) x y:(NSInteger) y
  54. bitmapMode:(NSInteger) mode width:(NSInteger) nWidth
  55. bitmap:(UIImage *) b;
  56. -(void)addBox:(NSInteger) x y:(NSInteger) y xend:(NSInteger) xend yend:(NSInteger) yend;
  57. -(void)addErase:(NSInteger) x y:(NSInteger) y xwidth:(NSInteger) xwidth yheigth:(NSInteger) yheight;
  58. -(void)addReverse:(NSInteger) x y:(NSInteger) y xwidth:(NSInteger) xwidth yheigth:(NSInteger) yheight;
  59. -(void)addPeel:(NSString *) enable;
  60. -(void)addTear:(NSString *) enable;
  61. -(void)addCutter:(NSString *) enable;
  62. -(void)addPartialCutter :(NSString *) enable;
  63. -(float)findSpeedValue:(NSInteger) sp;
  64. @end