Class POSPrinterService.EscCut

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintDataPart
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.EscCut
Enclosing class:
POSPrinterService

public static class POSPrinterService.EscCut extends POSPrinterService.PrintDataPart
Class describing cut escape sequences ESC|[#][x]P, where x is one of f or s.
  • Method Details

    • getPercent

      public int getPercent()
      Percentage of cut.
      Returns:
      Percentage value.
    • getFeed

      public boolean getFeed()
      Specifies whether a feed of RecLinesToPaperCut lines shall be performed (if true).
      Returns:
      true if feed shall be done.
    • getStamp

      public boolean getStamp()
      Specifies whether the stamp shall be pressed when cutting the paper.
      Returns:
      true if stamp shall be pressed.
    • getEscCut

      public static POSPrinterService.PrintDataPart getEscCut(POSPrinterService.PrintDataPart obj, int type, int subtype, int value, String escdata, boolean negated, boolean valueispresent)
      Checks whether the specified cut sequence parameters form a stamp sequence. If so, it returns an EscCut object. If not, the object given as first parameter will be returned.
      Parameters:
      obj - An object containing corresponding sequence parameters or null.
      type - The sequence type (see EscUnknown, property Esc).
      subtype - The subtype (see EscUnknown, property Subtype).
      value - The value (see EscUnknown, property Value).
      escdata - If value is a data length, the corresponding data. Otherwise null.
      negated - The negation flag (see EscUnknown, property Negated).
      valueispresent - The present flag (see EscUnknown, property ValuePresent).
      Returns:
      An EscCut object, if the sequence is a well-formed cut sequence, otherwise obj.
    • validate

      public void validate(POSPrinterService srv, int station) throws jpos.JposException
      Description copied from class: POSPrinterService.PrintDataPart
      Used to perform full validation of the print data. To do this, relevant capabilities will be checked and the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.
      Specified by:
      validate in class POSPrinterService.PrintDataPart
      Parameters:
      srv - POSPrinterService to be used for additional validation.
      station - Printer station for which the validation shall be checked.
      Throws:
      jpos.JposException - If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.
    • validateData

      public void validateData(POSPrinterService srv, int station) throws jpos.JposException
      Description copied from class: POSPrinterService.PrintDataPart
      Used to perform additional validation of the print data, if output to the given station occurs. To do this, simply the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.
      Specified by:
      validateData in class POSPrinterService.PrintDataPart
      Parameters:
      srv - POSPrinterService to be used for validation.
      station - Printer station used for validation.
      Throws:
      jpos.JposException - If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.