Home
Documentation
Resources
Certifications
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Community

Get the latest news, ask others for help and share your knowledge.

Printing receipts - Android integration - Mercado Pago Developers

Intelligent search powered by OpenAI 

Print receipts

The printing of payment receipts is responsibility of the operator using the devices. To be able to do this, the integrator will need to add the *.jar library provided, which will allow the POS to be connected to peripheral elements, like a printer.

To integrate the NeptuneLiteAPI *.jar library and enable receipt printing, follow the steps below:

  1. Open your project in Android Studio and go to File > Project Structure > Dependencies.

image showing where to find the Modules tab

  1. Select the "+" button, which corresponds to creating a new module. A popup window will appear for you to select the type of module, which should be "Import .JAR/.AAR Package."

image showing where to find the library

  1. In the next window, browse for the path to the required library by clicking the search button located on the right side of the "File name" field.

image showing where to browse

  1. Press the Finish button and add the library as a Module Dependency to the project.

image showing where to find the Modules Dependencies

And that's it! The .jar import was successful, and you can now use the library for printing.

Printing

To perform a print using the Demo App RDC, you should instantiate the object as follows:

android

Printer printer = Printer.getInstance(); 
printer.init(); 
int status = printer.getPrinterStatus(); 
if (status == 0) { 
    printer.printTaggedText(“TEXTO A IMPRIMIR”, "iso-8859-1"); 
} else{ 
    Log.e(TAG_IMPRESION, "La impresora presenta el siguiente inconveniente: " +  statusCode2Str(status); 
} 
printer.start();  
 

Below, you can see the possible values that the field printer.getPrinterStatus() can return, depending on the state of the printer that will receive the command.

StatusStatusCode2Str(Status)
0Correct
1Printer busy
2Out of paper
3Data format error
4Printer problem, please check printer status
8Printer overheated
9Low voltage in printer
240Printer busy
252No available text font in printer
254Data packet too long