Skip to content

looped-labs/ESCPOSPrintServiceDemo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ESC POS Print Service Demo

Printing to a ESC/POS Thermal Receipt printer is simple now. Just send an intent.

Print Intents to print PDF URL's

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);  

You can also print Images, HTML & PDF Urls


HeadingPrint Intents to print PDF data in a Byte Array

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);

You can also print Images, HTML & PDF Byte Arrays