DataForSendToPrinterXp76

net.xprinter.utils

## Class DataForSendToPrinterXp76

- java.lang.Object
- - net.xprinter.utils.DataForSendToPrinterXp76

-     public class DataForSendToPrinterXp76
      extends java.lang.Object

  As the instruction processing tools. The processing instruction is only applicable to 76mm series of needle printer XP 76xx series products. The effect of specific description and instructions please refer to the programming manual.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataForSendToPrinterXp76()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `allowOrForbidPressButton(int n)` allow or forbid press button ESC c 5 n
    `static byte[]` | `cancelChineseCharModel()` select Or Cancel Chinese Char UnderLine Model FS .
    `static byte[]` | `cancelUserDefinedCharacters(int n)` cancel user defined characters ESC ? n Cancel the user-defined characters in the code for the n character
    `static byte[]` | `cancelUserDefinedChineseChar(int c2)` cancel User Defined ChineseChar FS ? c1 c2
    `static byte[]` | `creatCashboxContorlPulse(int m, int t1, int t2)` creat cashbox contorl pulse ESC p m t1 t2
    `static byte[]` | `definedUserDefinedChineseChar(int c2, byte[] b)` defined User Defined ChineseChar FS 2 c1 c2 d1...dk
    `static byte[]` | `defineuserDefinedCharacters(int c1, int c2, byte[] b)` User defined character ESC $ Y c1 c2 [x1 d1...d(x1*y)]...[xk d1...d(y*xk)]
    `static byte[]` | `executePrintDataSaveByTransformToHex()` execute printdata save by transform to hex GS ( A pL pH n m
    `static byte[]` | `feedBlackPaperToPrintPosition()` feed black paper to print position GS FF
    `static byte[]` | `feedpaperToOrderEnd()` feed paper to order end ESC DEL
    `static byte[]` | `horizontalPositioning()` Horizontal positioning instruction; HT
    `static byte[]` | `initializePrinter()` Initialize printer ESC @
    `static byte[]` | `openOrCloseAutoReturnPrintState(int n)` open or close auto return print state GS a n
    `static byte[]` | `printAndBackFeed(int n)` print and back feed ESC K n
    `static byte[]` | `PrintAndCarriageReturn()` Print and carriage return CR
    `static byte[]` | `printAndFeed(int n)` print and feed ESC J n
    `static byte[]` | `printAndFeedForward(int n)` print and feed forward ESC d n
    `static byte[]` | `printAndFeedLine()` print and feed Line LF
    `static byte[]` | `printAndFeedUnidirection(int n)` print and feed backward ESC d n
    `static byte[]` | `printHeaderRecordAndFeedToPrintStartPosition()` print head record and feed to print start position GS < The printer receives the order after the first print head reset, then go to the starting position of black label printing paper¡£
    `static byte[]` | `printHeadReplaceEnter()` print head replace enter Move the print head to the standby position ESC <
    `static byte[]` | `requestRealtimeForPrint(int n)` request real time for print DLE ENQ n
    `static byte[]` | `returnState(int n)` returnState GS r n
    `static byte[]` | `selectAlignment(int n)` Select alignment ESC a n
    `static byte[]` | `selectBmpModel(int m, int nL, int nH, byte[] b)` Select the bitmap mode ESC * m nL nH d1 d2...dk
    `static byte[]` | `selectCharacterCodePage(int n)` select character codepage ESC t n
    `static byte[]` | `selectChineseCharModel()` set Chinese Character Model FS &
    `static byte[]` | `selectCutPagerModerAndCutPager(int m)` select Cut Pager Moder And CutPager GS V m
    `static byte[]` | `selectCutPagerModerAndCutPager(int m, int n)` select Cut Pager Moder And CutPager GS V m n
    `static byte[]` | `selectFont(int n)` Select Font ESC M n
    `static byte[]` | `selectInternationalCharacterSets(int n)` select international character set ESC R n
    `static byte[]` | `selectOrCancelBoldModel(int n)` Select or cancel the bold model ESC E n
    `static byte[]` | `selectOrCancelChineseCharDoubleWH(int n)` select or cancel chineseChar double width and height FS W n
    `static byte[]` | `selectOrCancelChineseCharUnderLineModel(int n)` select Or Cancel Chinese Char UnderLine Model FS - n
    `static byte[]` | `selectOrCancelConvertPrintModel(int n)` select or cancel convert print model ESC { n
    `static byte[]` | `selectOrCancelDoubelPrintModel(int n)` Select or cancel double print mode ESC G n
    `static byte[]` | `selectOrCancelUnderlineModel(int n)` Select or cancel underline mode ESC-n
    `static byte[]` | `selectOrCancelUnidirectionPrint(int n)` select or cancel unidirection print ESC U n
    `static byte[]` | `selectOrCancleCustomChar(int n)` select or cancle custom char ESC % n
    `static byte[]` | `selectPrintColor(int n)` select print color ESC t n
    `static byte[]` | `selectPrintModel(int n)` select print mode ESC £¡n
    `static byte[]` | `selectPrintTransducerOutPutPageOutSignal(int n)` select printer transducer output page out Signal ESC c 3 n
    `static byte[]` | `selectPrintTransducerStopPrint(int n)` select printer transducer stop print ESC c 4 n
    `static byte[]` | `sendRealtimestatus(int n)` send real time status DLE EOT n
    `static byte[]` | `setBlackPositionRecord(int a, int m, int nL, int nH)` set black position record GS ( F pL pH a m nL nH
    `static byte[]` | `setCharRightSpace(int n)` set char right space
    `static byte[]` | `setChineseCharacterModel(int n)` set Chinese Character Model FS ! n
    `static byte[]` | `setChineseCharLeftAndRightSpace(int n1, int n2)` Set the spacing Chinese characters characters.
    `static byte[]` | `setConnectWaitTime(int t1, int t2)` set the reconnect time GS z 0 t1 t2
    `static byte[]` | `setDefultLineSpacing()` Set the default line spacing ESC 2 About 3.75mm
    `static byte[]` | `setHorizontalmovementPosition(byte[] b)` set horizontal movement position ESC D n1...nk NUL;
    `static byte[]` | `setLineSpaceing(int n)` line-height ESC 3 n
    `static byte[]` | `setOrderLength(int nL, int nH)` set Order Length ESC ~ nL nH
    `static byte[]` | `setRollBackLength(int n)` set roll back length length= n¡Á0.1764 mm ESC ^ n
    `static byte[]` | `strTobytes(java.lang.String str)` string to byte[]

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataForSendToPrinterXp76

          public DataForSendToPrinterXp76()

  - ### Method Detail

    - #### horizontalPositioning

          public static byte[] horizontalPositioning()

      Horizontal positioning instruction; HT
      Returns:
        byte[];

    - #### printAndFeedLine

          public static byte[] printAndFeedLine()

      print and feed Line LF
      Returns:
        byte[];

    - #### PrintAndCarriageReturn

          public static byte[] PrintAndCarriageReturn()

      Print and carriage return CR

    - #### sendRealtimestatus

          public static byte[] sendRealtimestatus(int n)

      send real time status DLE EOT n
      Parameters:
        `n,1<=n<=4;` -
      Returns:
        byte[];

    - #### requestRealtimeForPrint

          public static byte[] requestRealtimeForPrint(int n)

      request real time for print DLE ENQ n
      Parameters:
        `n,1<=n<=2` -

    - #### setCharRightSpace

          public static byte[] setCharRightSpace(int n)

      set char right space
      Parameters:
        `n,On` - behalf of the size of the variable spacing£¬ranges0-255£»

    - #### selectPrintModel

          public static byte[] selectPrintModel(int n)

      select print mode ESC £¡n
      Parameters:
        `n` - On behalf of the print mode variable£¬ranges:0-255

    - #### selectOrCancleCustomChar

          public static byte[] selectOrCancleCustomChar(int n)

      select or cancle custom char ESC % n
      Parameters:
        `n£¬0-255£¬The` - lowest is 1,use;the lowest is 0, do not use.

    - #### defineuserDefinedCharacters

          public static byte[] defineuserDefinedCharacters(int c1,
                                           int c2,
                                           byte[] b)

      User defined character ESC $ Y c1 c2 [x1 d1...d(x1*y)]...[xk d1...d(y*xk)]
      Parameters:
        `c1£¬c2£¬c1` - is the initial character code£¬c2 is the termination of the character code£¬ranges32<=c1<=c2<=127;
        `b£¬The` - format for the byte[]:[x1 d1...d(x1*y)]...[xk d1...d(y*xk)]£¬Set B for download character character data. Custom character rules for details, please refer to the manual programming£»

    - #### selectBmpModel

          public static byte[] selectBmpModel(int m,
                              int nL,
                              int nH,
                              byte[] b)

      Select the bitmap mode ESC * m nL nH d1 d2...dk
      Parameters:
        `m£º0,1,32£¬33,represents` - different point density
        `nL£º0-255` -
        `nH£º0-3` -
        `b£¬b={d1` - d2...dk}£¬m=0 or 1,k=nL+nH*256;m=32 or 33,k=(nL+nH*256)*3;0<=d<=255; Please refer to the instruction manual programming

    - #### selectOrCancelUnderlineModel

          public static byte[] selectOrCancelUnderlineModel(int n)

      Select or cancel underline mode ESC-n
      Parameters:
        `n:0,48.1,49` - (remove underlining use underscores 1 points wide); 2,50 (2 bit wide) underline;

    - #### setDefultLineSpacing

          public static byte[] setDefultLineSpacing()

      Set the default line spacing ESC 2 About 3.75mm

    - #### setLineSpaceing

          public static byte[] setLineSpaceing(int n)

      line-height ESC 3 n
      Parameters:
        `n£º0-255` -

    - #### printHeadReplaceEnter

          public static byte[] printHeadReplaceEnter()

      print head replace enter Move the print head to the standby position ESC <

    - #### cancelUserDefinedCharacters

          public static byte[] cancelUserDefinedCharacters(int n)

      cancel user defined characters ESC ? n Cancel the user-defined characters in the code for the n character
      Parameters:
        `n:32-127` -

    - #### initializePrinter

          public static byte[] initializePrinter()

      Initialize printer ESC @

    - #### setHorizontalmovementPosition

          public static byte[] setHorizontalmovementPosition(byte[] b)

      set horizontal movement position ESC D n1...nk NUL;
      Parameters:
        `b={n1...nk};k<=32;movement` - position=width of character * n£»

    - #### selectOrCancelBoldModel

          public static byte[] selectOrCancelBoldModel(int n)

      Select or cancel the bold model ESC E n
      Parameters:
        `n£¬0-255£¬The` - lowest is 1, bold; 0, cancel.

    - #### selectOrCancelDoubelPrintModel

          public static byte[] selectOrCancelDoubelPrintModel(int n)

      Select or cancel double print mode ESC G n
      Parameters:
        `n£¬0-255£¬The` - lowest is 1, double choose print; the lowest is 0, cancel the double print

    - #### printAndFeed

          public static byte[] printAndFeed(int n)

      print and feed ESC J n
      Parameters:
        `n` - £º0-255

    - #### printAndBackFeed

          public static byte[] printAndBackFeed(int n)

      print and back feed ESC K n

    - #### selectFont

          public static byte[] selectFont(int n)

      Select Font ESC M n
      Parameters:
        `n` - ranges£º0£¬1£¬48£¬49£»0£¬48 standard font ;1,49 Font compression

    - #### selectInternationalCharacterSets

          public static byte[] selectInternationalCharacterSets(int n)

      select international character set ESC R n
      Parameters:
        `n£º0-15£»A` - representative of an international character set

    - #### selectOrCancelUnidirectionPrint

          public static byte[] selectOrCancelUnidirectionPrint(int n)

      select or cancel unidirection print ESC U n
      Parameters:
        `n` - The lowest is 1, chooes; 0, cancel£»

    - #### selectAlignment

          public static byte[] selectAlignment(int n)

      Select alignment ESC a n
      Parameters:
        `n:0-2or48-50£»Respectively:` - left aligned, centered, right aligned

    - #### selectPrintTransducerOutPutPageOutSignal

          public static byte[] selectPrintTransducerOutPutPageOutSignal(int n)

      select printer transducer output page out Signal ESC c 3 n
      Parameters:
        `n£º0-255` -

    - #### selectPrintTransducerStopPrint

          public static byte[] selectPrintTransducerStopPrint(int n)

      select printer transducer stop print ESC c 4 n
      Parameters:
        `n:0-255` -

    - #### allowOrForbidPressButton

          public static byte[] allowOrForbidPressButton(int n)

      allow or forbid press button ESC c 5 n
      Parameters:
        `n£º0-255£¬The` - lowest is 1, chooes; 0, cancel£»

    - #### printAndFeedForward

          public static byte[] printAndFeedForward(int n)

      print and feed forward ESC d n
      Parameters:
        `n:0-255£»` -

    - #### printAndFeedUnidirection

          public static byte[] printAndFeedUnidirection(int n)

      print and feed backward ESC d n
      Parameters:
        `n:0-255£»` -

    - #### creatCashboxContorlPulse

          public static byte[] creatCashboxContorlPulse(int m,
                                        int t1,
                                        int t2)

      creat cashbox contorl pulse ESC p m t1 t2
      Parameters:
        `m` - £ºConnecting pin£¬ranges£º0,1,48,49£»
        `t1,t2£º0-255` -

    - #### selectPrintColor

          public static byte[] selectPrintColor(int n)

      select print color ESC t n
      Parameters:
        `n:0,1,48,49;` - define:n=0

    - #### selectCharacterCodePage

          public static byte[] selectCharacterCodePage(int n)

      select character codepage ESC t n
      Parameters:
        `n£º0<=n<=10,16<=n<=19;` -

    - #### selectOrCancelConvertPrintModel

          public static byte[] selectOrCancelConvertPrintModel(int n)

      select or cancel convert print model ESC { n
      Parameters:
        `n£ºThe` - lowest is 1, chooes; 0, cancel. ranges£º0-255£»

    - #### executePrintDataSaveByTransformToHex

          public static byte[] executePrintDataSaveByTransformToHex()

      execute printdata save by transform to hex GS ( A pL pH n m

    - #### selectCutPagerModerAndCutPager

          public static byte[] selectCutPagerModerAndCutPager(int m)

      select Cut Pager Moder And CutPager GS V m
      Parameters:
        `m£º0£¬48£¬full` - cut£»1,49£¬half cut

    - #### selectCutPagerModerAndCutPager

          public static byte[] selectCutPagerModerAndCutPager(int m,
                                              int n)

      select Cut Pager Moder And CutPager GS V m n
      Parameters:
        `m£º66` -
        `n:` - feed forword n£¬

    - #### openOrCloseAutoReturnPrintState

          public static byte[] openOrCloseAutoReturnPrintState(int n)

      open or close auto return print state GS a n
      Parameters:
        `n£¬0-255£¬` -

    - #### returnState

          public static byte[] returnState(int n)

      returnState GS r n
      Parameters:
        `n£¬ranges£º1,2,49,50£»` - 1,49Returns the sensor status 2,50Return to the state of the cashbox

    - #### setConnectWaitTime

          public static byte[] setConnectWaitTime(int t1,
                                  int t2)

      set the reconnect time GS z 0 t1 t2
      Parameters:
        `t1,t2,ranges£º0-255;` - define:t1=t2=0;

    - #### setChineseCharacterModel

          public static byte[] setChineseCharacterModel(int n)

      set Chinese Character Model FS ! n
      Parameters:
        `n` - ranges:0-255

    - #### selectChineseCharModel

          public static byte[] selectChineseCharModel()

      set Chinese Character Model FS &

    - #### selectOrCancelChineseCharUnderLineModel

          public static byte[] selectOrCancelChineseCharUnderLineModel(int n)

      select Or Cancel Chinese Char UnderLine Model FS - n
      Parameters:
        `n£º0-2or48-50£»` -

    - #### cancelChineseCharModel

          public static byte[] cancelChineseCharModel()

      select Or Cancel Chinese Char UnderLine Model FS .

    - #### definedUserDefinedChineseChar

          public static byte[] definedUserDefinedChineseChar(int c2,
                                             byte[] b)

      defined User Defined ChineseChar FS 2 c1 c2 d1...dk
      Parameters:
        `c2:A1H<=c2<=FEH` -
        `b,size:72£¬On` - behalf of the definition of Chinese characters data

    - #### cancelUserDefinedChineseChar

          public static byte[] cancelUserDefinedChineseChar(int c2)

      cancel User Defined ChineseChar FS ? c1 c2
      Parameters:
        `The` - C2 command to cancel Chinese characters character code definition specified by C1 and C2 in the cancellation of custom print blank characters Chinese characters characters

    - #### setChineseCharLeftAndRightSpace

          public static byte[] setChineseCharLeftAndRightSpace(int n1,
                                               int n2)

      Set the spacing Chinese characters characters. FS S n1 n2
      Parameters:
        `n1,Set` - left side distance£¬0-255£»
        `n2,Set` - right side distance£¬0-255£»

    - #### selectOrCancelChineseCharDoubleWH

          public static byte[] selectOrCancelChineseCharDoubleWH(int n)

      select or cancel chineseChar double width and height FS W n
      Parameters:
        `n£º0-255£»The` - lowest is 1, chooes; 0, cancel.

    - #### setBlackPositionRecord

          public static byte[] setBlackPositionRecord(int a,
                                      int m,
                                      int nL,
                                      int nH)

      set black position record GS ( F pL pH a m nL nH
      Parameters:
        `pL+(pH¡Á256)¡Ô4` - is pL=4£¬pH=0 a=1£¬2£»m=0£¬48 or 1£¬49 0¡Ü(nL+nH¡Á256)<1700

    - #### feedBlackPaperToPrintPosition

          public static byte[] feedBlackPaperToPrintPosition()

      feed black paper to print position GS FF

    - #### setRollBackLength

          public static byte[] setRollBackLength(int n)

      set roll back length length= n¡Á0.1764 mm ESC ^ n
      Parameters:
        `n,0-255;` -

    - #### setOrderLength

          public static byte[] setOrderLength(int nL,
                              int nH)

      set Order Length ESC ~ nL nH
      Parameters:
        `nL,nH,` - This command is used to set the length (nL+nH x 256 x 0.1764 mm)£¬

    - #### feedpaperToOrderEnd

          public static byte[] feedpaperToOrderEnd()

      feed paper to order end ESC DEL

    - #### printHeaderRecordAndFeedToPrintStartPosition

          public static byte[] printHeaderRecordAndFeedToPrintStartPosition()

      print head record and feed to print start position GS < The printer receives the order after the first print head reset, then go to the starting position of black label printing paper¡£

    - #### strTobytes

          public static byte[] strTobytes(java.lang.String str)

      string to byte[]