title: Bluetooth Thermal printer print half String
body: <p>Please help me, I waste my whole day but could not figure out Why my Thermal Printer print half text in receipt. It's work perfectly in <code>58mm Mini Bluetooth Thermal Printer</code>. But when I come in Thermal Printer <code>LESHP 80mm Wireless Bluetooth Thermal</code> this printer only print half text in receipt.</p>
  
  <p>Here my code:</p>
  
  <pre><code>void findBT() {
  
      try {
          mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  
          if (mBluetoothAdapter == null) {
  
          }
  
          if (!mBluetoothAdapter.isEnabled()) {
              Intent enableBluetooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
              startActivityForResult(enableBluetooth, 0);
          }
  
          Set&lt;BluetoothDevice&gt; pairedDevices = mBluetoothAdapter.getBondedDevices();
  
          if (pairedDevices.size() &gt; 0) {
              for (BluetoothDevice device : pairedDevices) {
  
                  if (device.getName().contains("Printer")) {
  
                      mmDevice = device;
  
                  }
              }
  
  
  
          }
          else {
              Toast.makeText(this,"device not pair.",Toast.LENGTH_LONG).show();
          }
  
      } catch (Exception e) {
          e.printStackTrace();
      }
   void SendDateBT() throws IOException {
      try {
  
          // Standard SerialPortService ID
          UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
  
  
          mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);
  
          mmSocket.connect();
          mmOutputStream = mmSocket.getOutputStream();
          mmInputStream = mmSocket.getInputStream();
          mmOutputStream.write(mytext.getBytes());
  
          mmOutputStream.flush();
          mmOutputStream.close();
          mmInputStream.close();
          mmSocket.close();
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I call this two function when I want to print receipt :</p>
  
  <pre><code>findBT();
  SendDatBt();
  </code></pre>