title: Paper ejecting from printer when sending manual command codes
body: <p>I am programming for the printer Epson TM-H5000II.</p>
  
  <p>I trying to print the slip paper when call the function ESC c 0 4. </p>
  
  <p>The basic steps I'm using: </p>
  
  <ol>
  <li>Manual Insert the Paper</li>
  <li>call ESC c 0 4 (Select Slip Paper)</li>
  </ol>
  
  <p>The problem is that after calling ESC c 0 4 the paper will eject from printer.</p>
  
  <p>How can I tell the printer stop eject my paper from printer?</p>
  
  <p>Can this be done or is limitation of the printer?</p>
  
  <hr>
  
  <p>update 2013-03-16</p>
  
  <p>I found another Epson document. I am trying to try disable the TOF and BOF sensor .
  But I am not sure my code is correct or wrong.
  Hope someone can give me some hint to solve the problem.
  Thank You</p>
  
  <p>Here is the document.
  Page 1
    <a href="http://postimage.org/image/i0mffniv9" rel="nofollow">http://postimage.org/image/i0mffniv9</a>
  Page 2
    <a href="http://postimage.org/image/ev1tpg091/" rel="nofollow">http://postimage.org/image/ev1tpg091</a></p>
  
  <p>Below is my code</p>
  
  <pre><code>Dim SerialPort1 As New SerialPort("COM1")
  SerialPort1.BaudRate = 9600
  SerialPort1.Parity = IO.Ports.Parity.None
  SerialPort1.StopBits = 1
  SerialPort1.DataBits = 8
  SerialPort1.WriteBufferSize = 4096
  If SerialPort1.IsOpen = False Then SerialPort1.Open()
  If SerialPort1.IsOpen Then
      'SerialPort1.DiscardInBuffer()
      'SerialPort1.DiscardOutBuffer()
          'Initialize Printer 
      Dim BufferInitialize() As Byte = {&amp;H1B, &amp;H40}
      SerialPort1.Write(BufferInitialize, 0, BufferInitialize.Length)
      ''Enable(SLip) ESC c 1 4
              Dim Buffer5() As Byte = {&amp;H1B, &amp;H63, &amp;H31, &amp;H4}
      SerialPort1.Write(Buffer5, 0, Buffer5.Length)
      'Disable sensor
      Dim BufferTOF() As Byte = {&amp;H1B, &amp;H63, &amp;H34, &amp;H10}
      SerialPort1.Write(BufferTOF, 0, BufferTOF.Length)
      'Disable sensor
      Dim BufferBOF() As Byte = {&amp;H1B, &amp;H63, &amp;H34, &amp;H20}
      SerialPort1.Write(BufferBOF, 0, BufferBOF.Length)
      'Enable(SLip) ESC c 0 4
      Dim Buffer2() As Byte = {&amp;H1B, &amp;H63, &amp;H30, &amp;H4}
      SerialPort1.Write(Buffer2, 0, Buffer2.Length) 
  
      SerialPort1.WriteLine("WHY")
      'Release
      Dim BufferEnd() As Byte = {&amp;H1B, &amp;H71}
      SerialPort1.Write(BufferEnd, 0, BufferEnd.Length) 
  End If
  If SerialPort1.IsOpen = True Then SerialPort1.Close()
  </code></pre>