Printing to a ESC/POS Thermal Receipt printer is simple now. Just send an intent.
Intent pi = new Intent();
pi.setAction("org.escpos.intent.action.PRINT");
pi.setPackage("com.loopedlabs.escposprintservice");
pi.putExtra("DATA_TYPE", "PDF_URL");
pi.putExtra(Intent.EXTRA_TEXT, "https://url.for.pdf");
startActivity(i);
Intent pi = new Intent();
pi.setAction("org.escpos.intent.action.PRINT");
pi.setPackage("com.loopedlabs.escposprintservice");
pi.putExtra("PRINT_DATA", pdfByteArray);
pi.putExtra("DATA_TYPE", "PDF");
startActivity(i);